結果

問題 No.796 well known
ユーザー AT274_AT274_
提出日時 2019-10-25 20:35:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 10,796 KB
最終ジャッジ日時 2023-09-29 12:25:18
合計ジャッジ時間 2,212 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,780 KB
testcase_01 AC 16 ms
7,800 KB
testcase_02 AC 16 ms
7,768 KB
testcase_03 AC 16 ms
7,848 KB
testcase_04 AC 44 ms
9,952 KB
testcase_05 AC 48 ms
10,364 KB
testcase_06 AC 54 ms
10,756 KB
testcase_07 AC 24 ms
8,892 KB
testcase_08 AC 47 ms
10,260 KB
testcase_09 AC 36 ms
9,568 KB
testcase_10 AC 53 ms
10,676 KB
testcase_11 AC 21 ms
8,484 KB
testcase_12 AC 32 ms
9,272 KB
testcase_13 AC 43 ms
10,032 KB
testcase_14 AC 28 ms
9,132 KB
testcase_15 AC 34 ms
9,548 KB
testcase_16 AC 54 ms
10,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

if (N - 1 + 3) % 3 == 0:
    print(*([3] + [2] + [1] * (N - 2)), sep=' ')

elif (N - 1 + 3) % 3 == 1:
    print(*([3] + [1] * (N - 1)), sep=' ')

else:
    print(*([3] + [2] + [2] + [1] * (N - 3)), sep=' ')
0