結果
| 問題 |
No.1905 PURE PHRASE
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-04-16 11:32:25 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 573 bytes |
| コンパイル時間 | 452 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 15,468 KB |
| 最終ジャッジ日時 | 2024-12-25 16:03:50 |
| 合計ジャッジ時間 | 7,805 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 33 |
ソースコード
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()