上一页 1 ··· 76 77 78 79 80 81 82 83 84 ··· 99 下一页

2011年4月29日

最小公倍数

摘要: #include<stdio.h>long long n;long long gcd( long long n,long long m ){ return m ? gcd( m,n % m ):n;}long long cal( ){ long long sum = 1,c; for( long long i = 1; i <= n; ++i ) scanf( "%I64d",&c ),sum =... 阅读全文

posted @ 2011-04-29 13:57 more think, more gains 阅读(167) 评论(0) 推荐(0)

汉字统计

摘要: #include<stdio.h>#include<string.h>int main( ){ int N; scanf("%d",&N); getchar(); while(N--) { int len,i,num=0; char ch[10000]; gets(ch); len=strlen(ch); for(i=0;i<len;i++) if(ch[i]<0) num++; printf("%d\n",num/2); } return 0;} 阅读全文

posted @ 2011-04-29 13:55 more think, more gains 阅读(133) 评论(0) 推荐(0)

回文数

摘要: #include<stdio.h>#include<string.h>int main( ){ int N,len; scanf("%d",&N); while(N--) { int flag=0; char ch[100],*p,*q; scanf("%s",ch); len=strlen(ch); for(p=ch,q=ch+len-1;p<=q;p++,q--) if(*p!=*q) {pu... 阅读全文

posted @ 2011-04-29 13:55 more think, more gains 阅读(166) 评论(0) 推荐(0)

进制转换

摘要: #include<stdio.h>#include<stdlib.h>#include<string.h>#include<math.h>typedef struct { int data[50]; int top;}seqstack;seqstack *S;void Init( ){ S=new seqstack; S->top=-1;}void push(int x){ S->data[++S... 阅读全文

posted @ 2011-04-29 13:48 more think, more gains 阅读(168) 评论(0) 推荐(0)

2011年4月28日

统计元音

摘要: #include<stdio.h>#include<string.h>int main( ){ int N; scanf("%d",&N); getchar(); while(N--) { char ch[300]; gets(ch); int i,j,len,a=0,e=0,t=0,o=0,u=0; len=strlen(ch); for(i=0;i<len;i++) if(ch[i]=='a') a++; else if(ch[i]=='e') e++; else if(ch[i]=='i&# 阅读全文

posted @ 2011-04-28 20:10 more think, more gains 阅读(147) 评论(0) 推荐(0)

上一页 1 ··· 76 77 78 79 80 81 82 83 84 ··· 99 下一页

导航