結果
問題 | No.339 何人が回答したのか |
ユーザー |
|
提出日時 | 2016-01-29 22:25:20 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 26 ms / 1,000 ms |
コード長 | 285 bytes |
コンパイル時間 | 43 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 8,320 KB |
最終ジャッジ日時 | 2024-09-21 17:57:47 |
合計ジャッジ時間 | 3,130 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
ソースコード
# -*- 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