結果

問題 No.3072 Sum of sqrt(x)
ユーザー asumo0729asumo0729
提出日時 2021-10-24 18:40:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 838 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 88,696 KB
最終ジャッジ日時 2024-04-10 01:40:43
合計ジャッジ時間 16,042 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 44 ms
55,544 KB
testcase_02 WA -
testcase_03 AC 44 ms
55,520 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 44 ms
54,764 KB
testcase_07 WA -
testcase_08 AC 512 ms
82,096 KB
testcase_09 WA -
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from operator import itemgetter
from collections import defaultdict, deque
import heapq
import bisect
import math
import itertools

stdin=sys.stdin
sys.setrecursionlimit(10 ** 8)

ip=lambda: int(sp())
fp=lambda: float(sp())
lp=lambda:list(map(int,stdin.readline().split()))
sp=lambda:stdin.readline().rstrip()
Yp=lambda:print('Yes')
Np=lambda:print('No')
inf = 1 << 60
inf1 = float('inf')
mod = 10 ** 9 + 7
mod = 998244353
eps = 1e-9
sortkey1 = itemgetter(0)
sortkey2 = lambda x: (x[0], x[1])

###############################################################

N = ip()

def f(x):
    ok = 0; ng = 10 ** 9 + 1
    for _ in range(50):
        mid = (ok + ng) / 2
        if mid * mid > x:
            ng = mid
        else:
            ok = mid
    return ok

ans = 0
for _ in range(N):
    x = ip()
    ans += f(x)
    print(ans)
0