結果

問題 No.1528 Not 1
ユーザー lloyzlloyz
提出日時 2021-12-16 22:08:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 330 bytes
コンパイル時間 807 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 13,688 KB
最終ジャッジ日時 2023-10-11 21:37:53
合計ジャッジ時間 3,145 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,916 KB
testcase_01 AC 60 ms
12,872 KB
testcase_02 AC 30 ms
9,892 KB
testcase_03 AC 36 ms
10,192 KB
testcase_04 AC 58 ms
12,904 KB
testcase_05 AC 22 ms
8,884 KB
testcase_06 AC 44 ms
11,152 KB
testcase_07 AC 62 ms
13,028 KB
testcase_08 AC 37 ms
10,392 KB
testcase_09 AC 25 ms
9,160 KB
testcase_10 AC 39 ms
10,384 KB
testcase_11 AC 15 ms
7,776 KB
testcase_12 AC 15 ms
7,860 KB
testcase_13 AC 15 ms
7,860 KB
testcase_14 AC 15 ms
7,892 KB
testcase_15 AC 15 ms
7,716 KB
testcase_16 AC 15 ms
7,796 KB
testcase_17 AC 15 ms
7,804 KB
testcase_18 AC 67 ms
13,668 KB
testcase_19 AC 67 ms
13,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
if n == 1:
    print(1)
elif n == 3 or n == 5:
    print(-1)
elif n >= 7 and n % 2 == 1:
    num = (n + 1) // 2
    num -= 4
    ans = [3, 6, 2, 4]
    ans += [2 * (i + 4) for i in range(num)]
    print(*ans)
else:
    num = (n + 1) // 2
    ans = [2 * (i + 1) for i in range(num)]
    print(*ans)
0