Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
78115 | 张黄源 | 按班分组 | C++ | Accepted | 0 MS | 272 KB | 207 | 2024-06-16 14:39:29 |
#include<iostream> using namespace std; int main() { int a,b,w=1; int i = 1; cin>>a>>b; while(i <= a&&i <= b){ if(a % i == 0&&b % i == 0){ w = i; } i++; } cout<<w; return 0; }