結果

問題 No.1528 Not 1
ユーザー brthyyjpbrthyyjp
提出日時 2021-06-06 16:18:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 326 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 87,260 KB
実行使用メモリ 87,832 KB
最終ジャッジ日時 2023-08-14 22:05:18
合計ジャッジ時間 4,002 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,568 KB
testcase_01 AC 92 ms
86,132 KB
testcase_02 AC 85 ms
78,592 KB
testcase_03 AC 85 ms
79,568 KB
testcase_04 AC 96 ms
86,200 KB
testcase_05 AC 80 ms
76,640 KB
testcase_06 AC 90 ms
82,496 KB
testcase_07 AC 95 ms
86,572 KB
testcase_08 AC 84 ms
79,792 KB
testcase_09 AC 79 ms
77,540 KB
testcase_10 AC 83 ms
80,316 KB
testcase_11 AC 69 ms
71,272 KB
testcase_12 AC 69 ms
71,516 KB
testcase_13 AC 70 ms
71,256 KB
testcase_14 AC 66 ms
71,284 KB
testcase_15 AC 67 ms
71,508 KB
testcase_16 AC 68 ms
71,328 KB
testcase_17 AC 66 ms
71,284 KB
testcase_18 AC 98 ms
87,664 KB
testcase_19 AC 98 ms
87,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
if n == 1:
    print(1)
    exit()
A = []
x = -1
for i in range(1, n+1):
    if i%2 == 0:
        A.append(i)
        if (i//2)%2 == 1:
            x = i//2
#print(A)
if x != -1:
    A.remove(2*x)
    A.append(2*x)
    A.append(x)
A = A[0:(n+1)//2]
if A[-1] == 1:
    print(-1)
    exit()
else:
    print(*A)
0