結果

問題 No.339 何人が回答したのか
コンテスト
ユーザー roiti46
提出日時 2016-01-29 22:25:20
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 199 ms / 1,000 ms
コード長 285 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 150 ms
コンパイル使用メモリ 77,100 KB
最終ジャッジ日時 2025-12-03 19:07:35
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 61
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

def gcd(a, b):
    while b: a, b = b, a % b
    return a

N = int(raw_input())
A = [int(raw_input()) for i in xrange(N)]

g = A[0]
for a in A:
    g = gcd(a, g)

print sum(A)/g
0