結果

問題 No.917 Make One With GCD
ユーザー pluto77
提出日時 2019-11-08 09:35:56
言語 Python2
(2.7.18)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 229 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 8,320 KB
最終ジャッジ日時 2024-06-24 11:10:47
合計ジャッジ時間 2,453 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki917

import collections
import copy
import fractions

n=int(raw_input())
a=map(int,raw_input().split())
c=collections.Counter()
c[0]=1
for x in a:
 c2=copy.deepcopy(c)
 for y in c2:
  c[fractions.gcd(y,x)]+=c2[y]
print c[1]
0