結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー rodea
提出日時 2021-01-06 17:41:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 577 bytes
コンパイル時間 327 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-07 03:02:44
合計ジャッジ時間 2,282 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = 0
for i in range(n):
    a = input()
    
    point = a.find('.')
    
    if point == -1:
        a = int(a) * (10 ** 10)
    else:
        if a[0] == '-':
            head = a[1:point]
            tail = a[point+1:]
            a = int(head) * (10 ** 10) + int(tail) * (10 ** (10 - len(tail)))
            a *= -1
        else:
            head = a[0:point]
            tail = a[point+1:]
            a = int(head) * (10 ** 10) + int(tail) * (10 ** (10 - len(tail)))
    
    ans += a

ans = str(ans)
print(ans[0:len(ans)-10] + '.' + ans[len(ans)-10:])
0