题解 | #最大公约数#库函数秒了
最大公约数
https://www.nowcoder.com/practice/20216f2c84bc438eb5ef05e382536fd3
#include <iostream> #include <numeric> using namespace std; int main(){ int a,b; while(cin>>a>>b){ cout<<gcd(a,b)<<endl; } return 0; }
最大公约数
https://www.nowcoder.com/practice/20216f2c84bc438eb5ef05e382536fd3
#include <iostream> #include <numeric> using namespace std; int main(){ int a,b; while(cin>>a>>b){ cout<<gcd(a,b)<<endl; } return 0; }
相关推荐