結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー rlangevinrlangevin
提出日時 2023-02-28 08:56:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 1,176 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 71,604 KB
最終ジャッジ日時 2023-10-13 15:13:44
合計ジャッジ時間 4,444 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,332 KB
testcase_01 AC 63 ms
71,408 KB
testcase_02 AC 66 ms
71,204 KB
testcase_03 WA -
testcase_04 AC 66 ms
71,424 KB
testcase_05 AC 67 ms
71,236 KB
testcase_06 WA -
testcase_07 AC 72 ms
71,244 KB
testcase_08 AC 69 ms
71,072 KB
testcase_09 AC 67 ms
71,396 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 65 ms
71,152 KB
testcase_14 AC 67 ms
71,476 KB
testcase_15 AC 69 ms
71,380 KB
testcase_16 AC 70 ms
71,156 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 65 ms
71,236 KB
testcase_26 AC 66 ms
71,244 KB
testcase_27 WA -
testcase_28 AC 66 ms
71,156 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans = 0
for i in range(N):
    n = input()
    pm = 1
    if n[0] == "-":
        n = n[1:]
        pm = -1
    if "." in n:
        X, Y = n.split(".")
        ans += int(X) * 10 ** 10 * pm
        ans += int(Y + "0" * (10 - len(Y))) * pm
    else:
        ans += int(n) * 10 ** 10 * pm
    X = ans // (10 ** 10)
    Y = str(ans % (10 ** 10))
    Y += "0" * (10 - len(Y))
print(str(X) + "." + str(Y))
0