/* -*- coding: utf-8 -*- * * 1628.cc: No.1628 Sorting Integers (MAX of M) - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 9; /* typedef */ /* global variables */ int cs[10]; /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); for (int i = 1; i <= 9; i++) scanf("%d", cs + i); for (int i = 9; i >= 1; i--) while (cs[i]--) putchar('0' + i); putchar('\n'); return 0; }