結果
問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
ユーザー |
![]() |
提出日時 | 2014-11-28 00:52:01 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 723 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-01-03 09:55:30 |
合計ジャッジ時間 | 1,700 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 11 RE * 1 |
ソースコード
import math n = int(raw_input()) seisu = 0 syousu = 0.0 for i in xrange(n): inp = raw_input() if "." in inp: sp = inp.split(".") seisu+=int(sp[0]) if sp[0][0]=="-": syousu-=round(float("0."+sp[1]),10) else: syousu+=round(float("0."+sp[1]),10) # print syousu else: seisu+=int(inp) # s = round(s+float(raw_input()),10) # print seisu # print str(syousu).split(".")[0] print str(seisu+int(str(syousu).split(".")[0]))+"."+"{0:.10f}".format(syousu).split(".")[1] # print "{0:.10f}".format(s) # print math.modf(round(99999999.999999999,10)) # print "{0:.10f}".format(round(1.00000000-0.999999999,10))