結果
問題 |
No.456 Millions of Submits!
|
ユーザー |
![]() |
提出日時 | 2020-03-27 10:06:34 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 546 bytes |
コンパイル時間 | 323 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 338,904 KB |
最終ジャッジ日時 | 2025-01-02 08:21:34 |
合計ジャッジ時間 | 11,396 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 7 |
ソースコード
#!/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, np.float64) def newton(X): f = A * X + B * np.log(X) - LT df = A + B / X X -= f / df return for _ in range(10): newton(X) answer = np.exp(X) answer[B == 0] = np.exp(LT[B == 0] / A[B == 0]) print('\n'.join(answer.astype(str)))