Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
14260 | chibubao | 求两个数的最大公约数 | C++ | Accepted | 0 MS | 252 KB | 180 | 2023-04-12 03:11:40 |
#include<iostream> using namespace std; int gcd(int a,int b) { if(b==0) return a; return gcd(b,a%b); } int main() { int a,b,i,cnt=0; cin>>a>>b; cout<<gcd(a,b); }