結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー raven7959raven7959
提出日時 2022-08-28 17:37:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 364 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 82,636 KB
実行使用メモリ 54,092 KB
最終ジャッジ日時 2024-04-23 15:15:32
合計ジャッジ時間 2,470 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,996 KB
testcase_01 AC 39 ms
52,132 KB
testcase_02 AC 43 ms
52,576 KB
testcase_03 AC 39 ms
52,276 KB
testcase_04 AC 39 ms
53,636 KB
testcase_05 AC 39 ms
53,504 KB
testcase_06 AC 39 ms
52,880 KB
testcase_07 AC 39 ms
52,208 KB
testcase_08 AC 42 ms
52,568 KB
testcase_09 AC 39 ms
53,212 KB
testcase_10 WA -
testcase_11 AC 39 ms
52,820 KB
testcase_12 AC 38 ms
52,696 KB
testcase_13 AC 38 ms
52,888 KB
testcase_14 AC 38 ms
52,796 KB
testcase_15 AC 39 ms
53,204 KB
testcase_16 AC 37 ms
52,008 KB
testcase_17 WA -
testcase_18 AC 40 ms
54,092 KB
testcase_19 AC 38 ms
53,012 KB
testcase_20 AC 37 ms
53,216 KB
testcase_21 AC 37 ms
53,220 KB
testcase_22 AC 38 ms
53,104 KB
testcase_23 AC 39 ms
52,392 KB
testcase_24 AC 39 ms
52,528 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 38 ms
53,504 KB
testcase_29 AC 37 ms
52,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
ans=0
for _ in range(N):
    L=list(input().split("."))
    if len(L)==1:
        L.append("0")
    b=1
    if L[0][0]=="-":
        b=-1
        L[0]=L[0][1:]
    while len(L[1])<10:
        L[1]+="0"
    for i in range(2):
        L[i]=int(L[i])*b
    ans+=L[0]*10000000000
    ans+=L[1]
ans=str(ans)
print(ans[:len(ans)-10]+"."+ans[len(ans)-10:])
0