結果

問題 No.3072 Sum of sqrt(x)
ユーザー Lisp_CoderLisp_Coder
提出日時 2023-04-14 22:11:33
言語 Ruby
(3.3.0)
結果
OLE  
実行時間 -
コード長 209 bytes
コンパイル時間 871 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-04-18 19:40:38
合計ジャッジ時間 61,624 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
12,416 KB
testcase_01 AC 85 ms
12,160 KB
testcase_02 AC 87 ms
12,416 KB
testcase_03 AC 83 ms
12,160 KB
testcase_04 AC 86 ms
12,160 KB
testcase_05 AC 86 ms
12,288 KB
testcase_06 AC 85 ms
12,160 KB
testcase_07 OLE -
testcase_08 OLE -
testcase_09 OLE -
testcase_10 OLE -
testcase_11 OLE -
testcase_12 OLE -
testcase_13 OLE -
testcase_14 OLE -
testcase_15 OLE -
testcase_16 OLE -
testcase_17 OLE -
testcase_18 OLE -
testcase_19 OLE -
testcase_20 OLE -
testcase_21 OLE -
testcase_22 OLE -
testcase_23 OLE -
testcase_24 OLE -
testcase_25 OLE -
testcase_26 OLE -
testcase_27 OLE -
testcase_28 OLE -
testcase_29 OLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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
(1..n).each do |i|
  x = gi
  sum += Math.sqrt(x)
  puts format("%.20f", sum)
end
0