atcoder 競プロ典型90問 018 - Statue of Chokudai
2022.10.23

問題

方針

  • 座標の計算
  • 像に高さはない
  • tan求めて、arctanで角度に戻す
python
import math
 
t = int(input())
l, x, y = map(int, input().split())
q = int(input())
e_list = [int(input()) for i in range(q)]

for e in e_list:
  yy = -1 * (l/2) * math.sin(2 * math.pi * e / t)
  z = (l/2) * (1 - math.cos(2 * math.pi * e / t))
  tan = z / (math.sqrt(x ** 2 + (y - yy) ** 2))
  print(math.degrees(math.atan(tan)))