結果
問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
ユーザー |
|
提出日時 | 2023-01-21 17:07:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 700 bytes |
コンパイル時間 | 156 ms |
コンパイル使用メモリ | 82,240 KB |
実行使用メモリ | 63,408 KB |
最終ジャッジ日時 | 2024-06-24 00:26:34 |
合計ジャッジ時間 | 2,508 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 WA * 4 |
ソースコード
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) if ans==0: print('0.0000000000') exit() ans = list(str(ans)) print(''.join(ans[:-10]+['.']+ans[-10:]))