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

如此水题 WA 4次, 实在惭愧 啊!~

Posted by 810974380 at 2009-08-03 15:00:50 on Problem 2840 and last updated at 2009-08-03 15:04:58
没注意到 把p>12写成了p>13
还狂提交!晕~

#include<stdio.h>
int main()
{int t,p,q,result;char c;
 scanf("%d",&t);
 while(t--)
 {scanf("%d%c%d",&p,&c,&q);
  if(q!=0) result=0;
  else result=((p>12)?(p-12):(12+p));
  printf("%d\n",result);
 }
 return 0;
}

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