結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー h_noson
提出日時 2017-01-26 01:21:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 459 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-23 09:46:48
合計ジャッジ時間 2,183 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

from functools import reduce

def convert(x):
    s = x.split('.')
    if len(s) == 2:
        while len(s[1]) < 10:
            s[1] += '0'
        if s[0][0] == '-':
            return int(s[0]) * 10**10 - int(s[1])
        else:
            return int(s[0]) * 10**10 + int(s[1])
    else:
        return int(s[0]) * 10**10

n = int(input())
ans = reduce(lambda x,y:x+y,[convert(input()) for i in range(n)])
print("%d.%010d" % (ans // 10**10, ans % 10**10))
0