結果

問題 No.3072 Sum of sqrt(x)
ユーザー maspymaspy
提出日時 2020-06-21 04:07:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 451 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 10,892 KB
実行使用メモリ 188,504 KB
最終ジャッジ日時 2023-09-12 07:29:37
合計ジャッジ時間 157,301 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
29,592 KB
testcase_01 AC 140 ms
29,496 KB
testcase_02 AC 134 ms
29,800 KB
testcase_03 AC 134 ms
29,648 KB
testcase_04 AC 133 ms
29,520 KB
testcase_05 AC 133 ms
29,536 KB
testcase_06 AC 132 ms
29,548 KB
testcase_07 AC 1,487 ms
186,624 KB
testcase_08 AC 575 ms
170,816 KB
testcase_09 AC 773 ms
171,048 KB
testcase_10 AC 1,184 ms
186,388 KB
testcase_11 AC 1,582 ms
186,372 KB
testcase_12 TLE -
testcase_13 AC 1,952 ms
186,588 KB
testcase_14 AC 1,902 ms
186,428 KB
testcase_15 AC 1,875 ms
186,532 KB
testcase_16 AC 1,900 ms
188,504 KB
testcase_17 AC 1,847 ms
186,732 KB
testcase_18 AC 1,880 ms
186,536 KB
testcase_19 AC 1,820 ms
186,668 KB
testcase_20 AC 1,844 ms
186,940 KB
testcase_21 AC 1,776 ms
186,668 KB
testcase_22 AC 1,861 ms
186,320 KB
testcase_23 AC 1,823 ms
186,336 KB
testcase_24 AC 1,899 ms
186,704 KB
testcase_25 AC 1,790 ms
186,604 KB
testcase_26 AC 1,881 ms
186,548 KB
testcase_27 AC 1,498 ms
186,412 KB
testcase_28 AC 1,651 ms
186,596 KB
testcase_29 AC 1,750 ms
186,196 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)
high = np.int64(nums)
nums -= high
nums *= 1 << 40
mid = np.int64(nums)
nums -= mid
low = nums
np.cumsum(high, out=high)
np.cumsum(mid, out=mid)
np.cumsum(low, out=low)
x = (mid + low) / (1 << 40) + high
print('\n'.join(map(str, x.tolist())))
0