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 |
为什么我的C++能过,G++却RE呢??是不是我的输入处理出了问题,帮忙看一下: int main() { int i,j,k,p,q; int sum; //freopen("2997.in","r",stdin); while(scanf("%c",&ss[0])!=EOF) { sum=0; l=0; while(ss[l]!='\n') { if(ss[l]=='m'){ sum+=1000; l=0; } else if(ss[l]=='i' || ss[l]=='v' || ss[l]=='x' || ss[l]=='l' || ss[l]=='c' || ss[l]=='d')l++; ss[l]=getchar(); } ss[l]='\0'; ................. } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator