結果
問題 | No.1905 PURE PHRASE |
ユーザー |
|
提出日時 | 2022-04-15 22:13:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 163 ms / 2,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 107 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 15,852 KB |
最終ジャッジ日時 | 2024-12-25 00:52:06 |
合計ジャッジ時間 | 7,383 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
freq = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5]word = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"]N = int(input())x = list(map(int, input().split()))S = 10 ** 18ans = -1for i, f in enumerate(freq):d = round(N / f)s = sum([(x[i] - x[(i + d) % N]) ** 2 for i in range(N)])if s < S:S = sans = iprint(word[ans])