結果
| 問題 | No.81 すべて足すだけの簡単なお仕事です。 |
| コンテスト | |
| ユーザー |
nbisco
|
| 提出日時 | 2016-08-24 22:04:29 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 581 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 13,184 KB |
| 最終ジャッジ日時 | 2026-09-21 00:51:33 |
| 合計ジャッジ時間 | 2,577 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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