mirror of
https://github.com/xlucn/PAT.git
synced 2026-10-03 00:23:15 +08:00
21 lines
366 B
C
21 lines
366 B
C
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
int zero, nonzero;
|
|
|
|
scanf("%d", &zero);
|
|
for(int i = 1; i < 10; i++)
|
|
{
|
|
scanf("%d", &nonzero);
|
|
while(nonzero--)
|
|
{
|
|
putchar('0' + i);
|
|
for(; zero; zero--) /* after the first non-zero, print all the zeros */
|
|
putchar('0');
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|