← Back to List

14710번: 고장난 시계 ↗

Solutions

Python 3
694 B | 694 chars
import sys
from math import sqrt, pi, sin, factorial, ceil, floor
from datetime import datetime, timedelta
sys.setrecursionlimit(10**7)

BLANK = " "

#inp = input
inp = lambda : sys.stdin.readline().rstrip()
mii = lambda x = BLANK : [*map(int,inp().split(x))]
mfi = lambda x = BLANK : [*map(float,inp().split(x))]
ii = lambda : int(inp())
fi = lambda : float(inp())
p = print


def solve():
  a, b = mii()
  for h in range(12):
    for m in range(0, 60, 2):
      m_ang = m * 6
      h_ang = h * 30 + m // 2
      
      if a == h_ang and b == m_ang:
        return "O"
  return "X"
      
      
if __name__ == "__main__":
  tc = 1

  for t in range(1, tc+1):
    ret = solve()
    p(ret)