結果

問題 No.1905 PURE PHRASE
ユーザー kyskys
提出日時 2022-04-15 22:59:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 857 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 10,836 KB
実行使用メモリ 35,392 KB
最終ジャッジ日時 2023-08-26 08:34:39
合計ジャッジ時間 8,435 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
34,980 KB
testcase_01 AC 136 ms
34,932 KB
testcase_02 AC 140 ms
34,916 KB
testcase_03 AC 136 ms
34,912 KB
testcase_04 AC 137 ms
35,180 KB
testcase_05 AC 134 ms
35,180 KB
testcase_06 AC 135 ms
35,348 KB
testcase_07 AC 135 ms
35,252 KB
testcase_08 AC 133 ms
34,868 KB
testcase_09 AC 134 ms
35,212 KB
testcase_10 AC 137 ms
35,072 KB
testcase_11 AC 136 ms
34,916 KB
testcase_12 AC 134 ms
35,192 KB
testcase_13 AC 133 ms
35,332 KB
testcase_14 AC 133 ms
35,088 KB
testcase_15 AC 133 ms
34,808 KB
testcase_16 AC 141 ms
34,948 KB
testcase_17 AC 136 ms
35,080 KB
testcase_18 AC 135 ms
35,308 KB
testcase_19 AC 136 ms
34,868 KB
testcase_20 AC 133 ms
35,144 KB
testcase_21 AC 136 ms
34,936 KB
testcase_22 AC 137 ms
35,228 KB
testcase_23 AC 134 ms
34,936 KB
testcase_24 AC 137 ms
35,128 KB
testcase_25 AC 139 ms
35,096 KB
testcase_26 AC 137 ms
34,796 KB
testcase_27 AC 137 ms
35,392 KB
testcase_28 AC 134 ms
34,984 KB
testcase_29 AC 135 ms
34,948 KB
testcase_30 AC 134 ms
34,840 KB
testcase_31 AC 134 ms
34,928 KB
testcase_32 AC 131 ms
35,248 KB
testcase_33 AC 133 ms
34,992 KB
testcase_34 AC 135 ms
35,168 KB
testcase_35 AC 137 ms
34,984 KB
testcase_36 AC 135 ms
35,252 KB
testcase_37 AC 135 ms
35,008 KB
testcase_38 AC 134 ms
35,228 KB
testcase_39 AC 133 ms
34,772 KB
testcase_40 AC 134 ms
34,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
def iinput(): return int(input())
def sinput(): return input().rstrip()
def i0input(): return int(input()) - 1
def linput(): return list(input().split())
def liinput(): return list(map(int, input().split()))
def miinput(): return map(int, input().split())
def li0input(): return list(map(lambda x: int(x) - 1, input().split()))
def mi0input(): return map(lambda x: int(x) - 1, input().split())
INF = 10**20
MOD = 1000000007

import numpy as np

N = iinput()
A = liinput()

X = np.fft.fft(A)

X = list(map(abs, X))
res = 0
for i, x in enumerate(X[:500]):
    if x > res:
        res = x
        ans = i

K = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5]
KK = ['C4', 'D4', 'E4', 'F4', 'G4', 'A4', 'B4']

res = INF
for i in range(7):
    if abs(ans-K[i]) < res:
        res = abs(ans-K[i])
        a = i

print(KK[a])
0