| ||||||||||
| 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 | |||||||||
这个题,不能有 tle 的问题吧In Reply To:This is my code. Why does it TLEed? Posted by:Failed_Exile at 2005-12-03 11:56:44 > #include <stdio.h>
>
> int main()
> {
> char c[100];
> long int m,s;
> while(getchar()!='#')
> {
> s=0;
> while(getchar()!='0')
> {
> scanf("%s%s%ld",c,c,&m),getchar();
> switch(getchar())
> {
> case 'F': s+=m+m; break;
> case 'B': s+=m+(m+1)/2; break;
> case 'Y': s+=(m>500)?m:500; break;
> }
> getchar();
> }
> getchar(),printf("%ld\n",s);
> }
> return 0;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator