結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー h_nosonh_noson
提出日時 2017-01-26 01:37:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 450 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 10,756 KB
実行使用メモリ 8,732 KB
最終ジャッジ日時 2023-08-24 23:15:11
合計ジャッジ時間 1,870 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,544 KB
testcase_01 AC 20 ms
8,540 KB
testcase_02 AC 20 ms
8,616 KB
testcase_03 AC 20 ms
8,708 KB
testcase_04 AC 20 ms
8,480 KB
testcase_05 AC 20 ms
8,552 KB
testcase_06 AC 20 ms
8,544 KB
testcase_07 AC 19 ms
8,480 KB
testcase_08 AC 20 ms
8,708 KB
testcase_09 AC 20 ms
8,548 KB
testcase_10 WA -
testcase_11 AC 20 ms
8,688 KB
testcase_12 AC 20 ms
8,524 KB
testcase_13 AC 20 ms
8,560 KB
testcase_14 AC 20 ms
8,540 KB
testcase_15 AC 20 ms
8,636 KB
testcase_16 AC 20 ms
8,552 KB
testcase_17 WA -
testcase_18 AC 21 ms
8,620 KB
testcase_19 AC 20 ms
8,640 KB
testcase_20 AC 20 ms
8,544 KB
testcase_21 AC 19 ms
8,712 KB
testcase_22 AC 20 ms
8,524 KB
testcase_23 AC 21 ms
8,472 KB
testcase_24 AC 20 ms
8,576 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 20 ms
8,560 KB
testcase_29 AC 20 ms
8,652 KB
権限があれば一括ダウンロードができます

ソースコード

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 = str(reduce(lambda x,y:x+y,[convert(input()) for i in range(n)]))
print(ans[:-10] + '.' + ans[-10:])
0