| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:why i got "wrong answer"? help me!!!!!!!!!In Reply To:why i got "wrong answer"? help me!!!!!!!!! Posted by:acmcc at 2004-05-15 00:29:26 这个帖改后的AC CODE:
#include<stdio.h>
void main()
{
long stp,mod,n;
while(scanf("%ld%ld",&stp,&mod)!=-1){
printf("%10ld%10ld ",stp,mod);
n=stp>mod?mod:stp;
for(;n>1;n--)
if(stp%n==0&&mod%n==0)
break;//判断stp和mod是否互素
if(n==1)
printf("Good Choice\n\n");
else
printf("Bad Choice\n\n");
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator