結果
| 問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
| コンテスト | |
| ユーザー |
nbisco
|
| 提出日時 | 2016-08-24 22:04:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 581 bytes |
| コンパイル時間 | 230 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-08 02:11:14 |
| 合計ジャッジ時間 | 1,979 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 19 RE * 2 |
ソースコード
N = int(input())
d_total = 0
f_total = 0
for i in range(N):
s = input().strip().split(".")
d = int(s[0])
if len(s) == 2:
f = int(s[1])*(10**(10-len(s[1])))
else:
f = 0
if "-" in s[0]:
f *= -1
d_total += d
f_total += f
total = str(d_total * 10**10 + f_total)
key = len(total)-9
for idx, i in enumerate(total[len(total)-10::-1]):
if i != "0":
key -= idx
break
if key == 0:
d_total = 0
else:
d_total = int("".join(total[0:key]))
f_total = int(total[len(total)-10:])
print("%d.%010d"%(d_total, f_total))
nbisco