結果

問題 No.1628 Sorting Integers (MAX of M)
ユーザー 👑 ygussany
提出日時 2021-07-30 20:32:15
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 28,928 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-15 22:23:04
合計ジャッジ時間 627 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main()
{
	int i, j, N, c[10];
	long long x;
	scanf("%d", &N);
	for (i = 1; i <= 9; i++) scanf("%d", &(c[i]));
	for (i = 9, x = 0; i >= 1; i--) for (j = 1; j <= c[i]; j++) x = x * 10 + i;
	printf("%lld\n", x);
	fflush(stdout);
	return 0;
}
0