| ||||||||||
| 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 | |||||||||
请大家看看我的程序!#include <stdio.h>
long equ(long j,long a)
{return(j==a?1:0);
}
main()
{long i=1,j=1,k=0,l,t,a,b;
scanf("%d %d",&a,&b);
k=a<b?a:b; t=k;
for(;k>0;k--)
{i=i+1,j=j+2;
l=equ(j,t);
if(l) break;
i=i+1,j=j+1;
l=equ(j,t);
if(l) break;
i=i+1,j=j+2;
l=equ(j,t);
if(l) break;
}
i=i+j;
t=a>b?a:b;
if(i==t)
printf("%ld\n",l-1);
else
printf("%ld\n",l);
}
为什么总是"Wrong answer"呀?我感觉对呀.我是根据上边的讨论写的.
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator