結果

問題 No.1528 Not 1
ユーザー ayaoniayaoni
提出日時 2021-06-04 20:06:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 767 bytes
コンパイル時間 821 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 87,144 KB
最終ジャッジ日時 2023-08-12 08:37:37
合計ジャッジ時間 4,352 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,324 KB
testcase_01 AC 91 ms
81,104 KB
testcase_02 AC 81 ms
77,560 KB
testcase_03 AC 82 ms
77,888 KB
testcase_04 AC 94 ms
85,864 KB
testcase_05 AC 78 ms
76,664 KB
testcase_06 AC 85 ms
78,176 KB
testcase_07 AC 93 ms
81,536 KB
testcase_08 AC 84 ms
79,400 KB
testcase_09 AC 79 ms
77,244 KB
testcase_10 AC 85 ms
78,136 KB
testcase_11 AC 70 ms
71,276 KB
testcase_12 AC 70 ms
71,284 KB
testcase_13 AC 70 ms
71,444 KB
testcase_14 AC 68 ms
71,484 KB
testcase_15 AC 70 ms
71,408 KB
testcase_16 AC 70 ms
71,084 KB
testcase_17 AC 70 ms
71,260 KB
testcase_18 AC 94 ms
81,856 KB
testcase_19 AC 99 ms
87,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N = I()
if N % 2 == 0:
    ANS = [i for i in range(2,N+1,2)]
    print(*ANS)
else:
    if N == 1:
        print(1)
    elif N == 3 or N == 5:
        print(-1)
    else:
        ANS = [3,6,2,4]
        cur = 8
        for _ in range((N+1)//2-4):
            ANS.append(cur)
            cur += 2
        print(*ANS)
0