水水水!
C/C++
1 #include <iostream> 2 using namespace std; 3 4 int main() { 5 int a[10] = { 0 }; 6 for (int i = 0; i < 10; i++)cin >> a[i]; 7 //输出第一个数 8 for (int i = 0; i < 10; i++) { 9 if (a[i] != 0 && i != 0) { 10 cout << i; 11 a[i]--; 12 break; 13 } 14 } 15 for (int i = 0; i < 10; i++) { 16 while (a[i] != 0) { 17 cout << i; 18 a[i]--; 19 } 20 } 21 return 0; 22 }