Problem:


Score : 200 points

Problem Statement

Takahashi is standing on a two-dimensional plane, facing north. Find the minimum positive integer K such that Takahashi will be at the starting position again after he does the following action K times:

Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise.

Constraints

1 \leq X \leq 179

X is an integer.

Input

Input is given from Standard Input in the following format:

X

Output

Print the number of times Takahashi will do the action before he is at the starting position again.

Sample Input 1

90

Sample Output 1

4

Takahashi's path is a square.

Sample Input 2

1

Sample Output 2

360



Sample input:
90


Sample output:
4

Submission status: Wrong Answer

Solution code:
from sys import stdin
#, setrecursionlimit, stdout
#setrecursionlimit(1000000)
#from collections import deque
#from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
#from heapq import heapify, heappop, heappush, heappushpop, heapreplace
def ii(): return int(stdin.readline())
def fi(): return float(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def fmi(): return map(float, stdin.readline().split())
def li(): return list(mi())
def si(): return stdin.readline().rstrip()
def lsi(): return list(si())
mod=1000000007
res=['YES', 'NO']


#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
#############\\\\\\\\\\\\\ CODE STARTS HERE /////////////#############
#////////////////////////////////////////////////////////////////////#


def bin_search(a, val):
    pos, l, r=0, 0, len(a)-1
    while l<=r:
        m=(l+r)//2
        x=(180*(a[m]-2))/a[m]
        if x==val:
            return a[m]
        if x<val:
            pos=m+1
            l=m+1
        else:
            r=m-1
    return pos



test_case=1
while test_case:
    test_case-=1


    x=ii()
    ans=bin_search([i for i in range(3, 364)], 180-x)
    if not ans:
        ans=bin_search([i for i in range(3, 364)], x)
    print(ans)

Submission status: Wrong Answer

Solution code:
print(int(360/int(input())))

Submission status: Wrong Answer

Solution code:
x=int(input())
import math
K=360/math.gcd(x,360)
print(K)

Submission status: Wrong Answer

Solution code:
x=int(input())
import math
y=x*360/math.gcd(x,360)
print(y/x)

Submission status: Wrong Answer

Solution code:
x=int(input())
import math
y=math.gcd(x,360)
print(y/x)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())

print(math.ceil(360/n))

Submission status: Wrong Answer

Solution code:
# reader = list(map(int, input().strip().split())) take input on single line
#filtered_numbers = [vals for vals in reader if vals >= 0] filter out numbers that dont meet a criteria
x = int(input())
print (int((360/x)))

Submission status: Wrong Answer

