結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー brthyyjpbrthyyjp
提出日時 2021-09-12 01:24:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 202 ms / 5,000 ms
コード長 359 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 90,920 KB
最終ジャッジ日時 2023-09-29 23:00:52
合計ジャッジ時間 9,054 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 186 ms
88,680 KB
testcase_01 AC 184 ms
88,980 KB
testcase_02 AC 178 ms
88,952 KB
testcase_03 AC 174 ms
88,604 KB
testcase_04 AC 180 ms
88,708 KB
testcase_05 AC 185 ms
88,816 KB
testcase_06 AC 182 ms
88,872 KB
testcase_07 AC 184 ms
88,776 KB
testcase_08 AC 178 ms
88,704 KB
testcase_09 AC 186 ms
90,920 KB
testcase_10 AC 186 ms
88,696 KB
testcase_11 AC 177 ms
88,748 KB
testcase_12 AC 177 ms
89,012 KB
testcase_13 AC 178 ms
88,956 KB
testcase_14 AC 176 ms
88,932 KB
testcase_15 AC 179 ms
88,748 KB
testcase_16 AC 176 ms
88,880 KB
testcase_17 AC 182 ms
89,036 KB
testcase_18 AC 181 ms
88,976 KB
testcase_19 AC 175 ms
88,960 KB
testcase_20 AC 202 ms
88,916 KB
testcase_21 AC 194 ms
88,744 KB
testcase_22 AC 187 ms
89,004 KB
testcase_23 AC 181 ms
89,000 KB
testcase_24 AC 182 ms
88,960 KB
testcase_25 AC 181 ms
88,704 KB
testcase_26 AC 178 ms
89,004 KB
testcase_27 AC 179 ms
88,728 KB
testcase_28 AC 179 ms
88,840 KB
testcase_29 AC 180 ms
88,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import *
getcontext().prec = 200
n = int(input())
ans = 0
for i in range(n):
    a = str(input())
    a = Decimal(a)
    ans += a
ans = str(ans)
ans = ans.split('.')
if len(ans) == 1:
    print(ans[0]+'.'+'0'*10)
else:
    x, y = ans
    if len(y) >= 10:
        ans = x+'.'+y[0:10]
    else:
        ans = x+'.'+y+'0'*(10-len(y))
    print(ans)
0