結果
問題 |
No.3072 Speedrun Query
|
ユーザー |
![]() |
提出日時 | 2025-06-12 19:55:36 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 604 bytes |
コンパイル時間 | 345 ms |
コンパイル使用メモリ | 82,380 KB |
実行使用メモリ | 160,044 KB |
最終ジャッジ日時 | 2025-06-12 19:56:18 |
合計ジャッジ時間 | 5,486 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 2 TLE * 1 -- * 18 |
ソースコード
import sys from decimal import Decimal, getcontext getcontext().prec = 35 # Sufficient precision to handle up to 1e6 terms with 1e-15 error def main(): data = sys.stdin.read().split() n = int(data[0]) xs = data[1:n+1] sum_so_far = Decimal(0) output = [] for x_str in xs: x = Decimal(x_str) sqrt_x = x.sqrt() sum_so_far += sqrt_x # Format to 17 decimal places, ensuring no scientific notation formatted = format(sum_so_far, '.17f') output.append(formatted) print('\n'.join(output)) if __name__ == "__main__": main()