标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 41132 Accepted Submission(s):
23000
1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 int main() 5 { 6 int a,b,c,n,t; 7 while(scanf("%d%d",&a,&b)!=EOF) 8 { 9 if(a<b) 10 { 11 t=a; 12 a=b; 13 b=t; 14 } 15 n=a*b; 16 while(b!=0) 17 { 18 c=a%b; 19 a=b; 20 b=c; 21 } 22 printf("%d\n",n/a); 23 } 24 return 0; 25 }
标签:
原文地址:http://www.cnblogs.com/pshw/p/4817561.html