結果
問題 | No.3072 Sum of sqrt(x) |
ユーザー | maspy |
提出日時 | 2020-06-21 04:38:06 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 426 bytes |
コンパイル時間 | 517 ms |
コンパイル使用メモリ | 10,648 KB |
実行使用メモリ | 186,296 KB |
最終ジャッジ日時 | 2023-09-12 06:30:00 |
合計ジャッジ時間 | 75,590 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 142 ms
29,536 KB |
testcase_01 | AC | 140 ms
29,556 KB |
testcase_02 | AC | 141 ms
29,564 KB |
testcase_03 | AC | 140 ms
29,508 KB |
testcase_04 | AC | 141 ms
29,504 KB |
testcase_05 | AC | 143 ms
29,552 KB |
testcase_06 | AC | 146 ms
29,508 KB |
testcase_07 | AC | 1,523 ms
185,892 KB |
testcase_08 | AC | 794 ms
170,392 KB |
testcase_09 | AC | 707 ms
170,416 KB |
testcase_10 | AC | 1,289 ms
185,892 KB |
testcase_11 | AC | 1,628 ms
185,760 KB |
testcase_12 | WA | - |
testcase_13 | TLE | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | TLE | - |
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 | - |
ソースコード
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 *= 1048576 integer = nums.astype(np.int64).astype(np.float64) frac = nums - integer np.cumsum(integer, out=integer) np.cumsum(frac, out=frac) x = integer + frac x /= 1048576 print('\n'.join(map(str, x.tolist())))