結果

問題 No.917 Make One With GCD
コンテスト
ユーザー n_bitand_n_per_3
提出日時 2026-07-20 18:37:15
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 359 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 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
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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)



0