1:2:3#includestdio.h#includemath.hintmain(){inti=0,j=0,k=0,a=0,b=0,c=0,l=0,m=0,n=0,d=0,p=0,q=0;for(i=1;i=3;i++){for(j=1;j=9;j++){if(i!=j){for(k=1;k=9;k++){if(k!=j&&i!=k){a=i*100+j*10+k;b=a*2;c=a*3;l=b%10,d=c%10;m=(b%100)/10,p=(c%100)/10;n=b/100,q=c/100;if(l!=0&&m!=0&&n!=0&&d!=0&&p!=0&&q!=0)if(i!=l&&i!=m&&i!=n&&j!=l&&j!=m&&j!=n&&k!=l&&k!=m&&k!=n)if(i!=d&&i!=p&&i!=q&&j!=d&&j!=p&&j!=q&&k!=d&&k!=p&&k!=q)if(l!=d&&l!=p&&l!=q&&m!=d&&m!=p&&m!=q&&n!=d&&n!=p&&n!=q)printf(%d%d%d\n,a,b,c);}}}}}return0;}8#includestdio.hintmain(){inta,b[10],m=0,n=0,p;inti,j,k;scanf(%d,&a);for(i=1;i=a;i++){m=0;n=0;p=i;for(j=0;p!=0;j++){b[j]=p%10;p=p/10;}for(k=0;kj;k++){m=m+b[k];if(b[k]==8){n=1;}}if(m%8==0){printf(%d,i);continue;}if(i%8==0){printf(%d,i);continue;}if(n==1){printf(%d,i);continue;}}return0;}8的次数A*B#includestdio.h#includestring.h#includestdlib.hvoidcheng(chara[],charb[]){inti,j,ca,cb,*s;ca=strlen(a);cb=strlen(b);s=(int*)malloc(sizeof(int)*(ca+cb));for(i=0;ica+cb;i++)s[i]=0;for(i=0;ica;i++)for(j=0;jcb;j++)s[i+j+1]+=(a[i]-'0')*(b[j]-'0');for(i=ca+cb-1;i=0;i--)if(s[i]=10){s[i-1]+=s[i]/10;s[i]%=10;}i=0;while(s[i]==0)i++;for(;ica+cb;i++)printf(%d,s[i]);printf(\n);free(s);}intmain(){chara[100],b[100];gets(a),gets(b);if(a[0]=='-'&&b[0]!='-'){printf(-);cheng(&a[1],b);}elseif(a[0]=='-'&&b[0]=='-'){cheng(&a[1],&b[1]);}elseif(a[0]!='-'&&b[0]=='-'){printf(-);cheng(a,&b[1]);}elsecheng(a,b);return0;}N边形面积#includestdio.h#includemath.h#definePI3.1415926intmain(){doubles,a;intn;scanf(%d%lf,&n,&a);s=a*a*n/(2*2*tan(PI/n));printf(%.2lf\n,s);return0;}参加竞赛#includestdio.hintmain(){inta,b,c,d,e;for(a=0;a2;a++)for(b=0;b2;b++)for(c=0;c2;c++)for(d=0;d2;d++)for(e=0;e2;e++)if(((a==1&&b==1)||(a==0&&b==0))&&((b==0&&c==1)||(b==1&&c==0))&&((c==1&&d==1)||(c==0&&d==0))&&(!(d==0&&e==0))&&((e==1&&a==1&&d==1)||(e==0))){if(a==1){printf(A);}if(b==1){printf(B);}if(c==1){printf(C);}if(d==1){printf(D);}if(e==1){printf(E);}}return0;}草坪喷水插入排序#includestdio.hvoidsort(inta[],intn){inti;intk;intt;for(i=1;in;i++){t=a[i];k=i-1;while(ta[k]){a[k+1]=a[k];k--;if(k==-1)break;}a[k+1]=t;}}intmain(){intn;inta[100];inti;scanf(%d,&n);for(i=0;in;i++)scanf(%d,&a[i]);sort(a,n);printf(\n);for(i=0;in;i++)if(i==n-1)printf(%d\n,a[i]);elseprintf(%d,a[i]);return0;}查找车牌号#includestdio.h#includemath.hintmain(){inti,j,n;for(i=1;i=9;i++){for(j=0;j=9;j++){for(n=33;n=100;n++){if((n*n)==(i*1100+j*11))printf(%d,i*1100+j*11);}}}return0;}成绩转化乘完倒序尺子刻度大数除法大数减法#includestdio.h#includestring.h#definemax(a,b)ab?a:b#definemin(a,b)ab?b:aintsum[101];voidjia(chara[],charb[]){intflag=0,i,len1,len2,lenmax,lenmin;len1=strlen(a),len2=strlen(b);lenmax=max(len1,len2),lenmin=min(len1,len2);for(i=1;i=lenmax;i++){if(i=lenmin){sum[lenmax-i]=a[len1-i]+b[len2-i]-'0'-'0'+flag;if(sum[lenmax-i]=10){sum[lenmax-i]=sum[lenmax-i]-10;flag=1;}elseflag=0;}else{if(len1len2){sum[lenmax-i]=a[len1-i]-'0'+flag;if(sum[lenmax-i]=10){sum[lenmax-i]=sum[lenmax-i]-10;flag=1;}elseflag=0;}else{sum[lenmax-i]=b[len2-i]-'0'+flag;if(sum[lenmax-i]=10){sum[lenmax-i]=sum[lenmax-i]-10;flag=1;}elseflag=0;}}}if(flag==1)printf(1);for(i=0;ilenmax;i++)printf(%d,sum[i]);printf(\n);}voidjian(chara[],charb[]){intflag=0,i;intlen1,len2;len1=strlen(a),len2=strlen(b);for(i=1;i=len1;i++){if(i=len2){if(a[len1-i]-b[len2-i]-flag=0){sum[len1-i]=a[len1-i]-b[len2-i]-flag;flag=0;}else{sum[len1-i]=a[len1-i]-b[len2-i]-flag+10;flag=1;}}else{if(a[len1-i]-flag-'0'=0){sum[len1-i]=a[len1-i]-flag-'0';flag=0;}else{sum[len1-i]=a[len1-i]-flag+10-'0';flag=1;}}}for(i=0;ilen1&&sum[i]==0;i++);for(;ilen1;i++)printf(%d,sum[i]);printf(\n);}voidcompare(chara[],charb[]){intlen1,len2;len1=strlen(a),len2=strlen(b);if(len1len2||(len1==len2&&strcmp(a,b)0))jian(a,b);elseif(strcmp(a,b)!=0){printf(-);jian(b,a);}elseprintf(0\n);}intmain(){chara[100],b[100];gets(a);gets(b);if(a[0]=='-'&&b[0]!='-'){printf(-);jia(&a[1],b);}elseif(a[0]=='-'&&b[0]=='-')compare(&b[1],&a[1]);elseif(a[0]!='-'&&b[0]=='-')jia(a,&b[1]);elsecompare(a,b);return0;}大写变小写#includestdio.h#includestring.hintmain(){chars[80];intlen,i;gets(s);len=strlen(s);for(i=0;ilen;i++){if(s[i]='a'&&s[i]='z')s[i]=s[i]-32;}puts(s);return0;}到底星期几等比数列#includestdio.h#includestdlib.hintmain(){intm,n,sum;scanf(%d,&m);for(n=1;;n++){sum=(3*n-1)*n/2;if(summ)break;}printf(%d,n);return0;}分数#includestdio.hintmain(){intk,x=1,y=1;floata,b;scanf(%d,&k);for(;y=5000;y++){for(x=y;x=5000;x++){a=1.0/k;b=1.0/x+1.0/y;if(a==b)printf(1/%d=1/%d+1/%d\n,k,x,y);}}return0;}韩信点兵#includestdio.hintmain(){intn,i;for(i=0;;i++){if(i%5==2&&i%6==3&&i%7==4&&i%11==5){printf(%d,i);break;}}return0;}回文字符串#includestdio.h#includestring.h#includectype.h#defineMAXN5000+10charbuf[MAXN],s[MAXN];intp[MAXN];intmain(){intn,m=0,max=0,x,y;inti,j;fgets(buf,sizeof(s),stdin);n=strlen(buf);for(i=0;in;i++){if(isalpha(buf[i])){p[m]=i;s[m++]=toupper(buf[i]);}}for(i=0;im;i++){for(j=0;i-j=0&&i+jm;j++){if(s[i-j]!=s[i+j])break;if(j*2+1max){max=j*2+1;x=p[i-j];y=p[i+j];}}for(j=0;i-j=0&&i+j+1m;j++){if(s[i-j]!=s[i+j+1])break;i