Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1245 | 李羽 | 15求两个数的最大公约数 | C++ | Runtime Error | 1997 MS | 260 KB | 233 | 2023-08-23 10:34:02 |
#include<iostream> using namespace std; int main(){ int a,b,max; cin>>a>>b; if(a<b){ max=a; } else{ max=b; } while(max>1){ if(a%max==0&&b%max==0){ break; max-1; } } cout<<max; return 0; }
Runtime Error:[ERROR] A not allowed system call. Call ID:275