結果
問題 |
No.3159 Just Answer 10 Integers!
|
ユーザー |
|
提出日時 | 2025-05-15 22:57:38 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 35 ms / 2,000 ms |
コード長 | 459 bytes |
コンパイル時間 | 406 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 53,980 KB |
最終ジャッジ日時 | 2025-05-23 18:31:24 |
合計ジャッジ時間 | 1,231 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
from itertools import combinations from math import lcm n = int(input()) primes = [2, 3, 5, 7, 11, 13, 17, 19, 23] if n == 2: print(2, 4) else: a = 1 for i in range(n-1): a *= primes[i] ans = [a] for c in combinations(range(n-1), n-2): a = 1 for ci in c: a *= primes[ci] ans.append(a) print(*ans) # print(len(ans)) # lcms = [] # for i in range(n): # for j in range(i+1, n): # lcms.append(lcm(ans[i], ans[j])) # print(lcms)