| ||||||||||
| 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 | |||||||||
如此水题 WA 4次, 实在惭愧 啊!~
没注意到 把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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator