标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 42356 Accepted Submission(s): 17505
1 #include<stdio.h> 2 int main (void) 3 { 4 int a[500]; 5 int i, n, temp; 6 while(scanf("%d", &n) == 1){ 7 temp = 0; 8 for(i = 1; i <= n; i++){ 9 scanf("%d", &a[i]); 10 if(temp < a[i]) 11 temp = a[i]; 12 } 13 for(i = 1; i <= n; i++) 14 if(temp % a[i] != 0){ 15 temp++; 16 i = 0; 17 } 18 printf("%d\n", temp); 19 } 20 return 0; 21 }
HDU 2028 Lowest Common Multiple Plus
标签:
原文地址:http://www.cnblogs.com/clairvoyant/p/4909925.html