結果

問題 No.1528 Not 1
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-06-04 20:06:45
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 399 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 87,004 KB
最終ジャッジ日時 2023-08-12 08:38:16
合計ジャッジ時間 3,692 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,644 KB
testcase_01 AC 89 ms
81,032 KB
testcase_02 AC 83 ms
77,624 KB
testcase_03 AC 81 ms
77,684 KB
testcase_04 AC 94 ms
85,288 KB
testcase_05 AC 79 ms
76,568 KB
testcase_06 AC 83 ms
78,512 KB
testcase_07 AC 91 ms
81,144 KB
testcase_08 AC 84 ms
79,900 KB
testcase_09 AC 80 ms
77,276 KB
testcase_10 AC 81 ms
77,892 KB
testcase_11 AC 70 ms
71,580 KB
testcase_12 AC 69 ms
71,408 KB
testcase_13 AC 69 ms
71,412 KB
testcase_14 AC 69 ms
71,444 KB
testcase_15 AC 71 ms
71,560 KB
testcase_16 AC 68 ms
71,140 KB
testcase_17 AC 68 ms
71,144 KB
testcase_18 AC 91 ms
81,656 KB
testcase_19 AC 97 ms
87,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

Nが偶数 = 2k なら、簡単
奇数なら、3,6…,2,4,8,///

"""

import sys
from sys import stdin

N = int(stdin.readline())

if N == 1:
    print (1)
elif N == 3:
    print (-1)
elif N == 5:
    print (-1)
elif N % 2 == 0:
    ans = [2*i for i in range(1,N//2+1)]
    print (*ans)
else:
    ans = [3,6,2,4]

    while len(ans) < (N+1)//2:
        ans.append(2*len(ans))

    print (*ans)
0