結果

問題 No.796 well known
ユーザー knk_keiknk_kei
提出日時 2021-02-03 01:28:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 10,464 KB
実行使用メモリ 8,384 KB
最終ジャッジ日時 2023-09-12 11:33:43
合計ジャッジ時間 1,704 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,956 KB
testcase_01 AC 15 ms
7,952 KB
testcase_02 AC 16 ms
7,816 KB
testcase_03 AC 14 ms
7,800 KB
testcase_04 AC 16 ms
8,176 KB
testcase_05 AC 16 ms
8,264 KB
testcase_06 AC 16 ms
8,384 KB
testcase_07 AC 15 ms
7,864 KB
testcase_08 AC 16 ms
8,308 KB
testcase_09 AC 15 ms
8,380 KB
testcase_10 AC 15 ms
8,300 KB
testcase_11 AC 15 ms
7,824 KB
testcase_12 AC 16 ms
8,248 KB
testcase_13 AC 16 ms
8,272 KB
testcase_14 AC 15 ms
8,176 KB
testcase_15 AC 15 ms
8,188 KB
testcase_16 AC 15 ms
8,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
"""
長さNの整数列の構築
3で割ったあまりの和が1
どれか1つは3の倍数
できるだけ小さくしてね
31212...でつなげるといけそう 
nが奇数なら3を一個増やす
"""
if n % 2:
    print("3 " * 2 + "1 2 " * ((n - 2) // 2) + "1")
else:
    print("3 " + "1 2 " * ((n - 2) // 2) + "1")
0