AC代码
1 #include <stdio.h> 2 #include <string.h> 3 int cmp (const void *a,const void *b) 4 { 5 return *(char*)a - *(char*)b; 6 } 7 int main () //思考一个问题如果达到一定界点进位怎么计算 8 { 9 int box[10]; 10 int i ; 11 for(i = 0;i < 10;i++) 12 { 13 scanf("%d",&box[i]); 14 } 15 int size; 16 char input[51]; 17 int i2 = 0; ; //指向 input 18 for(i = 0;i < 10;i++) 19 { 20 while(box[i] > 0) 21 { 22 input[i2] = i + '0'; 23 i2++; 24 box[i]--; 25 } 26 } 27 input[i2] = '