結果

問題 No.1905 PURE PHRASE
ユーザー 👑 H20H20
提出日時 2022-04-15 22:06:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 581 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 35,832 KB
最終ジャッジ日時 2023-08-26 07:59:40
合計ジャッジ時間 9,331 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 144 ms
34,736 KB
testcase_01 AC 144 ms
35,060 KB
testcase_02 AC 143 ms
35,204 KB
testcase_03 AC 145 ms
35,176 KB
testcase_04 AC 140 ms
35,444 KB
testcase_05 WA -
testcase_06 AC 142 ms
35,364 KB
testcase_07 AC 144 ms
35,104 KB
testcase_08 AC 144 ms
35,316 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 144 ms
35,324 KB
testcase_13 WA -
testcase_14 AC 147 ms
34,960 KB
testcase_15 WA -
testcase_16 AC 147 ms
35,288 KB
testcase_17 AC 143 ms
34,960 KB
testcase_18 WA -
testcase_19 AC 144 ms
35,028 KB
testcase_20 AC 148 ms
35,384 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 145 ms
35,324 KB
testcase_24 AC 145 ms
35,408 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 139 ms
35,244 KB
testcase_29 WA -
testcase_30 AC 148 ms
35,204 KB
testcase_31 AC 148 ms
35,276 KB
testcase_32 WA -
testcase_33 AC 147 ms
35,168 KB
testcase_34 AC 139 ms
35,324 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 150 ms
35,276 KB
testcase_38 AC 145 ms
35,556 KB
testcase_39 AC 142 ms
35,516 KB
testcase_40 AC 146 ms
35,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

# 高速フーリエ変換(FFT)
F = np.fft.fft(A)
# 振幅スペクトルを計算
amplitude = np.abs(F)
F_amplitude = amplitude / N * 2
F_amplitude[0] = F_amplitude[0] / 2
v = 0
ans = 0
for i in range(len(F_amplitude)):
	if v<F_amplitude[i]:
		ans=i
		v=F_amplitude[i]
if 1569<=ans<=1571:
    print('C4')
elif 292<=ans<=295:
    print('D4')
elif 326<=ans<=328:
    print('E4')
elif 348<=ans<=350:
    print('F4')
elif 391<=ans<=395:
    print('G4')
elif 435<=ans<=437:
    print('A4')
else:
    print('B4')
0