結果
問題 | No.881 sin(x)/xの和 |
ユーザー |
|
提出日時 | 2019-09-30 07:03:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
MLE
|
実行時間 | - |
コード長 | 379 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 821,868 KB |
最終ジャッジ日時 | 2024-10-03 05:06:56 |
合計ジャッジ時間 | 4,484 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | MLE * 1 -- * 22 |
ソースコード
import numpy as npinput_array = np.empty((0, 2))n = int(input())for i in range(n):input_array = np.vstack([input_array, np.array(list(map(float, input().split(" "))))])m = (10**5)j = np.array([np.arange(-m//2, m//2)]*n)x_plus = j.T + input_array[:, 0]sin = np.sin(x_plus) / x_plussin_sum = np.sum(sin, axis=0)res = np.dot(sin_sum, input_array[:, 1])print(res)