結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-01-21 17:06:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 652 bytes
コンパイル時間 260 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 77,792 KB
最終ジャッジ日時 2023-09-06 05:44:37
合計ジャッジ時間 4,467 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
73,248 KB
testcase_01 AC 95 ms
72,992 KB
testcase_02 AC 97 ms
72,940 KB
testcase_03 AC 103 ms
72,812 KB
testcase_04 AC 95 ms
73,036 KB
testcase_05 AC 98 ms
73,276 KB
testcase_06 AC 99 ms
77,792 KB
testcase_07 AC 98 ms
77,784 KB
testcase_08 AC 99 ms
77,712 KB
testcase_09 AC 99 ms
77,652 KB
testcase_10 WA -
testcase_11 AC 97 ms
72,980 KB
testcase_12 AC 99 ms
72,968 KB
testcase_13 AC 95 ms
73,212 KB
testcase_14 AC 97 ms
73,036 KB
testcase_15 AC 98 ms
73,268 KB
testcase_16 AC 98 ms
72,920 KB
testcase_17 WA -
testcase_18 AC 93 ms
73,160 KB
testcase_19 AC 97 ms
72,972 KB
testcase_20 AC 97 ms
73,100 KB
testcase_21 AC 94 ms
72,912 KB
testcase_22 AC 97 ms
72,976 KB
testcase_23 AC 95 ms
73,040 KB
testcase_24 AC 95 ms
73,092 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 96 ms
73,012 KB
testcase_29 AC 97 ms
73,064 KB
権限があれば一括ダウンロードができます

ソースコード

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:
            if (X[i]=='0')&(tmp==''):
                continue
            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