結果
問題 | No.1528 Not 1 |
ユーザー |
![]() |
提出日時 | 2021-06-04 20:36:38 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 76 ms / 2,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 454 ms |
コンパイル使用メモリ | 82,416 KB |
実行使用メモリ | 95,896 KB |
最終ジャッジ日時 | 2024-11-19 09:39:26 |
合計ジャッジ時間 | 3,018 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 19 |
ソースコード
import sys from math import gcd input = sys.stdin.readline N = int(input()) if N == 1: print(1) exit(0) if N == 2: print(1) exit(0) res = [i * 2 for i in range(1, -(-N // 2))] s = set(res) for i in range(1, N + 1): if i in s: continue if gcd(i, res[-1]) > 1: res.append(i) print(*res) break else: print(-1)