結果

問題 No.796 well known
ユーザー c-yanc-yan
提出日時 2020-08-08 00:05:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 11,708 KB
実行使用メモリ 12,312 KB
最終ジャッジ日時 2023-10-25 06:24:00
合計ジャッジ時間 1,978 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,980 KB
testcase_01 AC 28 ms
9,980 KB
testcase_02 AC 29 ms
9,980 KB
testcase_03 AC 28 ms
9,980 KB
testcase_04 AC 61 ms
11,852 KB
testcase_05 AC 65 ms
11,916 KB
testcase_06 AC 70 ms
12,312 KB
testcase_07 AC 38 ms
10,644 KB
testcase_08 AC 65 ms
11,920 KB
testcase_09 AC 52 ms
11,420 KB
testcase_10 AC 70 ms
11,776 KB
testcase_11 AC 34 ms
10,468 KB
testcase_12 AC 47 ms
11,080 KB
testcase_13 AC 60 ms
11,316 KB
testcase_14 AC 43 ms
10,732 KB
testcase_15 AC 49 ms
11,112 KB
testcase_16 AC 71 ms
12,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

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