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:为什么在自己的编译器上试的没问题,而提交却错了???帮帮忙啊!!

Posted by 2007210562 at 2008-05-10 16:16:58 on Problem 1067
In Reply To:为什么在自己的编译器上试的没问题,而提交却错了???帮帮忙啊!! Posted by:2007210562 at 2008-05-10 10:54:38
> 先是编译错误,说要把void改成int,,改了之后,去WA了。。(C++)
> 谢谢!!
#include <stdio.h>
#include <stdlib.h>
void main ()
{
	int x=0,y=0;
	long j,a,b,i=0,m;
	l:
	scanf ("%ld%ld",&a,&b);
	if (a<b)
	{
          j=b;b=a;a=j;
    }
    for (;a>21;)
	{
          a=a-21;i++;
    }
	b=b-i*13;
	i=0;
    if ((a==2&&b==1)||(a==5&&b==3)||(a==7&&b==4)||(a==10&&b==6)||(a==13&&b==8)||(a==15&&b==9)||(a==18&&b==11)||(a==20&&b==12))
		m=0;
    else 
		m=1;
	printf ("%ld\n",m);
	goto l;
}

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