【Basic Level】
*1023
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <iomanip>
#include <cctype>
#include <vector>
using namespace std;
int main()
{
int a[10] = {};
int n = 0;
while (n < 10)
{
cin >> a[n];
++n;
}
if (a[0] != 0)
{
n = 1;
while (n < 10)
{
if (a[n] != 0)
{
break;
}
++n;
}
cout << n;
--a[n];
while (a[0]--)
{
cout << 0;
}
for (int j = n; j < 10; j++)
{
while (a[j]--)
{
cout << j;
}
}
}
else
{
for (int j = 1; j < 10; j++)
{
while (a[j]--)
{
cout << j;
}
}
}
cout << endl;
//system("pause");
return 0;
}