代码实现
#include <bits/stdc++.h>
using namespace std;
int a[10];
int main()
{
for (int i = 0; i < 10; i++) scanf("%d", &a[i]);
if (!a[0])
{
for (int i = 0; i < 10; i++) while (a[i]--) cout << i;
}
else
{
int i;
for (i = 1; i < 10; i++)
{
if (a[i])
{
cout << i;
a[i]--;
break;
}
}
while (a[0]--) cout << 0;
for (; i < 10; i++) while (a[i]--) cout << i;
}
return 0;
}