結果
| 問題 |
No.3072 Speedrun Query
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-31 17:19:06 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 578 bytes |
| コンパイル時間 | 407 ms |
| コンパイル使用メモリ | 82,080 KB |
| 実行使用メモリ | 189,412 KB |
| 最終ジャッジ日時 | 2025-03-31 17:20:07 |
| 合計ジャッジ時間 | 13,857 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 21 |
ソースコード
import sys
import math
def main():
input = sys.stdin.read().split()
N = int(input[0])
x_list = list(map(int, input[1:N+1]))
sum_total = 0.0
compensation = 0.0 # Kahan compensation
output = []
for xi in x_list:
y = math.sqrt(xi)
# Kahan summation steps
y_compensated = y - compensation
temp = sum_total + y_compensated
compensation = (temp - sum_total) - y_compensated
sum_total = temp
output.append(f"{sum_total:.17f}")
print('\n'.join(output))
if __name__ == "__main__":
main()
lam6er