結果
| 問題 | No.3159 Just Answer 10 Integers! | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-05-24 00:32:23 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 272 bytes | 
| コンパイル時間 | 487 ms | 
| コンパイル使用メモリ | 82,044 KB | 
| 実行使用メモリ | 76,508 KB | 
| 最終ジャッジ日時 | 2025-05-24 00:32:26 | 
| 合計ジャッジ時間 | 2,885 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 2 WA * 7 | 
ソースコード
from math import*
from itertools import*
n=int(input())
s=[1,2,3,4,6,8,9,12,16,18,24,27,36,48,54,72,81]
m=1<<60
for cs in combinations(s,n):
  t=set()
  for i in cs:
    for j in cs:
      if i!=j:
        t.add(lcm(i,j))
  if m>len(t):
    m=len(t)
    ans=cs
print(*ans)
            
            
            
        