結果

問題 No.1905 PURE PHRASE
ユーザー ikomaikoma
提出日時 2022-04-15 22:34:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 150 ms / 2,000 ms
コード長 340 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,540 KB
実行使用メモリ 33,568 KB
最終ジャッジ日時 2023-08-26 08:18:33
合計ジャッジ時間 7,884 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
32,808 KB
testcase_01 AC 147 ms
33,396 KB
testcase_02 AC 150 ms
33,112 KB
testcase_03 AC 147 ms
33,388 KB
testcase_04 AC 148 ms
33,388 KB
testcase_05 AC 147 ms
33,184 KB
testcase_06 AC 148 ms
33,228 KB
testcase_07 AC 145 ms
33,280 KB
testcase_08 AC 149 ms
33,320 KB
testcase_09 AC 147 ms
33,200 KB
testcase_10 AC 147 ms
33,232 KB
testcase_11 AC 147 ms
33,304 KB
testcase_12 AC 145 ms
33,112 KB
testcase_13 AC 142 ms
33,380 KB
testcase_14 AC 142 ms
33,392 KB
testcase_15 AC 144 ms
33,420 KB
testcase_16 AC 145 ms
33,568 KB
testcase_17 AC 144 ms
33,168 KB
testcase_18 AC 145 ms
33,324 KB
testcase_19 AC 144 ms
33,516 KB
testcase_20 AC 146 ms
33,304 KB
testcase_21 AC 144 ms
33,296 KB
testcase_22 AC 143 ms
33,240 KB
testcase_23 AC 143 ms
33,520 KB
testcase_24 AC 145 ms
33,444 KB
testcase_25 AC 145 ms
33,336 KB
testcase_26 AC 149 ms
33,488 KB
testcase_27 AC 149 ms
33,304 KB
testcase_28 AC 146 ms
33,512 KB
testcase_29 AC 146 ms
33,384 KB
testcase_30 AC 148 ms
33,172 KB
testcase_31 AC 147 ms
33,324 KB
testcase_32 AC 146 ms
33,476 KB
testcase_33 AC 147 ms
33,436 KB
testcase_34 AC 148 ms
33,152 KB
testcase_35 AC 144 ms
33,108 KB
testcase_36 AC 144 ms
33,332 KB
testcase_37 AC 142 ms
33,280 KB
testcase_38 AC 146 ms
33,468 KB
testcase_39 AC 145 ms
33,184 KB
testcase_40 AC 145 ms
33,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
import numpy as np

fs=44100
fft = np.fft.fft(A)

kouho = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5]
takasa = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"]
gmax=0
idx=0
for i,k in enumerate(kouho):
    g = abs(fft[round(k)])
    if gmax<g:
        gmax=g
        idx=i
print(takasa[idx])
0