結果

問題 No.3072 Sum of sqrt(x)
ユーザー maspymaspy
提出日時 2020-06-21 03:15:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 358 bytes
コンパイル時間 728 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 188,720 KB
最終ジャッジ日時 2023-09-12 00:24:03
合計ジャッジ時間 116,721 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
29,616 KB
testcase_01 AC 132 ms
29,528 KB
testcase_02 AC 132 ms
29,736 KB
testcase_03 AC 133 ms
29,568 KB
testcase_04 AC 134 ms
29,572 KB
testcase_05 AC 135 ms
29,624 KB
testcase_06 AC 135 ms
29,704 KB
testcase_07 WA -
testcase_08 AC 556 ms
171,064 KB
testcase_09 AC 667 ms
171,224 KB
testcase_10 AC 983 ms
186,472 KB
testcase_11 AC 1,278 ms
186,352 KB
testcase_12 AC 1,800 ms
186,568 KB
testcase_13 AC 1,798 ms
186,724 KB
testcase_14 AC 1,792 ms
186,584 KB
testcase_15 AC 1,789 ms
186,648 KB
testcase_16 AC 1,800 ms
188,696 KB
testcase_17 AC 1,690 ms
186,716 KB
testcase_18 AC 1,756 ms
188,508 KB
testcase_19 AC 1,725 ms
186,576 KB
testcase_20 AC 1,719 ms
186,596 KB
testcase_21 AC 1,667 ms
186,632 KB
testcase_22 AC 1,710 ms
186,608 KB
testcase_23 AC 1,683 ms
188,600 KB
testcase_24 AC 1,746 ms
186,804 KB
testcase_25 AC 1,691 ms
186,520 KB
testcase_26 AC 1,696 ms
186,472 KB
testcase_27 AC 1,421 ms
186,616 KB
testcase_28 WA -
testcase_29 AC 1,600 ms
188,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

nums = np.array(read().split(), np.float64)[1:]
np.sqrt(nums, out=nums)

K = 1<<12
high, low = np.divmod(nums, K)
np.cumsum(high, out=high)
np.cumsum(low, out=low)
x = high * K + low
print('\n'.join(map(str, x.tolist())))
0