結果

問題 No.1528 Not 1
ユーザー uir0uir0
提出日時 2021-06-04 22:37:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 10,780 KB
実行使用メモリ 14,532 KB
最終ジャッジ日時 2023-08-12 15:42:56
合計ジャッジ時間 2,567 ms
ジャッジサーバーID
(参考情報)
judge8 / judge9
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,832 KB
testcase_01 AC 53 ms
13,660 KB
testcase_02 AC 28 ms
9,928 KB
testcase_03 AC 32 ms
10,648 KB
testcase_04 AC 53 ms
13,604 KB
testcase_05 AC 21 ms
9,132 KB
testcase_06 AC 40 ms
11,760 KB
testcase_07 AC 54 ms
13,800 KB
testcase_08 AC 33 ms
10,860 KB
testcase_09 AC 23 ms
9,412 KB
testcase_10 AC 35 ms
10,936 KB
testcase_11 AC 16 ms
7,792 KB
testcase_12 AC 15 ms
7,788 KB
testcase_13 AC 16 ms
7,832 KB
testcase_14 AC 16 ms
7,756 KB
testcase_15 AC 15 ms
7,976 KB
testcase_16 AC 15 ms
7,820 KB
testcase_17 AC 15 ms
7,860 KB
testcase_18 AC 59 ms
14,380 KB
testcase_19 AC 62 ms
14,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(N):
    if N == 1:
        return [1]

    if N == 3 or N == 5:
        return [-1]

    if N%2 == 0:
        return list(range(2, N+1, 2))

    res = [2, 4] + list(range(8, N, 2)) + [6, 3]
    return res

import sys
input = sys.stdin.readline

def main():
    N = int(input())
    res = solve(N)
    print(*res, sep = " ")

if __name__ == "__main__":
    main()
0