結果

問題 No.1905 PURE PHRASE
ユーザー SumitacchanSumitacchan
提出日時 2022-02-11 14:44:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 35,276 KB
最終ジャッジ日時 2023-09-09 16:07:03
合計ジャッジ時間 11,072 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
34,844 KB
testcase_01 AC 144 ms
35,172 KB
testcase_02 AC 144 ms
35,156 KB
testcase_03 AC 141 ms
34,892 KB
testcase_04 AC 143 ms
35,156 KB
testcase_05 AC 142 ms
35,056 KB
testcase_06 AC 145 ms
35,100 KB
testcase_07 AC 144 ms
35,152 KB
testcase_08 AC 147 ms
35,256 KB
testcase_09 AC 148 ms
35,148 KB
testcase_10 AC 146 ms
34,796 KB
testcase_11 AC 145 ms
35,080 KB
testcase_12 AC 146 ms
35,068 KB
testcase_13 AC 145 ms
34,932 KB
testcase_14 AC 144 ms
35,220 KB
testcase_15 AC 144 ms
34,868 KB
testcase_16 AC 149 ms
34,976 KB
testcase_17 AC 145 ms
34,932 KB
testcase_18 AC 149 ms
35,152 KB
testcase_19 AC 149 ms
35,268 KB
testcase_20 AC 149 ms
35,108 KB
testcase_21 AC 146 ms
34,860 KB
testcase_22 AC 149 ms
35,072 KB
testcase_23 AC 144 ms
35,088 KB
testcase_24 AC 147 ms
35,144 KB
testcase_25 AC 146 ms
34,992 KB
testcase_26 AC 145 ms
35,096 KB
testcase_27 AC 146 ms
35,064 KB
testcase_28 AC 145 ms
35,004 KB
testcase_29 AC 149 ms
35,112 KB
testcase_30 AC 147 ms
34,844 KB
testcase_31 AC 145 ms
35,240 KB
testcase_32 AC 149 ms
35,076 KB
testcase_33 AC 147 ms
35,268 KB
testcase_34 AC 148 ms
34,908 KB
testcase_35 AC 146 ms
35,036 KB
testcase_36 AC 146 ms
35,096 KB
testcase_37 AC 146 ms
35,276 KB
testcase_38 AC 146 ms
35,088 KB
testcase_39 AC 146 ms
35,020 KB
testcase_40 AC 146 ms
35,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
import numpy as np

N = int(input())
A = list(map(float, input().split()))
A = np.array(A)
F = np.abs(np.fft.fft(A))

candidate = { 'C4': 261.6, 'D4': 294.3, 'E4': 327.0, 'F4': 348.8, 'G4': 392.4, 'A4': 436.0, 'B4': 490.5  }
max_val = -1
ans = None
for k, f in candidate.items():
    val = F[int(np.round(f * 1.0))]
    if val > max_val:
        max_val = val
        ans = k        
print(ans)
0