#include<math.h>
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
int times, notzero=-1, alltimes, index = 0;
char number[60] = { 0 };
for (int i = 0; i < 10; i++)
{
scanf("%d", &alltimes);
times = 0;
while (times != alltimes)
{
if (i == 0) notzero = index;
number[index] = 48 + i;
index++; times++;
}
}
if (notzero != -1)
{
int tmp = number[notzero + 1];
number[notzero + 1] = number[0];
number[0] = tmp;
}
for (int i = 0; i <index; i++)
printf("%c", number[i]);
return 0;
}
浙大PAT乙级1023 组个最小数
最新推荐文章于 2022-08-02 15:44:22 发布