結果
| 問題 | No.917 Make One With GCD |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-07-20 18:37:15 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 359 bytes |
| 記録 | |
| コンパイル時間 | 249 ms |
| コンパイル使用メモリ | 95,980 KB |
| 実行使用メモリ | 83,840 KB |
| 最終ジャッジ日時 | 2026-07-20 18:37:20 |
| 合計ジャッジ時間 | 4,671 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 32 |
ソースコード
from math import isqrt
def divsor(x):
arr = []
for i in range(1,isqrt(x)+1):
if x % i == 0:
arr.append(i)
if i*i != i:
arr.append(x//i)
return arr
N = int(input())
A = list(map(int,input().split()))
M = max(A)
S = set()
for a in A:
for d in divsor(a):
S.add(d)
S_arr = list(S)
S_arr.sort(reverse=True)
#print(S)