Solution code:
x =int(input())
if 360%x ==0:
    print(360//x)
else:
    print(360)

Submission status: Wrong Answer

Solution code:
# A - Takahashikun, The Strider
def lcm(a, b):
	import math
	return (a * b) // math.gcd(a, b)


x = int(input())

if 360 % x == 0:
	print(360 // x)
else:
	print(lcm(x, 180))

Submission status: Wrong Answer

Solution code:
# A - Takahashikun, The Strider
def lcm(a, b):
	import math
	return (a * b) // math.gcd(a, b)


x = int(input())

if 360 % x == 0:
	print(360 // x)
else:
	print(lcm(x, 360))

Submission status: Wrong Answer

Solution code:
# A - Takahashikun, The Strider
x = int(input())

if 360 % x == 0:
	print(360 // x)
else:
	print(360)

Submission status: Wrong Answer

Solution code:
a = int(input())
ans = a + a**2 + a**3
print(ans)

Submission status: Wrong Answer

Solution code:
from math import ceil 

x = int(input())
ans = ceil(360/x)
print(ans)

Submission status: Wrong Answer

Solution code:
import math

x = int(input())
y = 360

lcm = x * y // math.gcd(x, y)
print(lcm/x)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
n=180-n
ans=math.ceil(360/(180-n))
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
n=180-n
ans=360//(180-n)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
ans=360//n
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
ans=math.ceil(360/n)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
ans=math.ceil(n/360)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
g = math.gcd(x,360)
print((x*360)//g)

Submission status: Wrong Answer

Solution code:
x = int(input())

for i in range(1, 360 + 1):
    if i * x == 360:
        print(i)
        exit(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

wk = 360 // x
while True:
    if 360 % wk != 0:
        wk += 1
    else:
        print(wk)
        exit(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

while True:
    wk = 360 // x
    if 360 % x != 0:
        x += 1
    else:
        print(wk)
        exit(0)

Submission status: Wrong Answer

Solution code:
x = int(input())

print(360 // x)

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(1,360+1):
  if n*i%360==0:
    print(i)

Submission status: Wrong Answer

Solution code:
x=int(input())
var=360//x
if 360%x!=0:
  print(var+1)
else:
  print(var)

Submission status: Wrong Answer

Solution code:
from math import ceil
n=int(input())
print(ceil(360//n))

Submission status: Wrong Answer

Solution code:
from math import ceil
n=int(input())
print(ceil(360/n))

Submission status: Wrong Answer

Solution code:
X = int(input())

print(int(360/X))

Submission status: Wrong Answer

Solution code:
X = int(input())

print(360/X)

Submission status: Wrong Answer

Solution code:
def solution(n):
  if n == 0 :
    return -1 
  val = 360 / n 
  return val
n =int(input())
print(solution(n))

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 360 // x
print(ans)

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
t = 360 - (180 - X)
g = math.gcd(t, 360)
print(360 * t // g // t)

Submission status: Wrong Answer

Solution code:
import math
X = 1
t = 360 - (180 - X)
g = math.gcd(t, 360)
print(360 * t // g // t)

Submission status: Wrong Answer

Solution code:
from copy import copy

x = int(input())
os = 0
gcd = copy(x)
q = 90
while gcd != q:
  if gcd < q:
    q -= gcd
  else:
    gcd -= q
lcm = (x * 90) // gcd
if 90 < lcm <= 360:
  print(360 // lcm)
elif lcm <= 90:
  print(360 // x)
else:
  print(lcm // x)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
print((n*360)//math.gcd(n,360))

Submission status: Wrong Answer

Solution code:
import math
X=int(input())
print(360//X if 360%X==0 else X*360//math.gcd(X,360))

Submission status: Wrong Answer

Solution code:
a = int(input())
print(int(360/a+(360 % a)))

Submission status: Wrong Answer

Solution code:
X=int(input())

def rec(x):
    if 360%x==0:
        ans=360//x
    else:
        y=x*((360-1+x)//x)-360
        ans=(360-1+x)//x*rec(y)
    return ans

if X<=120:
    ans=rec(X)
else:
    a=360-2*X
    ans=360//a
print(ans)

Submission status: Wrong Answer

Solution code:
X=int(input())

def rec(x):
    if 360%x==0:
        ans=360//x
    else:
        y=x*((360-1+x)//x)-360
        ans=(360-1+x)//x*rec(y)
    return ans

ans=rec(X)
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
s= 360//x
print(s)

Submission status: Wrong Answer

Solution code:
90

Submission status: Wrong Answer

Solution code:
X=int(input())
Y =360
while 1:
	if Y % X == 0:
		print(Y/X)
		break
	else:
		Y += 360

Submission status: Wrong Answer

Solution code:
a = input()

if a == ("2"):
  print ("180")
elif a == ("3"):
  print ("120")
elif a == ("4"):
  print ("90")
elif a == ("5"):
  print ("72")
elif a == ("6"):
  print ("60")
elif a == ("8"):
  print ("45")
elif a == ("9"):
  print ("40")
elif a == ("10"):
  print ("36")
elif a == ("12"):
  print ("30")
elif a == ("15"):
  print ("24")
elif a == ("18"):
  print ("20")
elif a == ("20"):
  print ("18")
elif a == ("24"):
  print ("15")
elif a == ("30"):
  print ("12")
elif a == ("36"):
  print ("10")
elif a == ("40"):
  print ("9")
elif a == ("45"):
  print ("8")
elif a == ("60"):
  print ("6")
elif a == ("72"):
  print ("5")
elif a == ("90"):
  print ("4")
elif a == ("120"):
  print ("3")
else:
  print("360")

Submission status: Wrong Answer

Solution code:
import math
print(math.floor(360/int(input())))

Submission status: Wrong Answer

Solution code:
import math
print(math.ceil(360/int(input())))

Submission status: Wrong Answer

Solution code:
n=int(input())
#n*k1=(360)*k2
#(k1/k2)=(360/n)
k=1
while((k*n)%360!=0):
  k+=1
  print(k)

Submission status: Wrong Answer

Solution code:
import sys
import math
import numpy as np
import functools
import operator
import collections
import itertools

X=int(input())
ans=1
for i in range(1,100000):
    if X*i==360:
        print(ans)
        sys.exit()
    ans+=1

Submission status: Wrong Answer

Solution code:
x = int(input())

for n in range(1, 10000):
    k, y = divmod(360*n, (180-x))
    if y == 0:
        print(k)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())

for k in range(1, 10000):
    if (180-x)*k % 360 == 0:
        print(k)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())

for k in range(1, 1000):
    if (180-x)*k % 360 == 0:
        print(k)
        break

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 360 / n
i = 1
while int(ans * i) != ans * i:
  i += 1
print(ans * i)

Submission status: Wrong Answer

Solution code:
n = int(input())
print(360 // n)

Submission status: Wrong Answer

Solution code:
 
# from math import factorial as fac
from collections import defaultdict
# from copy import deepcopy
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange
# print(f.readline())
sys.setrecursionlimit(10**2)

	
def print_case_iterable(case_num, iterable):
	print("Case #{}: {}".format(case_num," ".join(map(str,iterable))))

def print_case_number(case_num, iterable):
	print("Case #{}: {}".format(case_num,iterable))

def print_iterable(A):
	print (' '.join(A))

def read_int():
	return int(f.readline().strip())
def read_int_array():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def read_string():
	return list(f.readline().strip())
def ri():
	return int(f.readline().strip())
def ria():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def rs():
	return list(f.readline().strip())
def bi(x):
	return bin(x)[2:]





from collections import deque
import math
NUMBER = 10**9 + 7
# NUMBER = 998244353
def factorial(n) : 
	M = NUMBER
	f = 1
  
	for i in range(1, n + 1):  
		f = (f * i) % M # Now f never can  
						# exceed 10^9+7  
	return f
def mult(a,b):
	return (a * b) % NUMBER

def minus(a , b):
	return (a - b) % NUMBER

def plus(a , b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		g, y, x = egcd(b % a, a)
		return (g, x - (b // a) * y, y)

def modinv(a):
	m = NUMBER
	g, x, y = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m
def choose(n,k):
	if n < k:
		assert false
	return  mult(factorial(n), modinv(mult(factorial(k),factorial(n-k)))) % NUMBER
from collections import deque, defaultdict 
import heapq


from types import GeneratorType
def bootstrap(f, stack=[]):
	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to

	return wrappedfunc


def dfs(g, timeIn, timeOut,depths,parents): 
	# assign In-time to node u 
	cnt = 0
	# node, neig_i, parent, depth
	stack = [[1,0,0,0]]
	while stack:
		v,neig_i,parent,depth = stack[-1]
		parents[v] = parent
		depths[v] = depth
		# print (v)
		if neig_i == 0:
			timeIn[v] = cnt    
			cnt+=1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i+=1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u,0,v,depth+1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
  
# def isAncestor(u: int, v: int, timeIn: list, timeOut: list) -> str: 
# 	return timeIn[u] <= timeIn[v] and timeOut[v] <= timeOut[u] 

cnt = 0
@bootstrap
def dfs(v,adj,timeIn, timeOut,depths,parents,parent=0,depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt+=1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u,adj,timeIn,timeOut,depths,parents,v,depth+1)
	timeOut[v] = cnt
	cnt+=1
	yield 

def gcd(a,b): 
    if a == 0: 
        return b 
    return gcd(b % a, a) 
  
# Function to return LCM of two numbers 
def lcm(a,b): 
    return (a*b) / gcd(a,b) 
def solution(n):
	return round(lcm(n,360)//n)
	
def main():
	T = 1
	# T = ri()
	for i in range(T):
		n = ri()
		# s = rs()
		# a = ria()
		# n,k = ria()
		# a=ria()

		x = solution(n)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			print >>output,str(x)# "Case #"+str(i+1)+':',
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()

if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
#example usage:
#    for l in res:
#       print >>output, str(len(l)) + ' ' +  ' '.join(l)

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
n=int(input())
print(360/n)

Submission status: Wrong Answer

Solution code:
t = int(input())
ans = 360/t
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
if x < 90: print(360)
else: print(360//(180-x))

Submission status: Wrong Answer

Solution code:
def gcd(a,b):
  if b == 0:return a
  return gcd(b,a%b)

a = int(input())
print(360/gcd(360,a))

Submission status: Wrong Answer

Solution code:
S=input()
S=int(S)

if 360%S==0:
    print(int(360/S))
    
else:
    print(360)

Submission status: Wrong Answer

Solution code:
X = int(input())
if 360 % X == 0:
  print(int(360 / X))
else:
  total = 360
  while(True):
    if total % X == 0:
      break
    else:
      total += 360
  print(int(360 / X))

Submission status: Wrong Answer

Solution code:
n=int(input())
print(360//n)

Submission status: Wrong Answer

Solution code:
n=int(input())
print(n//360)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=360//n
if id(l) == float:
 	print(l+1)
else:
	print(l)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=360/n
print(l)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=360//n
print(l)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

X = int(input())

index = 1
while True:
    if X * index % 180 == 0:
        print(index*2)
        break
    index += 1

Submission status: Wrong Answer

Solution code:
X = int(input())
rad = 90
cnt = 0

while True:
    cnt += 1
    if rad==360:
        break
    else:
        rad += X
        rad = rad if rad < 360 else 360

print(cnt)

Submission status: Wrong Answer

Solution code:
X = int(input())
rad = 90
cnt = 0

while True:
    cnt += 1
    if rad%360==0:
        break
    else:
        rad += X

print(cnt)

Submission status: Wrong Answer

Solution code:
x = int(input())
print((360+x-1)//x)

Submission status: Wrong Answer

Solution code:
import math
X = float(input())
print(math.ceil(360 / X))

Submission status: Wrong Answer

Solution code:
x = int(input())
k = 1
d = 180 - x
while d % 360 != 0:
  k += 1
  d += 180 - x
print(k)

Submission status: Wrong Answer

Solution code:
import math
x=int(input())
ans=math.ceil(360/x)
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())

print(360/x)

Submission status: Wrong Answer

Solution code:
X=int(input())
from math import ceil
print(ceil(360/X))

Submission status: Wrong Answer

Solution code:
import math
X=int(input())
if 360 % X == 0:
    print(360//X)
else:
    print(math.ceil(360/X))

Submission status: Wrong Answer

Solution code:
X=int(input())
if 360 % X == 0:
    print(360//X)
else:
    print(360*X)

Submission status: Wrong Answer

Solution code:
x = int(input())
n = 360
for i in range(1,n):
  if (x*i)%360 == 0:
    print(i)
    exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 360 // x
if 360 % x != 0: ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

X = i()
print(math.ceil(360/X))

Submission status: Wrong Answer

Solution code:
import sys
x=int(input())

for j in range(1,361):
    for k in range(1,361):
        if 360*k==x*j:
            print(x,j,k)
            sys.exit()

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

X = i()
print(360//X)

Submission status: Wrong Answer

Solution code:
print(int(1/(int(input())/360)))

Submission status: Wrong Answer

Solution code:
print(360 //int(input()))

Submission status: Wrong Answer

Solution code:
X = int(input())

if X > 90:
    X = 180 - X

total = 1
while ((X * total) % 360 != 0):
    total += 1

print(total)

Submission status: Wrong Answer

Solution code:

x=int(input())
ans=360//x
print(ans)

Submission status: Wrong Answer

Solution code:
import math
x=int(input())
ans=math.ceil(360/x)
print(ans)

Submission status: Wrong Answer

Solution code:
from math import ceil
x=int(input())
print(ceil(360//x))

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(361):
  if i*x==360:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
import math
x=int(input())
print(math.ceil(360/x))

Submission status: Wrong Answer

Solution code:
import math
y = int(input())
print(y*360//math.gcd(y,360))

Submission status: Wrong Answer

Solution code:
import math

x=int(input())
print(math.ceil(360/(180-x)))

Submission status: Wrong Answer

Solution code:
x = int(input())
for n in range(3, 361):
   if n * (180 - x) == 180 * (n - 2):
      print(n)
      exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
if  360%x == 0:
	k = int(360/x)
	print(k)
else:
	print(360)

Submission status: Wrong Answer

Solution code:
from math import sin,cos,radians,pi
def main():
    n = int(input())
    n = radians(n)
    x,y = 0,0
    theta = radians(90)
    ans = 1
    while 1:
        # 1すすむ
        x += cos(theta)
        y += sin(theta)
        # n度回転
        theta -= n
        if theta<0: theta += radians(360)
        # 判定
        ans += 1
        if (int(x),int(y))==(0,0):
            print(ans)
            return

main()

Submission status: Wrong Answer

Solution code:
from math import sin,cos,radians,pi
def main():
    n = int(input())
    n = radians(n)
    x,y = 0,0
    theta = radians(90)
    ans = 1
    while 1:
        # 1すすむ
        x += cos(theta)
        y += sin(theta)
        # n度回転
        theta -= n
        if theta<0: theta += 2*pi
        # 判定
        ans += 1
        if (int(x),int(y))==(0,0):
            print(ans)
            return

main()

Submission status: Wrong Answer

Solution code:
import math

k = 1
x = float(input())
while  x*k%360 == 0:
  k += 1	
print(k)

Submission status: Wrong Answer

Solution code:
X = int(input())

if 360 % X:
  print(360 * X)
else:
  print(360 // X)

Submission status: Wrong Answer

Solution code:
import math
print(math.ceil(360 / int(input())))

Submission status: Wrong Answer

Solution code:
print(360 // int(input()))

Submission status: Wrong Answer

Solution code:
y=x=int(input())
while y%360:y+=x
print(y/x)

Submission status: Wrong Answer

Solution code:
X = input()
X_int = int(X)

if 360%X_int==0:
  print( int( 360 / X_int) )
else:
  print( 360 )

Submission status: Wrong Answer

Solution code:
import math
 
x = float(input())
if  360%x == 0:
	k = math.floor(360/x)
	print(k)
else:
	k = math.floor((360*x)/x)
	print(360)

Submission status: Wrong Answer

Solution code:
import math
 
x = float(input())
if  360%x == 0:
	k = math.floor(360/x)
	print(k)
else:
	k = math.floor((360*x)/x)
	print(k)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()

def main():
    X = ii()
    for k in range(1,361):
        if k*(180-X) == 180*(k-2):
            print(k)
            exit()



if __name__ == "__main__":
  main()

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
i = 0
while True:
  if n % 360 == 0:
    print(i)
    sys.exit()
  n += n
  i += 1

Submission status: Wrong Answer

Solution code:
x = int(input())

for i in range(1,361):
  if x*i==360:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
X = int(input())
if 360%X == 0:
    print(360//X)
else:
    print(360)

Submission status: Wrong Answer

Solution code:
x = int(input())

ans = 360 // x
x = 360 % x

while x != 0:
    ans += 360 // x
    x = 360 % x

print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())

r = X
ans = 0
while True:
  r += X
  r %= 360
  ans += 1
  if r == 0:
    break
print(ans)

Submission status: Wrong Answer

Solution code:
k = int(input())

print(360 // k)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = 0
for i in range(1,361):
    i += 1
    ans = i * a
    if ans == 360:
        print(int(i))

Submission status: Wrong Answer

Solution code:
import math
pi=math.pi
mi=1e-9
x=int(input())
x,y=1,0
cnt=1
while -mi<x<mi or -mi<y<mi:
  x+=math.cos(cnt*x*pi/180)
  y+=math.sin(cnt*x*pi/180)
  cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
  
x=int(input())
num=lcm(x,360)
print(num//360)

Submission status: Wrong Answer

Solution code:
t=int(input())
if(360%t==0):
  print(int(360/t))
else:
  t=360/t
  s=360%t
  print(t*s)

Submission status: Wrong Answer

Solution code:
t=int(input())
if(360%t==0):
  print(int(360/t))
else:
  t=360/t
  s=360%t
  print(int(t)*s)

Submission status: Wrong Answer

Solution code:
t=int(input())
if(360%t==0):
  print(360/t)
else:
  t=360/t
  s=360%t
  print(t*s)

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(360):
  if (i*n+n)%360==0:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
X = int(input())
for i in range(1, 361):
  if i%X == 0:
    print(i//X)
    exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
if 1 <= x <= 179:
  num = 360 / x
  if isinstance(num, int):
  	print(num)
  else:
    print(360 * x)

Submission status: Wrong Answer

Solution code:
x=int(input())
for i in range(1,361):
  if (i*x)%360==0:
    print(i)

Submission status: Wrong Answer

Solution code:
n = int(input())

if 360 % n == 0:
    print(360 // n)
else:
    print(720/(180-n))

Submission status: Wrong Answer

Solution code:
import math
import numpy as np
X = int(input())
a = float(0)
b = float(0)

for i in range(0,90): 
	Y = X * i
	a += np.sin(Y)
	b += np.cos(Y)
	if a == 0 and b == 0: 
		break
print(i)

Submission status: Wrong Answer

Solution code:
import math
X = int(input())

if 360 % X == 0:
    ans = 360 // X
else:
    if 360 % (180 - X) == 0:
        ans = 360 // (180 - X)
    else:
        ans = (360 * X) // math.gcd(360, X)
print(ans)

Submission status: Wrong Answer

Solution code:
#%%
import math

x = int(input())

k = (x / 180) + 2

print (math.ceil(k))

Submission status: Wrong Answer

Solution code:
k = int(input())
if 1 <= k <= 179:
  num = 360 / k
  if isinstance(num, int):
  	print(num)
  else:
    print(360 * k)

Submission status: Wrong Answer

Solution code:
k = int(input())
if 0 <= k <= 179:
  num = 360 / k
  if isinstance(num, int):
  	print(num)
  else:
    print(360 * k)

Submission status: Wrong Answer

Solution code:
k = int(input())
if 0 <= k <= 179:
  num = 360 / k
  if isinstance(num, int):
  	print(num)
  else:
    print(360)

Submission status: Wrong Answer

Solution code:
x=int(input())
res=360//x
print(res)

Submission status: Wrong Answer

Solution code:
x = int(input())
t = 0
while True:
    if 360 % x == 0:
        res = int(360 / x)
        t += res
        break
    else:
        for i in range(2, 362):
            if i * x > 360:
                x = i * x - 360
                t += i
                break
print(t)

Submission status: Wrong Answer

Solution code:
x=int(input())
res=0
if(360%x==0):
  res=360//x
print(res)

Submission status: Wrong Answer

Solution code:
import numpy as np
X = int(input())
a = ()
b = ()

for i in range(1,360): 
	a += np.sin(X * i)
	b += np.cos(X * i)
	if a == 0 and b == 0: 
		break
print(i)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
 
def Strider():
 
    NumA = int(input())
 
    count = 360/NumA
    
    NumB = 1
    
    while (count == 0):
        NumB = NumB + 1
        count = 360*NumB/NumA
    
    print(int(count))
 
if __name__ == '__main__':
    Strider()

Submission status: Wrong Answer

Solution code:
x = int(input())
t = 0
while True:
    if 360 % x == 0:
        res = int(360 / x)
        t += res
        break
    else:
        for i in range(2, 361):
            if i * x > 360:
                x = i * x - 360
                t += i
                break
print(t)

Submission status: Wrong Answer

Solution code:
X = int(input())

if 360 % X == 0:
    ans = 360 // X
else:
    if X > 90:
        ans = 360 // (180 - X)
    else:
        ans = 360
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
X = int(input())
a = 0
b = 0

for i in range(1,360): 
	a += np.sin(X * i)
	b += np.cos(X * i)
	if a == 0 and b == 0: 
		print(i)

Submission status: Wrong Answer

Solution code:
k = int(input())
if 0 <= k and k <= 179:
	num = int(360 / k)
	print(num)

Submission status: Wrong Answer

Solution code:
n = int(input())

if 360 % n == 0:
    print(360 // n)
else:
    print(180 // n)

Submission status: Wrong Answer

Solution code:
x = int(input())
n = 360
cnt = 0
if n % x == 0:
    print(360//x)
else:
    while n != 0:
        if n == 0:
            cnt += 1
            break
        elif n > 0:
            n -= x
            cnt += 1
        else:
            n += 180
    print(cnt-1)

Submission status: Wrong Answer

Solution code:
k = int(input())
if 0 <= k <= 179:
	num = int(360 / k)
	print(num)

Submission status: Wrong Answer

Solution code:
k = int(input())

num = int(360 / k)

print(num)

Submission status: Wrong Answer

Solution code:
a=int(input())
print(360//a)

Submission status: Wrong Answer

Solution code:
import math
x=int(input())
if 360%x==0:
  print(360//x)
else:
  k=0
  xt=x
  p=[0,1]
  for i in range(1,2000):
    xt+=x
    rad=xt/180*math.pi
    p[0]+=-math.sin(rad)
    p[1]+=-math.cos(rad)
    if math.isclose(p[0], 0, abs_tol=1e-10) and math.isclose(p[1], 0, abs_tol=1e-10):
      break
  if i==1999:
    print(0)
  else:
    print(i)

Submission status: Wrong Answer

Solution code:
import math
x=int(input())
if 360%x==0:
  print(360//x)
else:
  k=0
  xt=x
  p=[0,1]
  for i in range(1,1000):
    xt+=x
    rad=xt/180*math.pi
    p[0]+=-math.sin(rad)
    p[1]+=math.cos(rad)
    if math.isclose(p[0], 0, abs_tol=1e-10) and math.isclose(p[1], 0, abs_tol=1e-10):
      break
  if i==999:
    print(0)
  else:
    print(i)

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(1, n):
  x=360*i%n
  if x==0:
    print(360*i//n)
    break;
  else:
    continue;

Submission status: Wrong Answer

Solution code:
import math
x=int(input())
if 360%x==0:
  print(360//x)
else:
  k=0
  xt=x
  p=[0,1]
  for i in range(1,2000):
    xt+=x
    rad=xt/180*math.pi
    p[0]+=-math.sin(rad)
    p[1]+=-math.cos(rad)
    if math.isclose(p[0], 0, abs_tol=1e-10) and math.isclose(p[1], 0, abs_tol=1e-10):
      break
  if i==999:
    print(0)
  else:
    print(i)

Submission status: Wrong Answer

Solution code:
x = int(input())
n = 360
cnt = 0
if 360 % x == 0:
    print(360//x)
else:
    while n != 0:
        if n == 0:
            cnt += 1
            break
        elif n > 0:
            n -= x
            cnt += 1
        else:
            n += 180
print(cnt-1)

Submission status: Wrong Answer

Solution code:
X = int(input())

if 360 % X == 0:
	ans = 360 // X
else:
	if X > 90:
		ans = 360 // (180 - X)
	else:
		ans = 0
print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())

if 360 % X == 0:
    ans = 360 // X
else:
    if X > 90:
        ans = 360 // (180 - X)
    else:
        ans = 360 // (90 - X)
print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    X = int(input())

    x1, x2 = X, 180 - X
    for n in range(3, 361):
        s = 180 * (n - 2)
        d, m = divmod(s, n)
        if d == x1 or d == x2:
            print(n)
            break


main()

Submission status: Wrong Answer

Solution code:
import math
X = int(input())

if 360 % X == 0:
	ans = 360 // X
else:
	ans = 360 // (180 - X)

print(ans)

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
if x <= 90: print(math.ceil(360//x))
else: print(math.ceil(360//(180-x)))

Submission status: Wrong Answer

Solution code:
x = int(input())
t = 0
while True:
    if 360 % x == 0:
        res = int(360 / x)
        t += res
        break
    else:
        for i in range(2, 360):
            if i * x > 360:
                x = i * x - 360
                t += i
                break
print(t)

Submission status: Wrong Answer

Solution code:
x = int(input())
while True:
    if 360 % x == 0:
        res = int(360 / x)
        break
    else:
        for i in range(2, 360):
            if i * x > 360:
                x = i * x - 360
                break
print(res)

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    X = int(input())

    for n in range(3, 361):
        s = 180 * (n - 2)
        d, m = divmod(s, n)
        d = min(d, 180 - d)
        if d == X:
            print(n)
            break


main()

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
if 360%X==0:
  print(360//X)
else:
  remainder = 360%X
  p = int(math.gcd(remainder,X))
  q = int((remainder*X)//p)
  count = int(360//X)
  i = 0
  r = remainder
  while i<(q//3):
    count+=(((360+r)-7)//7)
    r = (r+remainder)%X
    i+=remainder
  print(count+(q//3))

Submission status: Wrong Answer

Solution code:
import math

x = float(input())
k = 360/x

print(math.floor(k))