結果
| 問題 |
No.881 sin(x)/xの和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-30 07:04:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 106 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 279,012 KB |
| 最終ジャッジ日時 | 2024-10-03 05:07:15 |
| 合計ジャッジ時間 | 14,283 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 23 |
ソースコード
import numpy as np
input_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**4)
j = np.array([np.arange(-m//2, m//2)]*n)
x_plus = j.T + input_array[:, 0]
sin = np.sin(x_plus) / x_plus
sin_sum = np.sum(sin, axis=0)
res = np.dot(sin_sum, input_array[:, 1])
print(res)