您的位置:首页 > 其它

HDOJ 2080 Lowest Common Multiple Plus

2015-07-20 21:18 281 查看
http://acm.hdu.edu.cn/showproblem.php?pid=2028

#include<stdio.h>

#include<string.h>

#include<math.h>

#include<ctype.h>

int main()

{

int n;

int i;

int a[100];

int tem;

while(~scanf("%d",&n))

{

tem=0;

for(i=1;i<=n;i++)

{

scanf("%d",&a[i]);

tem=tem>a[i]?tem:a[i];

}

for(i=1;i<=n;i++)

{

if(tem%a[i]!=0)

{

tem++;

//i=1;

i=0;

}

}

printf("%d\n",tem);

}

return 0;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: