結果

問題 No.3072 Sum of sqrt(x)
ユーザー maspymaspy
提出日時 2020-06-21 11:47:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,624 ms / 2,000 ms
コード長 184 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 253,740 KB
最終ジャッジ日時 2024-04-20 16:48:58
合計ジャッジ時間 152,071 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,224 KB
testcase_01 AC 37 ms
51,840 KB
testcase_02 AC 38 ms
52,224 KB
testcase_03 AC 36 ms
51,968 KB
testcase_04 AC 36 ms
51,968 KB
testcase_05 AC 36 ms
52,224 KB
testcase_06 AC 37 ms
52,096 KB
testcase_07 AC 1,331 ms
215,416 KB
testcase_08 AC 521 ms
214,772 KB
testcase_09 AC 571 ms
214,768 KB
testcase_10 AC 813 ms
240,776 KB
testcase_11 AC 1,237 ms
241,160 KB
testcase_12 AC 1,620 ms
240,664 KB
testcase_13 AC 1,624 ms
240,924 KB
testcase_14 AC 1,530 ms
240,536 KB
testcase_15 AC 1,618 ms
240,536 KB
testcase_16 AC 1,595 ms
241,052 KB
testcase_17 AC 1,483 ms
240,904 KB
testcase_18 AC 1,435 ms
240,776 KB
testcase_19 AC 1,538 ms
241,036 KB
testcase_20 AC 1,491 ms
240,780 KB
testcase_21 AC 1,399 ms
240,904 KB
testcase_22 AC 1,538 ms
241,088 KB
testcase_23 AC 1,570 ms
241,028 KB
testcase_24 AC 1,527 ms
241,088 KB
testcase_25 AC 1,438 ms
240,668 KB
testcase_26 AC 1,433 ms
240,836 KB
testcase_27 AC 1,397 ms
223,156 KB
testcase_28 AC 1,423 ms
250,336 KB
testcase_29 AC 1,408 ms
253,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read

N, *nums = map(int, read().split())

s,t,r = 0, 0, 0
for x in nums:
    x = x**.5 + r
    t = s + x
    r = x - (t - s)
    s = t
    print(s)
0