赞
踩
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- int i,l;
- long long sum;
- char s[10];
- while(~scanf("%s",s))
- {
- l=strlen(s);
- sum=0;
- for(i=0;i<l;i++)
- {
- if(s[i]>='0'&&s[i]<='9')
- sum=sum*16+(s[i]-'0');
- else sum=sum*16+(s[i]-'A'+10);
- }
- printf("%I64d\n",sum);
- return 0;
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。