結果
| 問題 | No.81 すべて足すだけの簡単なお仕事です。 |
| コンテスト | |
| ユーザー |
nbisco
|
| 提出日時 | 2016-08-24 22:04:29 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 581 bytes |
| 記録 | |
| コンパイル時間 | 338 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 20,480 KB |
| 最終ジャッジ日時 | 2026-05-08 09:24:47 |
| 合計ジャッジ時間 | 4,663 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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