結果

問題 No.1905 PURE PHRASE
ユーザー 👑 KazunKazun
提出日時 2022-04-15 21:45:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 484 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,248 KB
実行使用メモリ 81,068 KB
最終ジャッジ日時 2023-08-26 07:44:32
合計ジャッジ時間 5,839 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
80,768 KB
testcase_01 AC 93 ms
80,740 KB
testcase_02 AC 99 ms
80,892 KB
testcase_03 AC 93 ms
80,620 KB
testcase_04 AC 95 ms
80,616 KB
testcase_05 AC 94 ms
80,968 KB
testcase_06 AC 93 ms
80,736 KB
testcase_07 AC 94 ms
80,908 KB
testcase_08 AC 93 ms
80,892 KB
testcase_09 AC 94 ms
80,864 KB
testcase_10 AC 94 ms
80,876 KB
testcase_11 AC 93 ms
80,852 KB
testcase_12 AC 94 ms
80,880 KB
testcase_13 AC 93 ms
81,064 KB
testcase_14 AC 93 ms
80,848 KB
testcase_15 AC 94 ms
80,848 KB
testcase_16 AC 94 ms
80,876 KB
testcase_17 AC 93 ms
80,752 KB
testcase_18 AC 94 ms
80,928 KB
testcase_19 AC 94 ms
81,068 KB
testcase_20 AC 94 ms
80,556 KB
testcase_21 AC 95 ms
80,960 KB
testcase_22 AC 94 ms
80,928 KB
testcase_23 AC 94 ms
80,844 KB
testcase_24 AC 94 ms
80,724 KB
testcase_25 AC 94 ms
80,940 KB
testcase_26 AC 94 ms
80,836 KB
testcase_27 AC 93 ms
80,968 KB
testcase_28 AC 94 ms
80,768 KB
testcase_29 AC 94 ms
80,584 KB
testcase_30 AC 93 ms
80,840 KB
testcase_31 AC 94 ms
80,984 KB
testcase_32 AC 95 ms
80,632 KB
testcase_33 AC 94 ms
80,856 KB
testcase_34 AC 93 ms
80,724 KB
testcase_35 AC 93 ms
80,844 KB
testcase_36 AC 92 ms
80,928 KB
testcase_37 AC 94 ms
80,856 KB
testcase_38 AC 95 ms
80,912 KB
testcase_39 AC 94 ms
80,700 KB
testcase_40 AC 94 ms
80,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(t):
    time=0
    X=0
    for i in range(N-t):
        X+=abs(A[i]-A[i+t])
        time+=1
    return X/time
#==================================================
from math import floor,ceil

N=int(input())
A=list(map(int,input().split()))

T={"C4":261.6, "D4":294.3, "E4":327.0, "F4":348.8, "G4":392.4, "A4":436.0, "B4":490.5}

beta=float("inf")
ans=""
for p in T:
    alpha=min(f(floor(N/T[p])), f(ceil(N/T[p])))
    if beta>alpha:
        beta=alpha
        ans=p

print(ans)
0