結果

問題 No.456 Millions of Submits!
ユーザー maspymaspy
提出日時 2020-03-27 09:53:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 485 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 352,972 KB
最終ジャッジ日時 2023-08-30 16:13:57
合計ジャッジ時間 8,256 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
29,544 KB
testcase_01 AC 142 ms
29,620 KB
testcase_02 AC 139 ms
29,540 KB
testcase_03 AC 140 ms
29,496 KB
testcase_04 AC 140 ms
29,564 KB
testcase_05 WA -
testcase_06 AC 140 ms
29,768 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/ python3.8
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

M = int(readline())
ABT = np.array(read().split(), np.float64)
A = ABT[::3]
B = ABT[1::3]
T = ABT[2::3]
LT = np.log(T)

X = np.ones(M)


def newton(X):
    f = A * X + B * np.log(X) - LT
    df = A + B / X
    X -= f / df
    return


for _ in range(30):
    newton(X)

answer = np.exp(X)
print('\n'.join(answer.astype(str)))
0