| ||||||||||
| 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 | |||||||||
why i got "wrong answer"? help me!!!!!!!!!#include<stdio.h>
void main()
{
long stp,mod,n;
scanf("%ld%ld",&stp,&mod);
if(stp>=1&&mod<=1000000)
{
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");
else
printf("Bad Choice\n");
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator