結果

問題 No.1905 PURE PHRASE
ユーザー 37zigen37zigen
提出日時 2022-04-15 22:13:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 13,944 KB
最終ジャッジ日時 2023-08-26 08:05:05
合計ジャッジ時間 4,733 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
12,616 KB
testcase_01 AC 76 ms
13,660 KB
testcase_02 AC 77 ms
13,456 KB
testcase_03 AC 75 ms
13,664 KB
testcase_04 AC 74 ms
13,604 KB
testcase_05 AC 74 ms
13,692 KB
testcase_06 AC 76 ms
13,532 KB
testcase_07 AC 76 ms
13,876 KB
testcase_08 AC 74 ms
13,628 KB
testcase_09 AC 74 ms
13,428 KB
testcase_10 AC 76 ms
13,680 KB
testcase_11 AC 74 ms
13,788 KB
testcase_12 AC 73 ms
13,808 KB
testcase_13 AC 74 ms
13,944 KB
testcase_14 AC 75 ms
13,788 KB
testcase_15 AC 74 ms
13,204 KB
testcase_16 AC 76 ms
13,276 KB
testcase_17 AC 75 ms
13,684 KB
testcase_18 AC 74 ms
13,872 KB
testcase_19 AC 75 ms
13,848 KB
testcase_20 AC 74 ms
13,768 KB
testcase_21 AC 76 ms
13,660 KB
testcase_22 AC 77 ms
13,528 KB
testcase_23 AC 74 ms
13,644 KB
testcase_24 AC 76 ms
13,944 KB
testcase_25 AC 74 ms
13,700 KB
testcase_26 AC 75 ms
13,648 KB
testcase_27 AC 77 ms
13,860 KB
testcase_28 AC 78 ms
13,520 KB
testcase_29 AC 75 ms
13,168 KB
testcase_30 AC 74 ms
13,156 KB
testcase_31 AC 75 ms
13,848 KB
testcase_32 AC 77 ms
13,912 KB
testcase_33 AC 76 ms
13,624 KB
testcase_34 AC 73 ms
13,940 KB
testcase_35 AC 75 ms
13,700 KB
testcase_36 AC 74 ms
13,696 KB
testcase_37 AC 77 ms
13,872 KB
testcase_38 AC 75 ms
13,904 KB
testcase_39 AC 74 ms
13,748 KB
testcase_40 AC 77 ms
13,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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 ** 18
ans = -1
for 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 = s
        ans = i
print(word[ans])
0