結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー rlangevinrlangevin
提出日時 2023-02-28 12:31:27
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 491 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 71,660 KB
最終ジャッジ日時 2023-10-13 19:07:09
合計ジャッジ時間 5,123 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,412 KB
testcase_01 AC 72 ms
71,524 KB
testcase_02 AC 72 ms
71,640 KB
testcase_03 AC 74 ms
71,384 KB
testcase_04 AC 75 ms
71,468 KB
testcase_05 AC 74 ms
71,368 KB
testcase_06 WA -
testcase_07 AC 73 ms
71,456 KB
testcase_08 AC 74 ms
71,200 KB
testcase_09 AC 74 ms
71,484 KB
testcase_10 WA -
testcase_11 AC 71 ms
71,536 KB
testcase_12 AC 73 ms
71,484 KB
testcase_13 AC 73 ms
71,228 KB
testcase_14 AC 71 ms
71,356 KB
testcase_15 AC 74 ms
71,416 KB
testcase_16 AC 73 ms
71,532 KB
testcase_17 AC 74 ms
71,356 KB
testcase_18 WA -
testcase_19 AC 74 ms
71,380 KB
testcase_20 AC 74 ms
71,540 KB
testcase_21 AC 75 ms
71,324 KB
testcase_22 AC 72 ms
71,416 KB
testcase_23 AC 76 ms
71,368 KB
testcase_24 AC 74 ms
71,428 KB
testcase_25 AC 73 ms
71,308 KB
testcase_26 AC 73 ms
71,320 KB
testcase_27 AC 72 ms
71,444 KB
testcase_28 AC 74 ms
71,540 KB
testcase_29 AC 78 ms
71,320 KB
権限があれば一括ダウンロードができます

ソースコード

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
flag = 0
if ans < 0:
    flag = 1
ans = abs(ans)
X = ans // (10 ** 10)
Y = str(ans % (10 ** 10))
Y += "0" * (10 - len(Y))
S = str(X) + "." + str(Y)
if flag:
    S = "-" + S
print(S)
0