| ||||||||||
| 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 | |||||||||
谢谢,,知道犯了低级错误,:)In Reply To:谁可以帮帮我? Posted by:deep_you at 2005-02-27 22:16:43 > #include <stdio.h>
> #define outerror() {printf("such number is impossible!\n");break;}
> void main()
> {
> char str[1000];
> int x,max=0;
> char* ch;
> while(scanf("%s",str)==1)
> {
> ch=str;
> max=0;x=0;
> while(*ch)
> {
> if(str[0]=='0')outerror();
> if((*ch>='0')&&(*ch<='9'))x=*ch-'0';
> else if((*ch>='A')&&(*ch<='Z'))x=*ch-'A'+10;
> else x=*ch-'a'+36;
> if(x>max)max=x;
> ch++;
> }
> if(max!=0)printf("%d\n",max+1);
> }
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator