結果

問題 No.796 well known
ユーザー takakintakakin
提出日時 2020-04-18 15:51:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 13,196 KB
最終ジャッジ日時 2024-04-14 20:57:24
合計ジャッジ時間 2,676 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,752 KB
testcase_01 AC 33 ms
10,880 KB
testcase_02 AC 34 ms
10,624 KB
testcase_03 AC 31 ms
10,752 KB
testcase_04 AC 73 ms
12,612 KB
testcase_05 AC 77 ms
12,932 KB
testcase_06 AC 88 ms
13,196 KB
testcase_07 AC 44 ms
11,264 KB
testcase_08 AC 77 ms
12,928 KB
testcase_09 AC 60 ms
12,184 KB
testcase_10 AC 85 ms
13,192 KB
testcase_11 AC 40 ms
11,136 KB
testcase_12 AC 58 ms
11,852 KB
testcase_13 AC 71 ms
12,612 KB
testcase_14 AC 49 ms
11,768 KB
testcase_15 AC 58 ms
11,880 KB
testcase_16 AC 86 ms
13,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
if (n-1)%3==0:
  Ans=[2]+[1]*(n-2)+[3]
elif (n-1)%3==1:
  Ans=[1]*(n-1)+[3]
else:
  Ans=[2]*2+[1]*(n-3)+[3]
print(*Ans)
0