結果

問題 No.1905 PURE PHRASE
ユーザー 👑 colognecologne
提出日時 2022-04-16 11:32:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 573 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,860 KB
実行使用メモリ 13,856 KB
最終ジャッジ日時 2023-08-26 17:03:03
合計ジャッジ時間 5,658 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
12,908 KB
testcase_01 AC 95 ms
13,444 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 91 ms
13,580 KB
testcase_11 WA -
testcase_12 AC 90 ms
13,644 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 91 ms
13,332 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 91 ms
13,272 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 90 ms
13,476 KB
testcase_40 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
import cmath


def main():
    N = int(input())
    *A, = map(int, input().split())

    melody = [
        ("C4", 261.6),
        ("D4", 294.3),
        ("E4", 327.0),
        ("F4", 348.8),
        ("G4", 392.4),
        ("A4", 436.0),
        ("B4", 490.5),
    ]

    ans = 0
    ansv = 0

    for m, f in melody:
        angle = 2*math.pi*f/N
        s = 0
        for i in range(N):
            s += A[i] * cmath.exp(angle*1j)
        if ans < abs(s):
            ans = abs(s)
            ansv = m

    print(ansv)


if __name__ == '__main__':
    main()
0