結果

問題 No.1905 PURE PHRASE
ユーザー 👑 hitonanodehitonanode
提出日時 2022-02-06 21:41:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 542 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 46,480 KB
最終ジャッジ日時 2024-04-19 01:24:56
合計ジャッジ時間 25,763 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 536 ms
46,220 KB
testcase_01 AC 530 ms
46,104 KB
testcase_02 AC 486 ms
46,096 KB
testcase_03 AC 468 ms
45,720 KB
testcase_04 AC 473 ms
45,980 KB
testcase_05 AC 483 ms
45,972 KB
testcase_06 AC 474 ms
46,480 KB
testcase_07 AC 489 ms
45,840 KB
testcase_08 AC 526 ms
46,232 KB
testcase_09 AC 495 ms
45,712 KB
testcase_10 AC 477 ms
45,592 KB
testcase_11 AC 476 ms
45,972 KB
testcase_12 AC 472 ms
45,848 KB
testcase_13 AC 469 ms
45,856 KB
testcase_14 AC 482 ms
45,720 KB
testcase_15 AC 483 ms
46,104 KB
testcase_16 AC 483 ms
46,356 KB
testcase_17 AC 467 ms
46,108 KB
testcase_18 AC 490 ms
46,360 KB
testcase_19 AC 527 ms
45,844 KB
testcase_20 AC 523 ms
45,596 KB
testcase_21 AC 528 ms
45,852 KB
testcase_22 AC 518 ms
46,108 KB
testcase_23 AC 525 ms
46,364 KB
testcase_24 AC 532 ms
45,860 KB
testcase_25 AC 532 ms
45,844 KB
testcase_26 AC 535 ms
46,356 KB
testcase_27 AC 539 ms
46,312 KB
testcase_28 AC 538 ms
45,972 KB
testcase_29 AC 534 ms
45,852 KB
testcase_30 AC 534 ms
45,972 KB
testcase_31 AC 538 ms
45,716 KB
testcase_32 AC 533 ms
45,844 KB
testcase_33 AC 532 ms
45,976 KB
testcase_34 AC 530 ms
45,840 KB
testcase_35 AC 534 ms
45,976 KB
testcase_36 AC 531 ms
46,224 KB
testcase_37 AC 542 ms
46,096 KB
testcase_38 AC 529 ms
46,356 KB
testcase_39 AC 530 ms
45,592 KB
testcase_40 AC 526 ms
45,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

freqs = [262, 294, 327, 349, 392, 436, 491]
names = ['C4', 'D4', 'E4', 'F4', 'G4', 'A4', 'B4']

N = int(input())
A = list(map(float, input().split()))

Afft = np.abs(np.fft.rfft(A * np.hanning(N)))[1:]

print(names[np.argmax(Afft[freqs])])
0