Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6027 | 詹梓涵 | 15求两个数的最大公约数 | C++ | Compile Error | 0 MS | 0 KB | 400 | 2024-12-28 10:00:39 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,b,i,; cin>>a>>b; i=a%b; while(i!=0){ a=b; b=i; i=a%b; } cout<<b<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:7:15: error: expected unqualified-id before ';' token int a,b,i,; ^