![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字符
洋葱ycy
坚持,从容
展开
-
hdu 2055 字符与数字的转换
we define f(A) = 1, f(a) = -1, f(B) = 2, f(b) = -2, ... f(Z) = 26, f(z) = -26;Give you a letter x and a number y , you should output the result of y+f(x). InOn the first line, contains a num原创 2014-08-08 15:02:09 · 418 阅读 · 0 评论 -
hdu 2700 字符的判断
题意:输入#include#includeint main(){ char a[70];int i,l,sum,k;while(gets(a)!=NULL){if(a[0]=='#') break; sum=0; l=strlen(a); for(i=0;i { sum+=a[i]-'0'; } k=su原创 2014-09-06 17:27:54 · 356 阅读 · 0 评论 -
hdu 1039 字符串的判定
#include#includechar a[100];int main(){ int i,y,f,l,sum,p;while(gets(a)!=NULL,strcmp(a,"end")){ l=strlen(a); sum=0;p=1;y=0;f=0; for(i=0;i { if(a[i]=='a'||a[i]原创 2014-09-10 23:13:54 · 272 阅读 · 0 评论 -
hdu 2716 字符的转换
#include#includeint main(){ char a[30]; char b[82]; int i,j,len; while(gets(a)) { gets(b); len=strlen(b); for(i=0;i {原创 2014-08-15 17:51:55 · 365 阅读 · 0 评论 -
hdu 1228
#include#includeint main(){char a[10][6]={"zero","one","two","three","four","five","six","seven","eight","nine"}; int i,sum1,sum2;char b[10];while(1){sum1=sum2=0;while(scanf("%s原创 2014-10-12 21:02:55 · 308 阅读 · 0 评论 -
遇到空格,将字符串倒序输出
#include#includeint main(){char a[50];int k,i,l,j;while(gets(a)!=NULL){k=0;l=0;for(i=0;i{if(a[i]==' ' || i==strlen(a)){for(j=i-1;j>=l;j--){printf("%c",a[j]);k++;}if原创 2014-11-20 12:57:36 · 1592 阅读 · 0 评论