結果

問題 No.3072 Sum of sqrt(x)
ユーザー Lisp_CoderLisp_Coder
提出日時 2023-07-21 23:32:00
言語 Ruby
(3.3.0)
結果
OLE  
実行時間 -
コード長 224 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 11,820 KB
実行使用メモリ 16,868 KB
最終ジャッジ日時 2023-10-21 23:34:00
合計ジャッジ時間 34,159 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
16,056 KB
testcase_01 AC 87 ms
16,056 KB
testcase_02 AC 88 ms
16,056 KB
testcase_03 AC 89 ms
16,052 KB
testcase_04 AC 87 ms
16,056 KB
testcase_05 AC 88 ms
16,056 KB
testcase_06 AC 89 ms
16,056 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 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:19: warning: assigned but unused variable - i
Syntax OK

ソースコード

diff #

def gi
  gets.chomp.to_i
end

def gm
  gets.chomp.split.map(&:to_i)
end

def gc
  gets.chomp
end

def gs
  gets.chomp.split
end

N = gi
ans = 0
for i in 0..N-1
  x = gi
  ans += Math.sqrt(x)
  puts sprintf("%.20f", ans)
end
0