結果
| 問題 | No.339 何人が回答したのか |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2018-03-13 20:40:53 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 106 ms / 1,000 ms |
| コード長 | 122 bytes |
| コンパイル時間 | 297 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-11-23 17:05:04 |
| 合計ジャッジ時間 | 8,460 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 61 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n=gets.to_i
m=gets.to_i
as=[m]
STDIN.each_line{|e|
as<<e.to_i
m=(e.to_i).gcd(m)
}
ans=0
as.each{|e|
ans+=e/m
}
puts ans
horiesiniti