結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー Navier_Boltzmann
提出日時 2023-01-21 17:04:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 589 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 82,388 KB
実行使用メモリ 62,772 KB
最終ジャッジ日時 2024-06-24 00:24:46
合計ジャッジ時間 2,738 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

N = int(input())
ans = 0
for _ in range(N):
    
    X = list(input())[:-1]
    now = -1
    n = len(X)
    tmp = ''
    for i in range(n):
        if X[i]=='.':
            now = i
        else:
            tmp += X[i]
    if now==-1:
        X += ['0']*10
        ans += int(''.join(X))
    else:
        
        tmp += '0'*(10 - (n-1 - now))
        ans += int(tmp)

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