Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96128 | 黎瑾萱 | 最大公约数(函数) | C++ | Accepted | 1 MS | 276 KB | 211 | 2024-11-03 09:23:52 |
#include<bits/stdc++.h> using namespace std; int zdgys(int a,int b){ while(b){ int t = a%b; a = b; b = t; } return a; } int main(){ int n,m; cin>>n>>m; cout<<zdgys(n,m); return 0; }