摘要:
#include<stdio.h>int main(){int a,b,c,i,n;double d;char e;while(scanf("%d",&n)!=EOF){getchar();for(i=1;i<=n;i++){d=0;scanf("%c %d %d",&e,&a,&b);getchar();//必须吸收掉换行符,像下面这样是不行的,第一个字符会被认为是erter/*scanf("%d\n",&icase);for (i=0;i<icase;i++){ sc 阅读全文
摘要:
#include<stdio.h>int main(){ int n,m,k,z,i,j,x,ans; scanf("%d",&k); for (i=1;i<=k;i++) { if (i>1) printf("\n"); x=1;//大的输出块间有空行 while (scanf("%d%d",&n,&m)) { if (n==0&&m==0) break; printf("Case %d: ",x); x++; ans=0; for (j=1;j&l 阅读全文
摘要:
#include#includeint prime(int n){int i;for(i=2;i<=sqrt(n);i++){if(n%i==0)return 0;}return 1;}int str[21];int n;int i,totle=0;int shuzi[21];int prime1[... 阅读全文