結果

問題 No.3072 Sum of sqrt(x)
ユーザー maspymaspy
提出日時 2020-06-21 03:22:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 421 bytes
コンパイル時間 1,045 ms
コンパイル使用メモリ 10,840 KB
実行使用メモリ 196,672 KB
最終ジャッジ日時 2023-09-12 00:07:16
合計ジャッジ時間 122,379 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
29,688 KB
testcase_01 AC 134 ms
29,636 KB
testcase_02 AC 133 ms
29,644 KB
testcase_03 AC 133 ms
29,708 KB
testcase_04 AC 132 ms
29,676 KB
testcase_05 AC 132 ms
29,680 KB
testcase_06 AC 132 ms
29,544 KB
testcase_07 AC 1,515 ms
194,148 KB
testcase_08 AC 663 ms
178,776 KB
testcase_09 AC 686 ms
178,740 KB
testcase_10 AC 1,007 ms
196,396 KB
testcase_11 AC 1,306 ms
196,276 KB
testcase_12 AC 1,966 ms
194,408 KB
testcase_13 AC 1,958 ms
194,500 KB
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 AC 1,928 ms
196,496 KB
testcase_18 AC 1,828 ms
194,508 KB
testcase_19 AC 1,767 ms
194,376 KB
testcase_20 AC 1,832 ms
194,460 KB
testcase_21 AC 1,707 ms
196,516 KB
testcase_22 AC 1,812 ms
194,524 KB
testcase_23 AC 1,769 ms
194,444 KB
testcase_24 AC 1,855 ms
194,492 KB
testcase_25 AC 1,783 ms
194,512 KB
testcase_26 AC 1,785 ms
194,500 KB
testcase_27 AC 1,497 ms
196,456 KB
testcase_28 AC 1,557 ms
194,348 KB
testcase_29 AC 1,635 ms
194,388 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, mid = np.divmod(nums, 1)
mid, low = np.divmod(mid, 0.5**20)
np.cumsum(high, out=high)
np.cumsum(mid, out=mid)
np.cumsum(low, out=low)
x = high + mid * (0.5**20) + low
print('\n'.join(map(str, x.tolist())))
0