結果

問題 No.3072 Sum of sqrt(x)
ユーザー maspymaspy
提出日時 2020-06-17 13:08:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 500 bytes
コンパイル時間 680 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 119,216 KB
最終ジャッジ日時 2023-09-11 09:47:23
合計ジャッジ時間 94,689 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
29,616 KB
testcase_01 AC 139 ms
29,676 KB
testcase_02 AC 139 ms
29,772 KB
testcase_03 WA -
testcase_04 AC 139 ms
29,676 KB
testcase_05 AC 140 ms
29,604 KB
testcase_06 AC 139 ms
29,760 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1,068 ms
94,600 KB
testcase_10 AC 1,215 ms
118,412 KB
testcase_11 AC 1,819 ms
118,396 KB
testcase_12 AC 1,839 ms
118,176 KB
testcase_13 AC 1,781 ms
118,372 KB
testcase_14 AC 1,875 ms
118,376 KB
testcase_15 AC 1,941 ms
118,420 KB
testcase_16 AC 1,711 ms
118,324 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import numpy as np

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

N = int(readline())
nums = np.array(read().split(), np.longdouble)
np.sqrt(nums, out=nums)
nums = nums.astype(np.longdouble)
np.cumsum(nums, out=nums)
nums = nums.astype(np.float64)

for k in range(18):
    i = np.searchsorted(nums, 10**k)
    j = np.searchsorted(nums, 10**(k+1))
    if i != j:
        A = np.round(nums[i:j], 16-k)
        print(*A, sep='\n')

0