結果

問題 No.1905 PURE PHRASE
ユーザー ニックネームニックネーム
提出日時 2022-04-16 00:51:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 331 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,596 KB
実行使用メモリ 13,524 KB
最終ジャッジ日時 2023-08-26 09:17:20
合計ジャッジ時間 6,975 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
12,656 KB
testcase_01 AC 124 ms
13,192 KB
testcase_02 AC 124 ms
13,244 KB
testcase_03 AC 127 ms
13,148 KB
testcase_04 AC 132 ms
13,300 KB
testcase_05 AC 130 ms
13,224 KB
testcase_06 AC 125 ms
13,104 KB
testcase_07 AC 129 ms
13,124 KB
testcase_08 AC 125 ms
13,160 KB
testcase_09 AC 127 ms
13,240 KB
testcase_10 AC 124 ms
13,212 KB
testcase_11 AC 124 ms
13,064 KB
testcase_12 AC 125 ms
13,424 KB
testcase_13 AC 128 ms
13,144 KB
testcase_14 AC 119 ms
13,340 KB
testcase_15 AC 124 ms
13,336 KB
testcase_16 AC 119 ms
13,244 KB
testcase_17 AC 121 ms
13,128 KB
testcase_18 AC 121 ms
13,476 KB
testcase_19 AC 126 ms
13,204 KB
testcase_20 AC 130 ms
13,228 KB
testcase_21 AC 122 ms
13,216 KB
testcase_22 AC 127 ms
13,524 KB
testcase_23 AC 120 ms
13,244 KB
testcase_24 AC 129 ms
13,092 KB
testcase_25 AC 129 ms
13,288 KB
testcase_26 AC 127 ms
13,256 KB
testcase_27 AC 130 ms
13,236 KB
testcase_28 AC 124 ms
13,148 KB
testcase_29 AC 129 ms
13,288 KB
testcase_30 AC 126 ms
13,264 KB
testcase_31 AC 127 ms
13,216 KB
testcase_32 AC 123 ms
13,480 KB
testcase_33 AC 136 ms
13,212 KB
testcase_34 AC 127 ms
13,184 KB
testcase_35 AC 134 ms
13,168 KB
testcase_36 AC 127 ms
13,348 KB
testcase_37 AC 130 ms
13,140 KB
testcase_38 AC 132 ms
13,012 KB
testcase_39 AC 129 ms
13,292 KB
testcase_40 AC 127 ms
13,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
height = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"]
freq = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5]
period = [round(n/v) for v in freq]
diff = [0]*7
for i, v in enumerate(period):
    for j in range(n-v): diff[i] += abs(a[j]-a[j+v])
print(height[diff.index(min(diff))])
0