結果

問題 No.3072 Sum of sqrt(x)
ユーザー maspymaspy
提出日時 2020-06-21 04:34:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 401 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 10,540 KB
実行使用メモリ 194,712 KB
最終ジャッジ日時 2023-09-12 08:01:44
合計ジャッジ時間 124,862 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
29,452 KB
testcase_01 AC 135 ms
29,456 KB
testcase_02 AC 133 ms
29,536 KB
testcase_03 AC 134 ms
29,512 KB
testcase_04 AC 135 ms
29,460 KB
testcase_05 AC 136 ms
29,416 KB
testcase_06 AC 138 ms
29,468 KB
testcase_07 WA -
testcase_08 AC 596 ms
170,316 KB
testcase_09 AC 721 ms
170,224 KB
testcase_10 AC 1,132 ms
185,900 KB
testcase_11 AC 1,460 ms
186,044 KB
testcase_12 AC 1,883 ms
186,164 KB
testcase_13 AC 1,910 ms
186,004 KB
testcase_14 AC 1,900 ms
185,788 KB
testcase_15 AC 1,972 ms
185,884 KB
testcase_16 TLE -
testcase_17 AC 1,894 ms
186,052 KB
testcase_18 AC 1,862 ms
194,712 KB
testcase_19 AC 1,918 ms
185,988 KB
testcase_20 AC 1,826 ms
186,132 KB
testcase_21 AC 1,804 ms
185,964 KB
testcase_22 AC 1,983 ms
186,252 KB
testcase_23 AC 1,881 ms
185,840 KB
testcase_24 AC 1,895 ms
185,920 KB
testcase_25 AC 1,970 ms
188,052 KB
testcase_26 AC 1,970 ms
186,276 KB
testcase_27 AC 1,439 ms
186,016 KB
testcase_28 WA -
testcase_29 AC 1,693 ms
185,856 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)
nums *= 1024
integer = nums.astype(np.int64)
frac = nums - integer
np.cumsum(integer, out=integer)
np.cumsum(frac, out=frac)
x = integer + frac
x /= 1024
print('\n'.join(map(str, x.tolist())))
0