POJ - 1597 英语阅读题..
2012-02-20 10:53
211 查看
这道题通过率也有47%了~~就是题目长了~~以前总是跳过去~~今天仔细来看~~很简单了~~具体的来说题意是给出x,y..问x的倍数%y..能否得到0~y-1的所有数...求一次最大公约数就好了...
还有这题容易PE...注意输出时两个数字都是留10个位置..Good/Bad Choise前面是4个空格...每次输出要空一行空白...
Program:
还有这题容易PE...注意输出时两个数字都是留10个位置..Good/Bad Choise前面是4个空格...每次输出要空一行空白...
Program:
#include<iostream> #include<string.h> #include<stdio.h> #include<algorithm> #include<math.h> #include<queue> using namespace std; int x,y; int gcd(int x,int y) { if (y==0) return x; return gcd(y,x%y); } int main() { freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); while (~scanf("%d%d",&x,&y)) { if (gcd(x,y)==1) { printf("%10d%10d Good Choice\n\n",x,y); }else { printf("%10d%10d Bad Choice\n\n",x,y); } } return 0; }
相关文章推荐
- POJ 1125 Stockbroker Grapevine 英语阅读难题.....Floyd
- POJ 3371 英语16级阅读
- [英语阅读]联合国土豆摄影大赛庆“薯年”
- [英语阅读]法第一夫人不鼓励萨科奇连任
- [英语阅读]荷兰造酒商花500万欧元为鼻子上保险
- [英语阅读]英一提款机双倍吐钱 百人排队取款
- [英语阅读]墨西哥成全球第二大肥胖国
- [英语阅读]考古:古埃及文明辉煌 普通人生活艰辛
- Radar Installation 分类: POJ 2015-06-15 19:54 8人阅读 评论(0) 收藏
- [英语阅读]7 Steps Toward Love
- [英语阅读]韩国首尔:公务员考试“挤破头”
- [英语阅读]报告:北极石油储量可供全球用三年
- [英语阅读]梦八教练:“我们将面临严峻挑战”
- [英语阅读]奇闻:哥伦比亚11个月男婴体重赶超八岁儿童
- 每日英语阅读(五十六)
- [英语阅读]发现:英国史前巨石阵为病人朝拜地
- Help Me with the Game 分类: POJ 2015-06-29 16:34 17人阅读 评论(0) 收藏
- [英语阅读]普京或有可能明年重掌克里姆林
- POJ 3320 Jessica's Reading Problem (尺取法_滑动窗口,阅读最少页数)
- POJ 1300 - 阅读理解+恶心输入+欧拉回路