結果
問題 | No.3072 Speedrun Query |
ユーザー |
![]() |
提出日時 | 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 sysimport mathdef main():input = sys.stdin.read().split()N = int(input[0])x_list = list(map(int, input[1:N+1]))sum_total = 0.0compensation = 0.0 # Kahan compensationoutput = []for xi in x_list:y = math.sqrt(xi)# Kahan summation stepsy_compensated = y - compensationtemp = sum_total + y_compensatedcompensation = (temp - sum_total) - y_compensatedsum_total = tempoutput.append(f"{sum_total:.17f}")print('\n'.join(output))if __name__ == "__main__":main()