結果

問題 No.1528 Not 1
ユーザー rlangevinrlangevin
提出日時 2023-01-01 03:13:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 87,248 KB
実行使用メモリ 86,980 KB
最終ジャッジ日時 2023-08-17 23:00:23
合計ジャッジ時間 5,163 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,488 KB
testcase_01 AC 106 ms
85,824 KB
testcase_02 AC 94 ms
78,508 KB
testcase_03 AC 93 ms
79,360 KB
testcase_04 AC 106 ms
85,552 KB
testcase_05 AC 88 ms
76,640 KB
testcase_06 AC 100 ms
82,184 KB
testcase_07 AC 108 ms
85,876 KB
testcase_08 AC 96 ms
79,748 KB
testcase_09 AC 88 ms
77,476 KB
testcase_10 AC 94 ms
79,952 KB
testcase_11 AC 78 ms
71,592 KB
testcase_12 AC 79 ms
71,196 KB
testcase_13 AC 78 ms
71,152 KB
testcase_14 AC 80 ms
71,612 KB
testcase_15 AC 77 ms
71,444 KB
testcase_16 AC 78 ms
71,272 KB
testcase_17 AC 77 ms
71,152 KB
testcase_18 AC 107 ms
86,908 KB
testcase_19 AC 108 ms
86,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
if N == 1:
    print(1)
elif N == 3 or N == 5:
    print(-1)
elif N % 2:
    ans = []
    for i in range(2, N, 2):
        if i != 6:
            ans.append(i)
    ans.extend([6, 3])
    print(*ans)
else:
    ans = []
    for i in range(2, N + 1, 2):
        ans.append(i)
    print(*ans)
0