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:
import sys
readline = sys.stdin.readline

def gcd(a,b):
    if a < b:
        a,b = b,a
    while a % b != 0:
        r = a % b
        a,b = b,r
    return b

def solve():
    X = int(readline())
    a = 180 - X

    g = gcd(a, 360)
    assert 360 % g == 0
    ans = 360 // g
    print(ans)


solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X=int(input())
n=360
while 1:
  if n%X==0:
    print(n//X)
    break
  a=int(n//X)
  b=n-a*X
  n=n-b

Submission status: Wrong Answer

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

def lcm(a):
    return (x*360)//math.gcd(x,360)

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

else:
    print(lcm(x))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
import string

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

print(math.floor(k))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
abc = int(input())
k =360//abc
print(k)

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:
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 not m and d == X:
            print(n)
            break


main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = 0
while b <= 360:
    b += 1
    ans = b * a
    if ans == 360:
        print(int(b))
        break

Submission status: Wrong Answer

Solution code:
theta= int(input())
if 360%(180-theta)==0:
    print(360//(180-theta))
elif 360%theta==0:
    print(360//theta)
else:
    print(360)

Submission status: Wrong Answer

Solution code:
import math
 
x = int(input())
rad = (math.pi / 180) * x
 
cos = 0
sin = 0
k = 0
while True:
    cos += (math.cos(rad * k))
    sin += (math.sin(rad * k))
    k += 1
    if int(cos) ==0 and int(sin) == 0:
        break
print(k)

Submission status: Wrong Answer

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

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:
    count+=(((360+r)-7)//7)
    r = (r+remainder)%X
    i+=remainder
  print(count+(q//3))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a=360/N
print(int(a))
b=isinstance(a, float)
text_a = str(b)
text_b =float
c=text_a == text_b
if c!=False:
    print(int(a+1))

Submission status: Wrong Answer

Solution code:
from sys import stdin


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

    if X < 60:
        X = 180 - X
    for n in range(3, 100000):
        s = 180 * (n - 2)
        d, m = divmod(s, n)
        if not m and 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:
    count+=(((360+r)-7)//7)
    r = (r+remainder)%remainder
    i+=remainder
  print(count+(q//3))

Submission status: Wrong Answer

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

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:
    count+=(((360+r)-7)//7)
    r = (r+remainder)%remainder
    i+=1
  print(count+(q//3))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = 0
while b <= 360:
    b += 1
    ans = b * a
    if ans == 360:
        print(b)

Submission status: Wrong Answer

Solution code:
X=int(input())
n=360
i=1
while 1:
  if n%X==0:
    print(n//X)
    break
  i+=1
  n*=i

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b = 1
while b < 180:
    b += 1
    ans = b * a
    if ans == 360:
        print(b)

Submission status: Wrong Answer

Solution code:
from sys import stdin


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

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


main()

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
k = 360 / x
m = math.ceil(k)
n = math.floor(k)
gosa = m - n

if gosa != 0:
    print ((360/gosa) *m)
else:
    print (int(m))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    X=int(input())
    print(360//X)

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

x = int(input())
rad = (math.pi / 180) * x

cos = 0
sin = 0
k = 0
while True:
    cos += (math.cos(rad * k))
    sin += (math.sin(rad * k))
    k += 1
    if int(cos) ==0 and int(sin) == 0:
        break
if k == 359:
    k = 360
print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
x = float(input())
max_num = 360

if(1 <= x <= 179 and x.is_integer() == True):
    k = abs(round(max_num / x))
    print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
theta = 90
y, x = 1, 0
ans = 1
while x != 0 or y != 0:
    ans += 1
    theta += X
    y += math.sin(math.radians(theta))
    x += math.cos(math.radians(theta))
    y = round(y, 2)
    x = round(x, 2)

print(ans)

Submission status: Wrong Answer

Solution code:
import math

theta = int(input())

if theta > 90:
    theta = abs(theta-180)
    print(theta)

if 360%theta == 0:
    print(360//theta)

else:
    gcdiv = math.gcd(theta,360)
    kotae = ((360//gcdiv) * (theta//gcdiv))
    print(kotae)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# atcoder 
# Türkler var mı?
# Herkese memnün oldum
import sys

iimr = lambda: map(int, sys.stdin.readline().rstrip().split())
sys.setrecursionlimit(10 ** 8)


def 関数(x):
     
    k = 360 // x
    if (360 % x) != 0:
        k += 1
    return k

def teste():
    for i in range(1, 180):
        print(i,": ",  360 // float(i))

def çözmek():
    X = int(input())
    res = []
    res.append(関数(X))
    print(*res, sep="\n")

if __name__ == "__main__":
    çözmek()

Submission status: Wrong Answer

Solution code:
N = int(input())

print(360/N)

Submission status: Wrong Answer

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

if 360 % X == 0:
    ans = 360 // X
else:
    if X <= 90:
        x = X
    else:
        x = X - 90

    ans = (360 * x) // math.gcd(360, x)

print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())

x = a
i = 1

while x % 180 != 0:
    x += a
    i += 1

print(i*2)

Submission status: Wrong Answer

Solution code:
import math 
X = int(input())
lcm = round(360 * X / math.gcd(360, X))
print(lcm)
K = round(lcm / X)
print(K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = float(input())
max_num = 360

if(1 <= x <= 179 and x.is_integer() == True):
    k = abs(round(max_num / x))
    print(k)
else:
    print(False)

Submission status: Wrong Answer

Solution code:
x = int(input())
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table
t = divisor(360)
m = 0
for a in t:
  m = min(m, abs(a-x))
if m==0:
  print(360//x)
else:
  print(360//m)

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    print(360//int(input()))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

theta = int(input())
if 360%theta == 0:
    print(360//theta)
else:
    gcdiv = math.gcd(theta,360)
    kotae = ((360//gcdiv) * (theta//gcdiv))
    print(kotae)

Submission status: Wrong Answer

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

steps = 1
X = x

a,b = math.sin((22*x)/(7*180)),math.cos((22*x)/(7*180))
while True:
    # print(x,a,b)
    x = (x+X)
    r = (22*x)/(7*180)
    a = a + math.sin(r)
    b = b + math.cos(r)
    steps+=1
    if a<10**(-12) and b<10**(-12):
        break
    
if 360%X==0:
    steps+=1  
print(steps)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

steps = 1
X = x

a,b = math.sin((22*x)/(7*180)),math.cos((22*x)/(7*180))
while True:
    # print(x,a,b)
    x = (x+X)
    r = (22*x)/(7*180)
    a = a + math.sin(r)
    b = b + math.cos(r)
    steps+=1
    if a<10**-12 and b<10**-12:
        break
    
    
print(steps+1)

Submission status: Wrong Answer

Solution code:
import math

delta=180-int(input())
theta=0
btdt=[]
count=0
while(theta not in btdt):
    btdt.append(theta)
    theta=(theta+delta)%360
    count+=1
print(count)

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())
import math

steps = 1
X = x

a,b = math.sin((22*x)/(7*180)),math.cos((22*x)/(7*180))
while True:
    # print(x,a,b)
    x = (x+X)
    r = (22*x)/(7*180)
    a = a + math.sin(r)
    b = b + math.cos(r)
    steps+=1
    if a<10**-6 and b<10**-6:
        break
    
    
print(steps+1)

Submission status: Wrong Answer

Solution code:
x = int(input())

print(int(360 / x))

Submission status: Wrong Answer

Solution code:
X = int(input()) 
q = 360//X
mod = 360 % X

if mod > 0:
  print(q * (mod+1))

else: print(q)

Submission status: Wrong Answer

Solution code:
import math

x = int(input())
a = math.gcd(360,x)
b = int(x/a)
c= int(360/a)
d = c*b
print(d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())
k = 360 / x
if k.is_integer():
  print(int(k))
else:
  for idx in range(2, x+1):
    tmp = k * idx
    if tmp.is_integer():
      print(tmp)
      break

Submission status: Wrong Answer

Solution code:
import math

angle = int(input())
c = 1
x = 0
y = 1

while [round(x),round(y)] != [0,0]:
  angle_u= 180-angle*c
  y -= math.cos(math.radians(angle_u))
  x -= math.sin(math.radians(angle_u))
  c += 1
else:
  print(c)

Submission status: Wrong Answer

Solution code:
X = int(input()) 
q = 360//X
mod = 360 % X

if mod > 0:
  print(q * mod)

else: print(q)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
degree = float(input())
max_num = 360

if(1 <= degree <= 179 and degree.is_integer() == True):
    answer = round(max_num / degree)
    print(answer)
else:
    print(False)

Submission status: Wrong Answer

Solution code:
import math

theta = int(input())

if 360%theta == 0:
    print(360//theta)
else:
    gcdiv = math.gcd(theta,360)
    kotae = ((360//gcdiv) * (theta//gcdiv))
    print(kotae//theta)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
degree = float(input())
max_num = 360

if(1 <= degree <= 179 and degree.is_integer() == True):
    answer = round(max_num / degree)
    print(answer)
elif(degree.is_integer() == False):
    print(False)
else:
    print(False)

Submission status: Wrong Answer

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

steps = 1
X = x

a,b = math.sin(3.14159*x/180),math.cos(3.14159*x/180)
while True:
    # print(x,a,b)
    x += X
    r = 3.14159*x/180
    a = a + math.sin(r)
    b = b + math.cos(r)
    steps+=1
    if a<10**-6 and b<10**-6:
        break
    
    
print(steps)

Submission status: Wrong Answer

Solution code:
x=int(input())
if x<60:
    x=180-x
for i in range(3,100000):
    if 180*(i-2)==x*i:
        print(i)
        exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
k = 360 / x
out = None
for l in range(1, 10000):
  if (k * l).is_integer():
    out = k * l
    break
print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    for j in range(1,361):
     if a*i/j==360:
      print(str(int(j*i)+1))
      break
     else:
       pass

Submission status: Wrong Answer

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

steps = 1
X = x

a,b = math.sin(3.14159*x/180),math.cos(3.14159*x/180)
while True:
    # print(x,a,b)
    x += X
    r = 3.14159*x/180
    a = a + math.sin(r)
    b = b + math.cos(r)
    steps+=1
    if a<10**-12 and b<10**-12:
        break
    
    
print(steps)

Submission status: Wrong Answer

Solution code:
import math

delta=180-int(input())
print(round((delta*360/math.gcd(delta,360))/delta))

Submission status: Wrong Answer

Solution code:
b3=[39, 78, 156, 161, 175, 168]
a=int(input())
b=360/a
b2=str(b)
head, sep, tail = b2.partition('.')
for c in b3:
    if c==a:
        print(int(head))
if tail=='0':
    print(int(b))
else:
    print(int(head)+1)

Submission status: Wrong Answer

Solution code:
from math import gcd

X=int(input())
g=gcd(X,360)
print((360*X)//(g**2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    for j in range(1,361):
     if a*i/j==180:
      print(str(int(j*i+1)))
      break
     else:
       pass

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import gcd

def lcm(a, b):
    return (a * b) // gcd(a, b)

n = int(input())
if n > 90:
    n = 180 - n

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

Submission status: Wrong Answer

Solution code:
x = int(input())
k = 360 / x
out = None
for l in range(1, 181):
  if (k * l).is_integer():
    out = k * l
    break
print(out)

Submission status: Wrong Answer

Solution code:
inputStr = input()
inputNum = int(inputStr)
K = 0
if( 360 % inputNum == 0):
           K =  360 / inputNum 
else:
           K= 360 / inputNum
 
print(int(K))

Submission status: Wrong Answer

Solution code:
X = int(input()) 
q1 = 360/X
print(int(q1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=int(input())
t=x
if(360%x==0):
    print(360//x)
else:
    count=0
    while(x!=360):
        x+=t
        if(x>360):
            x=x-360
            t=x
        count+=1
    print(count-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
inputStr = input()
inputNum = int(inputStr)
K = 0
if( 360 % inputNum == 0):
           K =  360 / inputNum 
else:
           K= 360 / inputNum + 1

print(int(K))

Submission status: Wrong Answer

Solution code:
x = int(input())

result = 360/x
print(int(result))

Submission status: Wrong Answer

Solution code:
X= int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=int(input())
t=x
if(360%x==0):
    print(360//x)
else:
    count=0
    while(x!=360):
        x+=t
        if(x>360):
            x=x-360
            t=x
        count+=1
    print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    for j in range(1,361):
     if a*i/j==180:
      print(str(int(j*i)))
      break
     else:
       pass

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)
        if not m and (d == X or d == 180 - X):
            print(n)
            break


main()

Submission status: Wrong Answer

Solution code:
#A 
import math
n = int(input())
if n%2==0:
    print(360//n)
else:
    print(math.ceil(360/n))

Submission status: Wrong Answer

Solution code:
x = int(input())
import math
a = -(-360//x)
b = math.gcd((x*a)%360,360)
print(a*b)

Submission status: Wrong Answer

Solution code:
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    for j in range(1,361):
     if a*i/j==360:
      print(str(int(j*i)))
      break
     else:
       pass

Submission status: Wrong Answer

Solution code:
a = int(input())

print(int(round(360/a, 0)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=int(input())
a=360
for i in range(360):
  if a>x and a%x!=0:
    a=a%x
  elif a>x:
    break
  elif x%a!=0:
    x=x%a
  else:
    break
if x>=a:
  print(360/a)
else:
  print(360/x)

Submission status: Wrong Answer

Solution code:
degree = float(input())
max_num = 360

if(1 <= degree <= 179 and degree.is_integer() == True):
    answer = max_num / degree
    print(answer)
elif(degree.is_integer() == False):
    print(False)
else:
    print(False)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    pass

print('0')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())

print(360//a)

Submission status: Wrong Answer

Solution code:
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    print(0)

Submission status: Wrong Answer

Solution code:
X = int(input()) 
q1 = 360/X

if X == 60:
  print(3)
else:
  print(int(q1))

Submission status: Wrong Answer

Solution code:
x=int(input())
temp=360
i=2
while temp%x:
	temp*=i
	i+=1
print(temp//x)

Submission status: Wrong Answer

Solution code:
from math import gcd

def lcm(a, b):
    return (a * b) // gcd(a, b)

n = int(input())
if n > 90:
    n = 180 - n

x = lcm(n, 360)
if n==60:
   print(3)
   exit()
print(x // n)

Submission status: Wrong Answer

Solution code:
import math
from fractions import Fraction
X = int(input())
n = 360 / X
m = Fraction(X,360)
s = m.denominator
a,b = math.modf(n)
if a == 0:
    print(int(n))
else:
    print(int(m*s))

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
if 90 >= X:
  if 360%X == 0:
    print(int(360/X))
  else:
    print(math.floor(360/X))
elif 90 < X <= 179:
  if 360%(180-X) == 0:
    print(int(360/(180-X)))
  else:
    print(math.floor(360/(180-X)))

Submission status: Wrong Answer

Solution code:
X = int(input()) 
q1 = 360/X

if X == 60:
  print(3)
elif X == 120:
  print(6)
else:
  print(int(q1))

Submission status: Wrong Answer

Solution code:
x = int(input())

y = 180-x

z = 180-y

print(int(360/z))

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
if X >= 90:
  if 360%X == 0:
    print(int(360/X))
  else:
    print(math.floor(360/X))
elif 90 < X <= 179:
  if 360%(180-X) == 0:
    print(int(360/(180-X)))
  else:
    print(math.floor(360/(180-X)))

Submission status: Wrong Answer

Solution code:
n = int(input())
c=180-n
k=1
while(1):
  if c*k%180==0:
    print(k)
    break
  else:
    k+=1

Submission status: Wrong Answer

Solution code:
import math

turn_angle = int(input())

current_angle = 90
position_dict = {'x': 0, 'y': 0}
move_one = {'x':0, 'y': 1}
num_actions = 1


def change_angle(turn_angle, current_angle):
    current_angle = current_angle + turn_angle
    if current_angle > 360:
        current_angle = current_angle - 360
    return current_angle

def resolve_direction(current_angle):
    radian_angle = (current_angle*math.pi)/180
    move_dict = {'x':round(math.cos(radian_angle), 2), 'y' : round(math.sin(radian_angle), 2)}
    return move_dict

def move_skater(position_dict, move_dict):
    for key, value in position_dict.items():
        position_dict[key] = round((value + move_dict.get(key, 0)), 2)
    return position_dict

position_dict = move_skater(position_dict, move_one)
current_angle = change_angle(turn_angle, current_angle)


origin_dict = {'x': 0.0, 'y': 0.0}

while position_dict != origin_dict:
    move_dict = resolve_direction(current_angle)
    position_dict= move_skater(position_dict, move_dict)
    current_angle = change_angle(turn_angle, current_angle)
    num_actions = num_actions + 1

print(num_actions)

Submission status: Wrong Answer

Solution code:
x = int(input())
import math
a = -(-360//x)
b = math.gcd(a-(360%a),360)
tem = b
info = []
while True:
    tem = math.gcd(tem-(360%tem),360)
    info.append(tem)
    if (360%tem) == 0:
        break
ans = a*(360//b)
for i in info:
    ans *= i

print(ans)

Submission status: Wrong Answer

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

if 360 % X == 0:
	ans = 360 // X
else:
	x = 0
	if X <= 90:
		x = X
	else:
		x = X - 90

	ans = (360 * x) // math.gcd(360, X)

print(ans)

Submission status: Wrong Answer

Solution code:
import math

delta=int(input())
theta=90+delta
dist= 1
x,y=0,1
count=1
while(round(dist)!=0):
    rad= theta*math.pi/180
    vx= math.cos(rad)
    vy=math.sin(rad)
    x+=vx
    y+=vy
    dist= math.sqrt(x*x+y*y)
    count+=1
    theta=(theta+delta)%360
print(count)

Submission status: Wrong Answer

Solution code:
from sys import stdin


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

    n, s = 3, 180
    while 1:
        d = s // n
        if d == X or d == 180 - X:
            break
        else:
            n += 1
            s += 180
    print(n)


main()

Submission status: Wrong Answer

Solution code:
X = int(input()) 
q1 = 360//X

if X == 60:
  print(3)
elif X == 120:
  print(6)
else:
  print(q1)

Submission status: Wrong Answer

Solution code:
import math
def main():
    N = int(input())
    K = 0
    X = 0
    Y = 0
    R = 90

    while True:
        R = (N+R)%360
        K+=1
        X += math.cos(math.radians(R))
        Y += math.sin(math.radians(R))
        if abs(X)<0.01 and abs(Y)<0.01:
            print(K)
            break

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
def main():
    N = int(input())
    K = 0
    X = 0
    Y = 0
    R = 90

    while True:
        R = (N+R)%360
        K+=1
        X += math.cos(math.radians(R))
        Y += math.sin(math.radians(R))
        if abs(X)<0.05 and abs(Y)<0.05:
            print(K)
            break




if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import operator as op
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import reduce
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,
                  log2, pi, radians, sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

# For getting input from input.txt file
# sys.stdin = open('input.txt', 'r')

# Printing the Output to output.txt file
# sys.stdout = open('output.txt', 'w')


def inp():
    return(int(input()))


def inlist():
    return(list(map(int, input().split())))


def instr():
    s = input()
    return(list(s[:len(s)]))


def invr():
    return(map(int, input().split()))


def def_value():
    return 0


x = inp()

res = 360 // x

if 360 % x != 0:
    res = (res*2) + 2
print(res)

Submission status: Wrong Answer

Solution code:
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys
input = sys.stdin.readline
ipnl = lambda n: [int(input()) for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]

x = inp()
ans = 360//x
if 360%x == 0:
    print(ans)
else:
    print(2*ans +1)

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())
k= int(360/x)
print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
b=360/a
b2=str(b)
head, sep, tail = b2.partition('.')
if (tail[0]=='0') or (tail[0]==9):
    print(int(b))
else:
    print(int(head)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
K = int(360/X)
print(K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
 
X=int(input())

# X x ans = 360
# ans = 360/X

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
 
X=int(input())

# X x ans = 360
# ans = 360/X

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

Submission status: Wrong Answer

Solution code:
X = int(input())

print(360 / X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
 
X=int(input())

# X x ans = 360
# ans = 360/X

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