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 math

x = int(input())

K = 360 / x
y = type(K)
if y == float:
    print(math.ceil(K))
else:
    print(K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout
for _ in range(1):#int(stdin.readline())
    n=int(stdin.readline())
    print(360//n if 360%n==0 else 0)

Submission status: Wrong Answer

Solution code:
import sys 
def main(source, step, dest): 

    if (abs(source) > (dest)) : 
        return sys.maxsize  
      
    if (source == dest): 
        return step 
    pos = main(source + step + 1, 
                    step + 1, dest) 
  
    neg = main(source - step - 1,  
                    step + 1, dest) 
  
    return min(pos, neg) 

dest = 11; 
print("No. of steps required", 
               " to reach " ,dest ,  
        " is " , main(0, 0, dest));

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
    return k

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

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

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(math.gcd(180-X,360))

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:
n = int(input())
print(360//abs(180-n))

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 0
i = 0
while i == 0:
    ans = ans + x
    if ans % 360 == 0:
        print(ans)
        break

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())
print(round(360/x))

Submission status: Wrong Answer

Solution code:
import sys
x = int(input())
y = 0
m = 1
if 360 % x == 0:
    m = int(360 / x)
else:
    for i in range(1, 360):
        y = x * i
        if y > 360:
            if y % 360 == 0:
                m = i
                break
                
print(m)

Submission status: Wrong Answer

Solution code:
x = int(input())

if x <= 90:
	k = 360 // x
	print (k)
else:
	y = 180 - x
	k = 360 // (90 - y // 2)
	print(k)

Submission status: Wrong Answer

Solution code:
X = int(input())
print(360//X*(360%X+1))

Submission status: Wrong Answer

Solution code:
x=int(input())
if x<90:
  rad=180-2*(90-x)
elif x>90:
  rad=180-2*(180-x)
else:
  rad=90 

print(360//rad)

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)

print(x // n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
x = int(input())
y = 0
m = 0
if 360 % x == 0:
    m = int(360 / x)
else:
    for i in range(1, x + 1):
        y = x * i
        if y > 360:
            if y % 360 == 0:
                m = i
                break
                
print(m)

Submission status: Wrong Answer

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

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

print(ans)

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)
print(res)

Submission status: Wrong Answer

Solution code:
import math

X = int(input())/180*math.pi
x = 0.0
y = 0.0
arg = math.pi/2
count = 0

while True:
    x += round(math.cos(arg))
    y += round(math.sin(arg))
    arg += X
    count += 1
    if x == 0 and y == 0:
        print(count)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from itertools import count

y = 180 - int(input())
print(next(i for i in count(1) if i * y % 360 == 0))

Submission status: Wrong Answer

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

if 360%X == 0:
  print(int(360/X))
else:
  print(math.floor(360/X))

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)

Submission status: Wrong Answer

Solution code:
x = int(input())
if(x==0):
  print( float("inf"))
else:
    print (360//x)

Submission status: Wrong Answer

Solution code:
X = int(input())
Y = 180 - X
A = Y
ans = 1
if Y < 90:
    while A % 180 != 0:
        A += Y
        ans += 1
    print(ans)
else:
    while A % 360 != 0:
        A += Y
        ans += 1
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if(1 <= degree <= 179):
    answer = max_num / degree
    print(answer)
else:
    print('out of range')

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) + 1
print(res)

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(360)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# get a integer
a = int(input())

m = a
c = 1
while m % 360 != 0:
	m+=a
	c+=1
print(m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
x = int(input())
def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return factors

y = prime_factors(x)
y_dict =defaultdict(int)
ans = 1
for i in y:
    y_dict[i] += 1
    if i not in [2,3,5]:
        ans *= i
ans *= 2**abs(3-y_dict[2])
ans *= 3**abs(2-y_dict[3])
ans *= 5**abs(1-y_dict[5])
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==360:
      print(str(int(a*i/j)))
      break
     else:
       pass

Submission status: Wrong Answer

Solution code:
x=int(input())
i=1
if 1<=x<=179:
	while True:
		if 360*i%x==0:
			print(int(360/x))
			break
		else:
			i+=1

Submission status: Wrong Answer

Solution code:
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    x = int(input())
    # 整数複数個
    # a, b = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    if 360 % x == 0:
        print(int(360/x))
    else:
        import math
        print(math.gcd(360, x) //x)
resolve()

Submission status: Wrong Answer

Solution code:
x = int(input())

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

Submission status: Wrong Answer

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


print(360//math.gcd(360,x))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
if x == 1:
  print(360 / x)
elif x == 45:
  print(360 / x)
elif x == 90:
  print(360 / x)
else:
  z = lcm(x, 360)
  print(math.floor(z / x))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

X = int(input())

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

Submission status: Wrong Answer

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

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(i)
      break
     else:
       pass

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import sys
x=int(input())

for i in range(1,10000) :
    if 360/(x*i) == 1 :
        print(i)
        sys.exit()

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
if x == 1:
  print(360 / x)
elif x == 45:
  print(360 / x)
elif x == 90:
  print(360 / x)
else:
  z = lcm(x, 360)
  print(int(z / x))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
if 1 <= X <= 179:
  print(int(360/X))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

rotate = int(input())

x = 0
y = 1
heading = 90

count = 1

while True:
    heading += rotate
    x += np.cos(np.deg2rad(heading))
    y += np.sin(np.deg2rad(heading))
    count += 1
    #print('heading', heading)
    #print('x : ', x)
    #print('y : ', y)

    if math.isclose(x, 0.0,abs_tol=0.01) and math.isclose(y, 0.0,abs_tol=0.01):
        break

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)))
  else:
    for j in range(1,361):
     if a*i/j==360:
      print(i)
      break
     else:
       pass

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
x=int(input())
ct=0
for i in range(1000):
  ct+=(180-x)
  if ct%360==0:
    print(i+1)
    exit()

Submission status: Wrong Answer

Solution code:
X = int(input())
X = min(X, 180-X)
print(360//X)

Submission status: Wrong Answer

Solution code:
x = int(input())
x_max = 179

for i in range(1,x_max):
    if((360 * i) % x == 0):
        tmp = (360 * i) / x
        print(int(tmp))
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

x=int(input())
if(x>90):
    x=180-x
print(math.ceil(360/x))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k = int(input())
d, r = divmod(360, k)
while r:
  x, y = divmod(360, r)
  r = y
  d += x
print(d)

Submission status: Wrong Answer

Solution code:
x=float(input())
actions=float(360/x)
print(float(actions))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(K)

Submission status: Wrong Answer

Solution code:
#from collections import deque,defaultdict
from sys import stdin
input = stdin.readline
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

x = inn()
for i in range(1,361):
    if ((180-x)*i)%360==0:
        print(i)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
degree = input()

max_num = 360

answer = max_num / int(degree)
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


def main():
    import math
    X = int(input())

    print(math.ceil(360 / X))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

x = int(input())

if 360 % x == 0:
    m = math.ceil(360 / x)
    print(m)
else:
    print(0)

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:
s=input()
s=int(s)
print(360/s)

Submission status: Wrong Answer

Solution code:
from sys import stdin


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

    ans = 360 // X
    print(ans)


main()

Submission status: Wrong Answer

Solution code:
import math

X = int(input())/180*math.pi
x = 0
y = 0
arg = math.pi/2
count = 0

while True:
    x += round(math.cos(arg))
    y += round(math.sin(arg))
    arg += X
    count += 1
    if x == 0 and y == 0:
        print(count)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


def main():
    X = int(input())

    print(int(360 / X))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
X=int(input())
if 360%X==0:
  K=360//X
  print(K)
elif 360%X!=0:
  K=2*(360//(180-X))
  print(K)

Submission status: Wrong Answer

Solution code:
import math

X= int(input())

if X>=90:
    print(int(360/X))

Submission status: Wrong Answer

Solution code:
x = int(input())

ans = 360 / x

if ans - int(ans) != 0:
    print(int(ans) + 1)
else:
    print(int(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


n = int(readline())
ans = 360//n
print(ans)

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 X*360//math.gcd(X,360) == 360:
    print(360//X)
else:
    print(X*360)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
"""AtCoder Grand Contest 046: A - Takahashikun, The Strider
https://atcoder.jp/contests/agc046/tasks/agc046_a
"""


def calc(x):
    ans = 0
    while True:
        next = 360 % x
        if next == 0:
            ans += 360 // x
            return ans
        x = next


def main():
    X = int(input())
    print(calc(X))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x=int(input())
i=1

while (x*i)%180!=0:
  i=i+1

print(i)

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())

k = 4
if x <= 90:
    k = 360/x
else:
    k = 360/ (180-x)

k = int(k)
print(k)

Submission status: Wrong Answer

Solution code:
x = int(input())
n = 0
while (x*n)%360!=0:
    n+=1
print(n)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

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

X = int(input())
R = 360
if R % X == 0:
  print(int(R/X))
else:
  print(lcm(R, X))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)
from math import gcd,ceil

def lcm(a,b):return a*b//gcd(a,b)
x=int(input().rstrip())
print(360//x if 360%x==0 else ceil(360/x)*(lcm(360,x)//360))

Submission status: Wrong Answer

Solution code:
from math import gcd
def resolver(X):
    if 360 % X == 0:
        return 360 // X
    ans = 360 * X // gcd(360, X) 
    return ans



def main():
    X = int(input())
    ans = resolver(X)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np

x = int(input())
d = 180 - x

full = np.lcm(360, d)

ans = full // d
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

x = int(input())
K = 360 / x
print(math.floor(K))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

x=int(input())
if(x>90):
    x=x-90
print(math.ceil(360/x))

Submission status: Wrong Answer

Solution code:
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################

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

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
if x <= 90:
  print(int(360 / x))
else:
  z = lcm(x, 360)
  print(int(z / x))

Submission status: Wrong Answer

Solution code:
X = int(input())

K = 1
dire = X
while True:
  if (dire % 180) == 0:
    break
  K+=1
  dire+=X

  
print(K)

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())
K = int(360//X)
if 360%X==0:
  print(K)
else:
  print(K+1)

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

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(X if 360 % X else 360 // X)

Submission status: Wrong Answer

Solution code:
import math

x = int(input())

m = math.ceil(360 / x)
print(m)

Submission status: Wrong Answer

Solution code:
import math
x=int(input())
if x==60:
  print(3)
else:
  print(360//math.gcd(x,180))

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout
for _ in range(1):#int(stdin.readline())
    n=int(stdin.readline())
    print(360//n)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
"""AtCoder Grand Contest 046: A - Takahashikun, The Strider
https://atcoder.jp/contests/agc046/tasks/agc046_a
"""


def main():
    X = int(input())
    ans = 0
    while True:
        next = 360 % X
        if next == 0:
            ans = 360 // X
            break
        X = next
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())
if x>90:
    x = x-90
ans = 0
a = 360
while True:
    if a%x==0:
        ans+=a//x
        break
    else:
        rem = a%x
        ans+=a//x
        a-=rem
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())

print(int(360 / x))

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 x>90:
    x=180-x
if 360%x==0:
    print(360//(x))
else:
    print(360//(180-x))

Submission status: Wrong Answer

Solution code:
X = int(input()) 
if X <= 90:
  print(int(360/X))
else:
  print(int(720/X))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
x = int(input())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
if x <= 90:
  print(int(360 / x))
else:
  z = lcm(x, 360)
  print(int(z / 360))

Submission status: Wrong Answer

Solution code:
x = int(input())

b = 360/(180-(180-x))
print(int(b))

Submission status: Wrong Answer

Solution code:
X=int(input())
t=360
for c in range(361):
    if t!=0:
        t -= X
        if X<0:
            t += 360
    else:
        break
print(c)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from heapq import heappop, heappush
def main():
	x = int(input())
	if 360%x==0:
		print(360//x)
	else:
		print(360)
	# n,q = [int(j) for j in input().split()]
	

main()

Submission status: Wrong Answer

Solution code:
X=int(input())

ans=0
tmp=360    

if 360%X==0:
    ans=360/X
else:
    while(1):
        if tmp%X!=0:
            tmp+=360
        else:
            ans=tmp/X
            break
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
a = 1
while True:
    if x % 360 == 0:
        print(a)
        quit()
    x = x * a
    a += 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X=int(input())
for i in range (180):
    if X*i%360==0:
        print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(360//math.gcd(360,x))

Submission status: Wrong Answer

Solution code:
x = int(input())

m = 360 // x
print(m)

Submission status: Wrong Answer

Solution code:
import collections
import itertools
def gcd(a,b):
    if(a%b==0):
        return b
    else:
        gcd(b,a%b)
def main():
    n = int(input())
    #a*n = k*360である最小のa,k
    l = 360
    i = 1
    while(l%n!=0):
        l*=i
        i+=1
    print(l//n)





if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input()) 
if X >= 90:
  print(int(360/X))
else:
  print(int(720/X))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if int(y) == y:
  print(int(y))
else:
  print(int(y+1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input())
if x > 0:
  print(360//x)
  exit()
else:
  print(-1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


def main():
    import sys
    input = sys.stdin.readline

    x = int(input())

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)
from math import gcd

def lcm(a,b):return a*b//gcd(a,b)
x=int(input().rstrip())
print(360//x if 360%x==0 else 360//x*(lcm(360,x)//360))

Submission status: Wrong Answer

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