結果

問題 No.8072 Sum of sqrt(x)
ユーザー titia
提出日時 2024-09-27 04:40:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 446 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 99,136 KB
最終ジャッジ日時 2024-09-27 04:40:38
合計ジャッジ時間 16,533 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 1 WA * 3 TLE * 1 -- * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from decimal import *
getcontext().prec = 50

N=int(input())
X=[int(input()) for i in range(N)]

ANS=[]

score=Decimal(0)
for x in X:
    x*=10**40

    MIN=Decimal(0)
    MAX=Decimal(x)
    for i in range(100):
        mid=(MAX+MIN)/2

        if mid*mid>x:
            MAX=mid
        else:
            MIN=mid

    score+=(Decimal(MAX+MIN)/2/10**20)

    ANS.append(score)

print("\n".join(map(str,ANS)))
0