結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー 👑 rin204rin204
提出日時 2022-07-04 14:08:39
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 355 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 71,528 KB
最終ジャッジ日時 2023-09-29 23:02:19
合計ジャッジ時間 3,159 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,300 KB
testcase_01 AC 63 ms
71,216 KB
testcase_02 AC 59 ms
71,244 KB
testcase_03 AC 59 ms
71,352 KB
testcase_04 AC 59 ms
71,260 KB
testcase_05 AC 61 ms
71,268 KB
testcase_06 AC 58 ms
71,328 KB
testcase_07 AC 60 ms
71,268 KB
testcase_08 AC 59 ms
71,224 KB
testcase_09 AC 60 ms
71,264 KB
testcase_10 AC 59 ms
71,064 KB
testcase_11 AC 58 ms
71,128 KB
testcase_12 AC 61 ms
71,300 KB
testcase_13 AC 60 ms
71,424 KB
testcase_14 AC 59 ms
71,404 KB
testcase_15 AC 65 ms
71,416 KB
testcase_16 AC 62 ms
71,440 KB
testcase_17 AC 61 ms
71,292 KB
testcase_18 AC 60 ms
71,268 KB
testcase_19 AC 60 ms
71,232 KB
testcase_20 AC 59 ms
71,428 KB
testcase_21 AC 59 ms
71,028 KB
testcase_22 AC 63 ms
71,464 KB
testcase_23 AC 59 ms
71,476 KB
testcase_24 AC 60 ms
71,476 KB
testcase_25 AC 60 ms
71,224 KB
testcase_26 AC 59 ms
71,176 KB
testcase_27 AC 64 ms
71,200 KB
testcase_28 AC 61 ms
71,284 KB
testcase_29 AC 61 ms
71,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
tot = 0
for _ in range(n):
    S = input()
    try:
        ind = S.index(".")
    except:
        ind = len(S)
    S = S[:ind] + S[ind+1:].ljust(10, "0")
    tot += int(S)
tot = str(tot)
minus = False
if tot[0] == "-":
    minus = True
    tot = tot[1:]
tot = tot.zfill(11)
if minus:
    tot = "-" + tot
print(f"{tot[:-10]}.{tot[-10:]}")
0