結果

問題 No.339 何人が回答したのか
ユーザー rocoder
提出日時 2017-07-08 07:45:30
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 441 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-06 18:30:12
合計ジャッジ時間 3,422 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 61
権限があれば一括ダウンロードができます

ソースコード

diff #

# your code goes here
#339 how many people answer
#if difference is 0
def gcd(a,b):
    if a>b:
        m=a
        t=b
    else:
        m=b
        t=a
    r=m%t
    while r!=0:
        m=t
        t=r
        r=m%t
    return t
N=int(input())
A=[int(input())for i in range(N)]
g=gcd(A[0],A[1])
#rint (g)
i=2
while i<N:
    g=gcd(g,A[i])
#    print (g)
    i+=1
a=0
for i in range (N):
  #  print(i)
    a+=A[i]//g
   # print (a)
print (a)
0