結果
問題 | No.1905 PURE PHRASE |
ユーザー | ニックネーム |
提出日時 | 2022-04-15 22:00:20 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 347 bytes |
コンパイル時間 | 89 ms |
コンパイル使用メモリ | 10,756 KB |
実行使用メモリ | 13,704 KB |
最終ジャッジ日時 | 2023-08-26 07:55:24 |
合計ジャッジ時間 | 3,100 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 36 ms
13,308 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 36 ms
13,496 KB |
testcase_13 | WA | - |
testcase_14 | AC | 34 ms
13,292 KB |
testcase_15 | WA | - |
testcase_16 | AC | 37 ms
13,264 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | AC | 36 ms
13,228 KB |
testcase_20 | AC | 36 ms
13,200 KB |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | AC | 38 ms
13,084 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | AC | 35 ms
13,272 KB |
testcase_29 | WA | - |
testcase_30 | AC | 35 ms
13,252 KB |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | AC | 35 ms
13,176 KB |
testcase_34 | AC | 36 ms
13,216 KB |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | AC | 37 ms
13,312 KB |
testcase_39 | WA | - |
testcase_40 | WA | - |
ソースコード
from bisect import bisect_left n = int(input()) a = list(map(int, input().split())) c = 0 for i in range(1, n-1): if a[i-1] <= a[i] >= a[i+1]: c += 1 h = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"] f = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5] i = bisect_left(f, c) if i > 5: i = 5 print(h[i] if abs(c-f[i]) < abs(c-f[i+1]) else h[i+1])