結果
問題 |
No.3072 Speedrun Query
|
ユーザー |
![]() |
提出日時 | 2025-04-16 15:31:22 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 549 bytes |
コンパイル時間 | 268 ms |
コンパイル使用メモリ | 82,380 KB |
実行使用メモリ | 160,000 KB |
最終ジャッジ日時 | 2025-04-16 15:36:25 |
合計ジャッジ時間 | 5,967 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 2 TLE * 1 -- * 18 |
ソースコード
import sys from decimal import Decimal, getcontext getcontext().prec = 35 # Sufficient precision to handle the required error margin def main(): input = sys.stdin.read().split() n = int(input[0]) xs = input[1:n+1] sum_so_far = Decimal(0) for x_str in xs: x = Decimal(x_str) sum_so_far += x.sqrt() # Format the sum to remove trailing zeros and unnecessary decimal points sum_str = format(sum_so_far, 'f').rstrip('0').rstrip('.') print(sum_str) if __name__ == "__main__": main()