結果

問題 No.1528 Not 1
ユーザー minimumminimum
提出日時 2021-06-04 20:17:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 544 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 70,016 KB
最終ジャッジ日時 2024-04-29 23:30:05
合計ジャッジ時間 3,762 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 58 ms
68,224 KB
testcase_02 AC 53 ms
61,568 KB
testcase_03 AC 52 ms
62,592 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 54 ms
64,640 KB
testcase_07 AC 58 ms
68,480 KB
testcase_08 WA -
testcase_09 AC 49 ms
60,416 KB
testcase_10 AC 52 ms
63,232 KB
testcase_11 AC 42 ms
51,840 KB
testcase_12 AC 40 ms
51,840 KB
testcase_13 AC 43 ms
52,224 KB
testcase_14 WA -
testcase_15 AC 41 ms
51,968 KB
testcase_16 AC 42 ms
51,712 KB
testcase_17 AC 42 ms
51,840 KB
testcase_18 AC 60 ms
69,888 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = []
if n%2 == 0:
    for i in range(1,n//2 + 1):
        a.append(str(2*i))
    print(" ".join(a))
elif n == 1:
    print(1)
elif n == 3 or n == 5:
    print(-1)
else:
    k = n - 1
    while k%2 == 0:
        k//=2
    if k == 1:
        a.append("3")
        a.append("6")
        for i in range(1,n//2 + 1):
            if i != 3:
                a.append(str(2*i))
        print(" ".join(a))
    else:
        for i in range(1,n//2 + 1):
            a.append(str(2*i))
        a.append(str(n))
        print(" ".join(a))
0