Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:why i got "wrong answer"? help me!!!!!!!!!

Posted by mayp at 2007-03-14 14:58:57 on Problem 1597
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator