結果
| 問題 |
No.3072 Speedrun Query
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 19:53:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 601 bytes |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 82,468 KB |
| 実行使用メモリ | 160,220 KB |
| 最終ジャッジ日時 | 2025-06-12 19:54:29 |
| 合計ジャッジ時間 | 5,137 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 2 TLE * 1 -- * 18 |
ソースコード
import sys
from decimal import Decimal, getcontext
def main():
input = sys.stdin.read().split()
N = int(input[0])
xs = input[1:N+1]
getcontext().prec = 25 # Set high precision to handle sum accurately
sum_s = Decimal(0)
output = []
for x_str in xs:
x = Decimal(x_str)
sqrt_x = x.sqrt()
sum_s += sqrt_x
# Format the sum to exactly 15 decimal places
formatted = format(sum_s, '.15f')
output.append(formatted)
# Print all lines at once for efficiency
print('\n'.join(output))
if __name__ == "__main__":
main()
gew1fw