結果

問題 No.1385 Simple Geometry 2
ユーザー Mitarushi
提出日時 2021-02-03 17:47:44
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 255 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 159,664 KB
最終ジャッジ日時 2024-07-04 13:01:37
合計ジャッジ時間 24,326 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 10 TLE * 11 -- * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
from numpy.fft import fft, ifft
from math import pi

n, l = map(int, input().split())
t = np.array(list(map(int, input().split()))) * (2*pi/l)
sin = np.sin(t)
cos = np.cos(t)

x = ifft(fft(cos)*fft(sin)) * np.arange(n)
print(np.sum(x))
0