Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
84293 张黄源 最大公约数(函数) C++ Wrong Answer 1 MS 280 KB 243 2024-07-15 15:06:58

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; bool s(int n,int m) { int c = n%m; while(c!=0){ n=m; m=c; c = m%n; } return m; } int main() { int a,b; cin>>a>>b; cout<<s(a,b)<<endl; cout<<s(a,b)<<endl; return 0; }


Run Info:

------Input------
49 47
------Answer-----
1
------Your output-----
1 1