CF228A题Fox and Number Game
来源:互联网 发布:telnet默认端口 编辑:程序博客网 时间:2024/05/09 08:53
这个题虽然题目不长,英语也不难,但是还是看了好长时间才明白什么意思。。这个题利用了最大公约数来做的
#include <stdio.h>#include <string.h>int main(){ int n, i, a[102], j, x, y, z = 101; scanf("%d",&n); for(i=0;i<n;i++) {scanf("%d",&a[i]); if(z>a[i]) z=a[i]; } for(j=z; j >= 0; j--) { x=0; for(i=0;i<n;i++) { if(a[i]%j!=0) { x=1; break; } } if(x==0) {y=j;break;} } printf("%d\n",y*n); return 0;}
0 0
- CF228A题Fox and Number Game
- Fox and Number Game
- codeforecs Fox and Number Game
- A. Fox and Number Game
- L - Fox and Number Game
- codeforces Fox and Number Game
- vj --Fox and Number Game
- Codeforces 389A Fox and Number Game
- 389-A Fox and Number Game
- CF 389A:Fox and Number Game
- 优先队列+模拟-Fox and Number Game
- codeforces A. Fox and Number Game
- CodeForces 389A Fox and Number Game
- codeforces 389A Fox and Number Game
- codeforces 389A. Fox and Number Game
- Fox and Number Game(优先队列)
- Codeforces Round #228 (Div. 2) A. Fox and Number Game
- Codeforces Round #228 (Div. 2)A.Fox and Number Game
- 多线程四,死锁产生的原因和死锁的例子(毕向东老师)
- Android自定义View示例(四)—带有动画的Dialog
- Linux terminal, CMD 和 Git 中的代理设置
- 清官难
- jQuery()选择器、函数、方法一览表[网上有很多自己留存]
- CF228A题Fox and Number Game
- hibernate-2014-02-04
- eclipse发布web工程
- 约束和无约束优化方面的讲义和笔记-牛津大学2006
- 网页乱码问题 总结
- CF228B题Fox and Cross
- CF228C题Fox and Box Accumulation
- acm.DFS深度搜索专题
- 【POJ】【P2823】【Sliding Window】【题解】【单调队列】