Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
8261 | 季洁 | 求最大公约数(提高版) | C++ | Runtime Error | 0 | 0 MS | 248 KB | 186 | 2020-10-31 19:01:04 |
#include<bits/stdc++.h> using namespace std; int a,b,c; int fun(int a,int b){ if(a%b==0) return b; return fun(b,a%b); } int main(){ cin>>a>>b; cout<<fun(a,b); return 0; }