标签:gre put sample 简单 panel 公倍数 数据 ota sub
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 69870 Accepted Submission(s): 38427
//这道题真的很简单,一遍ac没有过多解释 #include<iostream> using namespace std; int yuefen(int a,int b){//用来查找a和b最大公约数的函数。 if(b!=0){ return yuefen(b,a%b); } return a; } int main(){ int a,b,c; while(cin>>a>>b){ if(a>b) c=yuefen(a,b); else c=yuefen(b,a); c=a*b/c; cout<<c<<endl; } }
标签:gre put sample 简单 panel 公倍数 数据 ota sub
原文地址:https://www.cnblogs.com/fromzore/p/9748352.html