結果

問題 No.3072 Speedrun Query
ユーザー gew1fw
提出日時 2025-06-12 20:09:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 536 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 81,996 KB
実行使用メモリ 190,492 KB
最終ジャッジ日時 2025-06-12 20:14:48
合計ジャッジ時間 5,555 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 2 TLE * 1 -- * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from decimal import Decimal, getcontext

def main():
    getcontext().prec = 30  # Setting precision high enough to handle required accuracy

    data = sys.stdin.read().split()
    n = int(data[0])
    x_list = list(map(int, data[1:n+1]))
    
    sum_s = Decimal(0)
    sums = []
    for x in x_list:
        sqrt_x = Decimal(x).sqrt()
        sum_s += sqrt_x
        sums.append(sum_s)
    
    for s in sums:
        # Format to 17 decimal places
        print("{0:.17f}".format(s))

if __name__ == "__main__":
    main()
0