結果
| 問題 | 
                            No.1905 PURE PHRASE
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-04-15 22:32:34 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 603 bytes | 
| コンパイル時間 | 136 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 44,480 KB | 
| 最終ジャッジ日時 | 2024-12-25 01:29:36 | 
| 合計ジャッジ時間 | 22,193 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | RE * 3 | 
| other | RE * 38 | 
ソースコード
# https://qiita.com/kaityo256/items/64a54bb2e2c477cc6fa1 import numpy as np from math import sqrt, pi, exp import matplotlib.pyplot as plt N = int(input()) y = list(map(int, input().split())) fk = np.fft.fft(y) fk2 = [abs(x) for x in fk] fk2 = fk2[:1000] """ plt.plot(y) plt.show() """ #plt.plot(fk2) #plt.show() i = fk2.index(max(fk2)) #print(i) hz = 44100 / i l = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5] l2 = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"] l3 = [] for i in range(len(l)): shuki = int(l[i] + 0.5) l3.append(fk2[shuki]) #print(l3) ans = l3.index(max(l3)) print(l2[ans])