結果

問題 No.81 すべて足すだけの簡単なお仕事です。
コンテスト
ユーザー nari11111
提出日時 2014-11-28 00:52:01
言語 PyPy2
(7.3.15)
結果
RE  
実行時間 -
コード長 723 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 150 ms
コンパイル使用メモリ 77,860 KB
最終ジャッジ日時 2025-12-03 13:19:19
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 11 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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))
0