結果
| 問題 | No.8072 Sum of sqrt(x) |
| ユーザー |
|
| 提出日時 | 2023-04-14 22:20:30 |
| 言語 | Ruby (4.0.6 + ACL) |
| 結果 |
OLE
不安定
|
| 実行時間 | - |
| コード長 | 244 bytes |
| 記録 | |
| コンパイル時間 | 67 ms |
| コンパイル使用メモリ | 8,576 KB |
| 実行使用メモリ | 14,592 KB |
| 最終ジャッジ日時 | 2026-09-13 05:51:46 |
| 合計ジャッジ時間 | 58,814 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 OLE * 23 |
コンパイルメッセージ
Syntax OK
ソースコード
def gi
gets.to_i
end
def gm
gets.split.map(&:to_i)
end
def gc
gets.chomp
end
def gf
gets.to_f
end
n = gi
sum = 0.0
result = []
n.times do
x = gi
sum += Math.sqrt(x)
result << sum
end
puts result.map { |x| format("%.20f", x) }