Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
1908 莫业祁 两个数的最小公倍数 C++ Runtime Error 0 MS 252 KB 318 2023-12-02 15:24:08

Tests(0/10):


Code:

# include<iostream> using namespace std; int main(){ int a,b,c=0,temp1=0,temp2=0; cin>>a>>b; if(b>a) temp1=a; a=b; b=temp1; temp1=a; temp2=b; while(a%b!=0){ c=a%b; a=b; b=c; } cout<<temp1*temp2/b; return 0; }


Run Info:

Runtime Error:Floating point exception