結果
問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
ユーザー |
![]() |
提出日時 | 2018-03-28 12:45:09 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 90 ms / 5,000 ms |
コード長 | 259 bytes |
コンパイル時間 | 35 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-07-22 16:41:04 |
合計ジャッジ時間 | 3,639 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
コンパイルメッセージ
Syntax OK
ソースコード
require 'bigdecimal' require 'bigdecimal/util' sum=(0.0000000000).to_d gets.to_i.times{ sum+=gets.to_d } s=sum.floor(10).to_s("f") if s.index(".")==nil puts s+".0000000000" else t=10-(s.size-s.index(".")-1) if t>0 puts s+"0"*(t) else puts s end end