結果

問題 No.796 well known
ユーザー AT274_
提出日時 2019-10-25 20:35:30
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 13,200 KB
最終ジャッジ日時 2024-07-22 06:46:23
合計ジャッジ時間 2,156 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

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