結果
問題 |
No.339 何人が回答したのか
|
ユーザー |
![]() |
提出日時 | 2020-05-03 18:23:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 1,000 ms |
コード長 | 214 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-13 03:39:37 |
合計ジャッジ時間 | 3,819 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() n=int(input()) def gcd(a,b): while b: a,b=b,a%b return a a=int(input()) ans=a for _ in range(n-1): b=int(input()) ans+=b a=gcd(a,b) print(ans//a)