TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**.  Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written.  Recently, they learned the operation called xor (exclusive OR).  What is xor?  For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x_2~\textrm{xor}~\ldots~\textrm{xor}~x_n is defined as follows:    * When x_1~\textrm{xor}~x_2~\textrm{xor}~\ldots~\textrm{xor}~x_n is written in base two, the digit in the 2^k's place (k \geq 0) is 1 if the number of integers among x_1, x_2, \ldots, x_n whose binary representations have 1 in the 2^k's place is odd, and 0 if that count is even.   For example, 3~\textrm{xor}~5 = 6.  They wanted to use this operation quickly, so each of them calculated the xor of the integers written on their scarfs except his scarf.  We know that the xor calculated by Snuke Cat i, that is, the xor of the integers written on the scarfs except the scarf of Snuke Cat i is a_i. Using this information, restore the integer written on the scarf of each Snuke Cat.

Submission attempts (in order):
#!/usr/bin/env python3

def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = [None] * n
    for i in range(n - 1):
        allxor = a[i] ^ a[i + 1]
    for i in range(n):
        ans[i] = allxor ^ a[i]
    print(*ans)


if __name__ == "__main__":
    main()


#!/usr/bin/env python3

def main():
    n = int(input())
    a = list(map(int, input().split()))
    ans = [None] * n
    allxor = 0
    for i in range(n):
        allxor ^= a[i]
    for i in range(n):
        ans[i] = allxor ^ a[i]
    print(*ans)


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
Problem: There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**.  Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written.  Recently, they learned the operation called xor (exclusive OR).  What is xor?  For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x_2~\textrm{xor}~\ldots~\textrm{xor}~x_n is defined as follows:    * When x_1~\textrm{xor}~x_2~\textrm{xor}~\ldots~\textrm{xor}~x_n is written in base two, the digit in the 2^k's place (k \geq 0) is 1 if the number of integers among x_1, x_2, \ldots, x_n whose binary representations have 1 in the 2^k's place is odd, and 0 if that count is even.   For example, 3~\textrm{xor}~5 = 6.  They wanted to use this operation quickly, so each of them calculated the xor of the integers written on their scarfs except his scarf.  We know that the xor calculated by Snuke Cat i, that is, the xor of the integers written on the scarfs except the scarf of Snuke Cat i is a_i. Using this information, restore the integer written on the scarf of each Snuke Cat.

Submission attempts (in order):
n = int(input())
list = [int(i) for i in input().split()]
total = 0
ans = []
for i in range(n):
    total = total ^ list[i]

print(total)
for j in range(n):
    ans.append(str(total^list[j]))
print(" ".join(ans))


n = int(input())
list = [int(i) for i in input().split()]
total = 0
ans = []
for i in range(n):
    total = total ^ list[i]

for j in range(n):
    ans.append(str(total^list[j]))
print(" ".join(ans))


Verdicts: Wrong Answer

Accepted
Problem: There are N Snuke Cats numbered 1, 2, \ldots, N, where N is **even**.  Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written.  Recently, they learned the operation called xor (exclusive OR).  What is xor?  For n non-negative integers x_1, x_2, \ldots, x_n, their xor, x_1~\textrm{xor}~x_2~\textrm{xor}~\ldots~\textrm{xor}~x_n is defined as follows:    * When x_1~\textrm{xor}~x_2~\textrm{xor}~\ldots~\textrm{xor}~x_n is written in base two, the digit in the 2^k's place (k \geq 0) is 1 if the number of integers among x_1, x_2, \ldots, x_n whose binary representations have 1 in the 2^k's place is odd, and 0 if that count is even.   For example, 3~\textrm{xor}~5 = 6.  They wanted to use this operation quickly, so each of them calculated the xor of the integers written on their scarfs except his scarf.  We know that the xor calculated by Snuke Cat i, that is, the xor of the integers written on the scarfs except the scarf of Snuke Cat i is a_i. Using this information, restore the integer written on the scarf of each Snuke Cat.

Submission attempts (in order):
import numpy as np

n = int(input())
a = list(map(int,input().split()))
a = np.array(a,dtype=np.int64)
b = [((a>>i)&1).sum() for i in range(21)]
li = []
for i in a:
    c = np.array([((i>>j)&1) for j in range(21)],dtype=np.int64)
    d = b-c
    point = 0
    for i in range(31):
        if d[i]%2 == 1:
            point += 2**(i)
    li.append(point)

print(*li)

import numpy as np

n = int(input())
a = list(map(int,input().split()))
now = 0
for i in a:
    now ^= i
li = []
for i in a:
    li.append(i^now)

print(*li)  

Verdicts: Runtime Error

Accepted
Problem: How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"?  The answer can be enormous, so print it modulo (10^9+7).

Submission attempts (in order):
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 24 20:53:22 2020

@author: NEC-PCuser
"""

if __name__ == '__main__':
    K = int(input())
    n = len(input())
    mod = 10**9+7 
    #25 25 a 25 25 25 b 25 25  c  26 26
    cmb = 1
    ans = 0
    for i in range(0, K + 1):
        print(cmb)
        ans1 = (pow(25, i, mod) * cmb)
        ans2 = pow(26, K - i, mod)
        cmb = (cmb * (n + i) // (i + 1)) % mod  
        ans = (ans + (ans1 * ans2)) % mod
    
    
    print(ans)

n = int(input())
s = input()
 
S = len(s)
mod = 10 ** 9 + 7
 
tmp_ans = pow(26, n, mod)
div = pow(26, -1, mod)
 
ans = tmp_ans
 
for i in range(1, n+1):
    tmp_ans = (tmp_ans * 25 * div) % mod
    tmp_ans = ((tmp_ans * (S-1+i)) * pow(i, -1, mod)) % mod
    ans = (ans + tmp_ans) % mod
 
ans %= mod
 
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"?  The answer can be enormous, so print it modulo (10^9+7).

Submission attempts (in order):
k = int(input())


s = int(input())

mod = 10 ** 9 + 7
n = k + s


def _fac_inv(_n, _mod):
    _fac = [1] * (_n + 1)
    _inv = [1] * (_n + 1)
    for i in range(_n):
        _fac[i + 1] = _fac[i] * (i + 1) % _mod
    _inv[_n] = pow(_fac[_n], _mod - 2, _mod)
    for i in range(_n, 0, -1):
        _inv[i - 1] = _inv[i] * i % _mod

    return _fac, _inv


fac, inv = _fac_inv(n, mod)

n25 = [1]
n26 = [1]
for _ in range(n-s):
    n25.append((n25[-1] * 25) % mod)
    n26.append((n26[-1] * 26) % mod)

ans = 0

for i in range(s, n + 1):
    ans = (ans + fac[i-1] * inv[s-1] * inv[i-s] * n25[i-s] * n26[n-i]) % mod

print(ans)


k = int(input())
s = input()
s = len(s)

mod = 10 ** 9 + 7
n = k + s


def _fac_inv(_n, _mod):
    _fac = [1] * (_n + 1)
    _inv = [1] * (_n + 1)
    for i in range(_n):
        _fac[i + 1] = _fac[i] * (i + 1) % _mod
    _inv[_n] = pow(_fac[_n], _mod - 2, _mod)
    for i in range(_n, 0, -1):
        _inv[i - 1] = _inv[i] * i % _mod

    return _fac, _inv


fac, inv = _fac_inv(n, mod)

n25 = [1]
n26 = [1]
for _ in range(n-s):
    n25.append((n25[-1] * 25) % mod)
    n26.append((n26[-1] * 26) % mod)

ans = 0

for i in range(s, n + 1):
    ans = (ans + fac[i-1] * inv[s-1] * inv[i-s] * n25[i-s] * n26[n-i]) % mod

print(ans)


Verdicts: Runtime Error

Accepted
Problem: How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"?  The answer can be enormous, so print it modulo (10^9+7).

Submission attempts (in order):

def main():
    from builtins import pow

    K = int(input())
    S = input()

    m = 1000000007

    result = 0
    t = pow(26, K, m)
    u = pow(26, m - 2, m) * 25 % m
    l = len(S)
    for i in range(K + 1):
        
        result += t
        result %= m
        t *= u
        t %= m
        t *= (l + i)
        t %= m
        t *= pow(i + 1, m - 2, m)
        t %= m
    print(result)


K = int(input())
S = input()

m = 1000000007

result = 0
t = pow(26, K, m)
u = pow(26, -1, m) * 25 % m
l = len(S)
for i in range(K + 1):
    
    result += (result + t) % m
    t = (t * u) % m * (l + i) %m * pow(i + 1, -1, m) % m
print(result)



K = int(input())
S = input()

m = 1000000007

l = len(S)
result = 0

a = pow(26, K, m)
inv26 = pow(26, -1K, m)
b = 1
c = 1
d = 1
for i in range(K + 1):
    
    result += a * (b * pow(c, -1, m)) * d
    result %= m
    a *= inv26
    a %= m
    b *= l + i
    b %= m
    c *= i + 1
    c %= m
    d *= 25
    d %= m
print(result)



def main():
    from builtins import len, pow

    K = int(input())
    S = input()

    m = 1000000007

    result = 0
    a = 1
    b = 1
    t = pow(26, K, m)
    u = pow(26, m - 2, m) * 25 % 26
    for i in range(K + 1):
        
        result += t * (a * pow(b, m - 2, m))
        result %= m
        t *= u
        t %= m
        a *= len(S) - 1 + (i + 1)
        a %= m
        b *= i + 1
        b %= m
    print(result)


main()


K = int(input())
S = input()

m = 1000000007

result = 0
t = pow(26, K, m)
u = pow(26, -1, m) * 25 % m
l = len(S)
for i in range(K + 1):
    
    result = (result + t) % m
    t = (t * u) % m * (l + i) % m * pow(i + 1, -1, m) % m
print(result)


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"?  The answer can be enormous, so print it modulo (10^9+7).

Submission attempts (in order):
class Combination:
    def __init__(self, size, MOD):
        self.MOD = MOD
        self.size = size + 2

        f = 1
        self.fact = fact = [f]
        for i in range(1, size+1):
            f = f * i % MOD
            fact.append(f)
        f = pow(f, MOD-2, MOD)
        self.factInv = factInv = [f]
        for i in range(size, 0, -1):
            f = f * i % MOD
            factInv.append(f)
        factInv.reverse()

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % self.MOD

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % self.MOD) % self.MOD

    def nhr(self, n, r):  
        return self.ncr(n + r - 1, n - 1)

def sol():
    K = int(input())
    N = len(input())
    MOD = 10**9 + 7
    comb = Combination(N + K + 10, MOD)

    ans = 0
    n = 1
    for l in range(K + 1):
        r = K - l
        ans += comb.nhr(N, l) * n
        ans %= MOD
        n = n * 25 % MOD
    print(ans)
sol()

MOD = 10**9 + 7

class Combination:
    def __init__(self, size):
        self.size = size + 2

        f = 1
        self.fact = fact = [f]
        for i in range(1, size+1):
            f = f * i % MOD
            fact.append(f)
        f = pow(f, MOD-2, MOD)
        self.factInv = factInv = [f]
        for i in range(size, 0, -1):
            f = f * i % MOD
            factInv.append(f)
        factInv.reverse()

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % MOD

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % MOD) % MOD

    def nhr(self, n, r):  
        return self.ncr(n + r - 1, n - 1)

K = int(input())
S = input()
N = len(S)

comb = Combination(N + K + 100)

ans = 0
L = 1
R = pow(26, K, MOD)
inv26 = pow(26, MOD - 2, MOD)
for l in range(K + 1):
    ans += L * comb.nhr(N, l) * R
    ans %= MOD

    L = L * 25 % MOD
    R = R * inv26 % MOD

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"?  The answer can be enormous, so print it modulo (10^9+7).

Submission attempts (in order):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

MOD = 10**9+7

fac = [1, 1]     
f_inv = [1, 1]   
inv = [0, 1]     計算用テーブル

def prepare(n, mod):
    for i in range(2, n+1):
        fac.append((fac[-1] * i) % mod)
        inv.append((-inv[mod % i] * (mod//i)) % mod)
        f_inv.append((f_inv[-1] * inv[-1]) % mod)

def modcmb(n, r, mod):
    if n < 0 or r < 0:
        return 0
    if r > n:
        return 0

    return fac[n] * f_inv[r] * f_inv[n-r] % mod


def main():
    K = int(readline())
    S = readline().strip()
    N = len(S)

    prepare(N + K + 10, MOD)

    ans = 0
    for i in range(K+1):
        ans += modcmb(N-1+i, i, MOD) * pow(25, i, MOD) * pow(26, K-i, MOD) % MOD
        ans %= MOD

    print(ans)


if __name__ == "__main__":
    main()


import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

MAX = 2 * 10**6 + 10
MOD = 10**9+7

fac = [1] * MAX
f_inv = [1] * MAX

def prepare(n, mod):
    for i in range(1, n+1):
        fac[i] = (fac[i-1] * i) % mod
    
    f_inv[n] = pow(fac[n], -1, MOD)
    for i in range(n-1, 0, -1):
        f_inv[i] = (f_inv[i+1] * (i+1)) % MOD

def modcmb(n, r, mod):
    if n < 0 or r < 0:
        return 0
    if r > n:
        return 0

    return fac[n] * f_inv[r] * f_inv[n-r] % mod


def main():
    K = int(readline())
    S = readline().strip()
    N = len(S)

    prepare(N + K + 5, MOD)

    inv26 = pow(26, -1, MOD)
    pow26 = pow(26, K, MOD)
    pow25 = 1
    ans = 0
    for i in range(K+1):
        ans += (modcmb(N-1+i, i, MOD) * pow25 * pow26) % MOD
        ans %= MOD

        pow25 *= 25
        pow25 %= MOD
        pow26 *= inv26
        pow26 %= MOD

    print(ans)


if __name__ == "__main__":
    main()


Verdicts: Time Limit Exceeded

Accepted
Problem: How many strings can be obtained by applying the following operation on a string S exactly K times: "choose one lowercase English letter and insert it somewhere"?  The answer can be enormous, so print it modulo (10^9+7).

Submission attempts (in order):
def calc_inv(n, mod_n):
    inv_li = [0] * (n + 2)
    inv_li[0] = 0
    inv_li[1] = 1
    for i in range(2, n + 2):
        q, r = divmod(mod_n, i)
        inv_li[i] = -inv_li[r] * q % mod_n
    return inv_li


MOD = 10**9 + 7
inv = calc_inv(max(K, 26) + 10, MOD)

K = int(input())
S = input()
s_len = len(S)


ans = 0
p = pow(26, K, MOD)

for i in range(1, K + 2):
    ans = (ans + p % MOD) % MOD
    p = p * (s_len + i - 1) * inv[i] * 25 * inv[26] % MOD

print(ans)


def calc_inv(n, mod_n):
    inv_li = [0] * (n + 2)
    inv_li[0] = 0
    inv_li[1] = 1
    for i in range(2, n + 2):
        q, r = divmod(mod_n, i)
        inv_li[i] = -inv_li[r] * q % mod_n
    return inv_li


K = int(input())
S = input()
s_len = len(S)

MOD = 10**9 + 7
inv = calc_inv(max(K, 26) + 10, MOD)

ans = 0
p = pow(26, K, MOD)

for i in range(1, K + 2):
    ans = (ans + p % MOD) % MOD
    p = p * (s_len + i - 1) * inv[i] * 25 * inv[26] % MOD

print(ans)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
c=360/n
print(c)

x=input()
print(360/x)

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

n = int(input())
import numpy as np
x=0
y=0
rad=0
k=1
while(1):
  y+=np.cos(rad*np.pi/180)
  x+=np.sin(rad*np.pi/180)
  if x<0.0001 and y<0.0001:
    print(k)
    break
  else:
    k+=1
    rad+=n

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def times(X):
    if X == int(X):
        if 1<= X <= 179:
            K = 360/X
            if int(K) < K :
                K = int(K) + 1
                print(K)
            else:
                print(int(K))

    if X == int(X):
        if 1<= X <= 179:
            K = 360/X
            if int(K) < K :
                K = int(int(K) - 1)
                print(K)
            else:
                K = int(K)
                print(K)

def times(X):
    if 1<= X <= 179:
        K = 360/X
        print(int(K))
        return K
    else:
        print("please input an integer.")

times(90)
times(180)


def lcm(x, y):
   if x > y:
       greater = x
   else:
       greater = y
 
   while(True):
       if((greater % x == 0) and (greater % y == 0)):
           lcm = greater
           break
       greater += 1
 
   return lcm
x = int(input())
if 360%x == 0:
    print(int(360/x))
else :
    print(int(lcm(360,x)/x))


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
for i in range(1,361):
  if n**i%360==0:
    print(i)
    

n=int(input())

for i in range(1,361):
  if (n*i)%360==0:
    print(i);exit()

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def main():
    X = int(input())
    print(360/X)
main()  

def main():
    X = int(input())
    i = 1
    while True:
        if i * X % 360 == 0:
            print(i)
            break
        i += 1
main()  

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a=360/n
b=a-360//n
print(int(n*360/math.gcd(n,360)/n))

import math
print(360//math.gcd(int(input()),360))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x = int(input())
print(360/x)


from math import gcd
s = int(input())
print(360//gcd(360,s))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
print(int(360/math.gcd(n,360)))

n=int(input())
print(int(360/math.gcd(n,360)))

n=int(input())
print(360/n)

import math
n=int(input())
print(int(360/math.gcd(n,360)))

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
print(360 // input())

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
max_test = 100000
for i in range(max_test):
  if i * X % 360 == 0:
    break

return I+1

X= int(input())
max_test = 100000
for i in range(1,max_test):
  if i * X % 360 == 0:
    break

print(i)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
from math import gcd
N = int(input())
print(N // gcd(360, N))

from math import gcd
X = int(input())
print(360 // gcd(360, X))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
45tokabaguruna

import math
n=int(input())
mi=1/100000000
x=1
y=0
pi=math.pi
cnt=1
while abs(x)>mi or abs(y)>mi:
  x+=math.cos(cnt*n*pi/180)
  y+=math.sin(cnt*n*pi/180)
  cnt+=1
print(cnt)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x = int(input())
a = 1
while True:
    if x % 360 == 0:
        print(a)
        quit()
    x = x * a
    a += 1
    

#!/usr/bin/env python3
from math import gcd
n = int(input())
print(360//gcd(360, n))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x=int(input())

print(360/x)

x=int(input())
i=1

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

print(i)

x=int(input())
i=1

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

print(i)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math

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


import math

x = float(input())

if 360%x == 0:
  print(math.floor(k))
else:
  print(math.ceil(k))

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x=int(input())
i=0
while True:
  360*i%x!=0
  i+=1
  if 360*i%x==0:
    break
k=360*i/x
print(k)


x=int(input())
i=0
while True:
  360*i%x!=0
  i+=1
  if 360*i%x==0:
    break
k=360*i/x
print(int(k))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
#n*k1=(360)*k2
#(k1/k2)=(360/n)
k=1
while((k*n)%360!=0):
  k+=1
  print(k)

n=int(input())
k=1
while((k*n)%360!=0):
  k+=1
print(k)
#We can now regard Takahashi’s move as movingXdegrees on the circle,
#so the answer is the minimumksuch thatkXis a multiple of 360

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x = int(input())

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

print(lcm(x, 360)//x)

import math
x = int(input())

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

print(lcm(x, 360)//x)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import math
X = 1
t = 360 - (180 - X)
g = math.gcd(t, 360)
print(360 * t // g // t)


X = int(input())
ret = 0
cur = 0
while True:
    ret += 1
    cur += X
    if cur % 360 == 0:
        print(ret)
        break


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x = int(input())
for i in range(1,1000):
  if (360*i)%x == 0:
    print((360*i)//x)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X = int(input())

print(360/X)

X = int(input())

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x = int(input())
print((360 -1  // x) + 1)


a = int(input())
for i in range(1, a*360 + 1):
  if i % 360 == 0 and i % a == 0:
    print(i//a)
    break

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
print(360/int(input()))

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X=int(input())
if 360%K==0:
  K=360//X
  print(K)
elif 360%K!=0:
  K=2*360//(180-X)
  print(K)

X=int(input())
if 360%X==0:
  K=360//X
  print(K)
elif 360%X!=0:
  i=1
  while True:
    if (X*i)%360==0:
      break
    i+=1
  print(i)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-
# get a integer
a = int(input())

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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))


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


x = int(input())

print(360 / x)

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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x = int(input())
s = x * 360/ gcd(x,360)
print(s/x)

x = int(input())
s =  x * 360 / math.gcd(x, 360)
print(s/x)

import math
x = int(input())
s =  x * 360 / math.gcd(x, 360)
print(int(s//x))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
p=1
if 360//n == 0:
	print(360//n)
else:
  while true:
	if n*p%360 == 0:
		print(n)
      	break
    n+=1
	

n=int(input())
l=360/n
print(l)

n=int(input())
p=1
if 360//n == 0:
	print(360//n)
else:
  while true:
	if n*p%360 == 0:
		print(n)
      	exit()
    n+=1
	

p = int(input())
index = 1
while True:
    if p* index % 360 == 0:
        print(index)
        break
    index += 1

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
X = int(input())
i = 1
while True:
  if (360 * i) % X == 0:
    ans = (360 * i) / X
    break
  else:
    i += 1
print(ans)


X = int(input())
i = 1
while True:
  if (360 * i) % X == 0:
    ans = (360 * i) // X
    break
  else:
    i += 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x  = int(input())
if 360 % x == 0:
	print(360//x)
print((360//x)*5)


from math import gcd
x = int(input())

lcm = (x * 360)/gcd(x, 360)
print(int(lcm/x))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a=int(input())
x = 0
i = 1
while(1):
  x += a
  i += 1
  x %= 360
  if x:
    continue
  else:
    print(i)
    quit()

a=int(input())
x = 0
i = 0
while(1):
  x += a
  i += 1
  x %= 360
  if x:
    continue
  else:
    print(i)
    quit()

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from math import gcd
print(360//gcd(360,int(input()))

from math import gcd
print(360//gcd(360,int(input())))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x=int(input())
print(int(math.ceil(360/x)))

from math import *
from copy import *
from string import *				
from random import *
from sys import stdin,stdout
from sys import maxsize
from operator import *				
from itertools import *
from collections import Counter		
import math
import math
import time
from queue import Queue
# PradeepGhosh_2017076

def seive(n):
	l=[True]
	l=l*(n+1)
	for i in range(2,int(sqrt(n))+1):
		if(l[i]==True):
			val=i*i
			while(val<len(l)):
				l[val]=False
				val+=i
	prime=[]
	for i in range(2,len(l)):
		if(l[i]==True):
			prime.append(i)
	return prime

def dp(l,i,n,val,ans):
	if(i>=n or val<0):
		return 1000000
	elif(val==0):
		return 0
	else:
		if(ans[i]==1000000):
			ans[i]=min(min(1+dp(l,i+1,n,val-l[i],ans),1+dp(l,i,n,val-l[i],ans)),dp(l,i+1,n,val,ans))
		return ans[i]
from queue import Queue
def factors(n):
	l=[]
	for i in range(1,int(sqrt(n))+1):
		if(n%i==0):
			if(n//i==i):
				l.append(i)
			else:
				l.append(i)
				l.append(n//i)
	return l
def check1(s,v,x):
	while(True):
		if(v not in s):
			return v
		else:
			v-=1
def check2(s,v,x):
	while(True):
		if(v not in s):
			return v
		else:
			v+=1

if __name__ == '__main__':
	
	# s=set(l)
	# t=int(input())
	
	# 	n=int(input())
	# 	if(n==2):
	# 		print(1)
	# 	else:
	# 		if(n in s):
	# 			n=n-1
	# 		j=n-1
	# 		while(j>0):
	# 			if(n%j==0):
	# 				break
	# 			j-=1
	# 		print(j)
	x=int(input())
	c=0
	ans=0
	while(ans!=360):
		ans+=x
		if(ans>360):
			ans-=360
		c+=1
	print(c)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
X = int(input())

ans = 360/x

print(str(ans))

X = int(input())
i = 1

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

X = int(input())
k = 1
n = 1

while true:
  ans = 360 * n % X
  if ans == 0:
    print(360 * n / X)
  else:
    n += 1


X = int(input())
k = 1
n = 1

while true:
  ans = 360 * n % X
  if ans == 0:
    print(360 * n / X)
    break:
  else:
    n += 1


X = int(input())
k = 1
n = 1

while true:
  ans = 360 * n % X
  if ans == 0:
    print(360 * n / X)
    break;
  else:
    n += 1


X = int(input())
i = 1

while (360*i) % X != 0:
  i += 1
ans = 360*i//X
print(ans)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import math
X = int(input())

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

X = int(input())
 
for k in range(1, 361):
  if (k * X) % 360 == 0:
    print(k)
    break

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X = int(input())
print(360/X)

X = int(input())
count = 1
while True:
    count += 1
    newX = count * X
    if newX % 360 == 0:
        break

print(int(count))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x=int(input())
if(360%x==0):
  print(360/x)
  

x=int(input())
if(360%x==0):
    print(int(360/x))
elif(360%(180-x)==0):
    print(int(360/(180-x)))
else:
    m=2
    while(1):
        if((360*m)%x==0):
            print(int(360*m/x))
            break
        elif((360*m)%(180-x)==0):
            print(int(360*m/(180-x)))
            break
        m+=1

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math

x = int(input())
g = math.gdc(x,360)
print(360//g)


import math

x = int(input())
g = math.gcd(x,360)
print(360//g)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
for i in range(360):
  if (i*n+n)%360==0:
    print(i)
    break

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x = int(input())
x = i
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)


x = int(input())
ans = 0
for i in range(1,361):
    num = 360*i
    if num%x==0:
        print(num//x)
        exit()

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
m = int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
x = make_divisors(360)


def gcd(a,b):
    if(b>a):
        a,b=b,a
    i=b
    while i>0:
        if(a%i==0 and b%i==0):
            return i
        i-=1


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

y = lcm(m,360)

print(y)
print(m)
print(x)
if m in x:
    print(360//m)
else:
    print(y//m)

m = int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
x = make_divisors(360)


def gcd(a,b):
    if(b>a):
        a,b=b,a
    i=b
    while i>0:
        if(a%i==0 and b%i==0):
            return i
        i-=1


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

y = lcm(m,360)

if m in x:
    print(360//m)
else:
    print(y//m)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X=int(input())
B=0
C=0
for i in range(0,360):
    B=B+X
    C=B%360
    K=K+1
    if C==0:
        print(K)
        break
        
    
    

X=int(input())
K=0
B=0
C=0
for i in range(0,360):
    B=B+X
    C=B%360
    K=K+1
    if C==0:
        print(K)
        break


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
print(360/X)

X = int(input())
print(360/X)

X = int(input())
x = 1
while True:
    if X*x % 360  == 0:
        print(x)
        break
    x += 1

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X = int(input())
K = 0
while ((X * K) % 360 != 0) and (K == 0):
  K += 1
print(K)

X = int(input())
K = 0
while ((X * K) % 360 != 0) or (K == 0):
  K += 1
print(K)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
ans = 360 / n
i = 1
while int(ans * i) != ans * i:
  i += 1
print(ans * i)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
for i in range(1, 180):
  if (int(360*i) % n ==0) :
      print(i)
      exit(0)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import math
x = int(input())
g = math.gcd(x,360)
print((x*360)//g)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X = int(input())

K=1
y=X % 360
while y != 0:
  K+=1
  y=(y+X)% 360
#
print(k)



X = int(input())

K=1
y=X
while y != 0:
  K+=1
  y+=X
#
print(k)



X = int(input())

K=1
y=X % 360
while y != 0:
  K+=1
  y=(y+X)% 360
#
print(K)



Verdicts: Runtime Error

Time Limit Exceeded

Accepted
Problem: 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.

Submission attempts (in order):
import math
tol = 1e-6
ans = 1
cur = [0,0]
cur[0] += math.cos(ans*math.pi/x)
cur[1] += math.sin(ans*math.pi/x)
while cur[0]**2 + cur[1]**2 > tol:
    ans += 1
    cur[0] += math.cos(ans*math.pi/x)
    cur[1] += math.sin(ans*math.pi/x)
print(ans)


import math
x = int(input())
tol = 1e-6
ans = 1
cur = [0,1]
unit = x/180*math.pi
while cur[0]**2 + cur[1]**2 > tol:
    cur[0] += math.sin(ans*unit)
    cur[1] += math.cos(ans*unit)
    ans += 1
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import numpy as np

X = int(input())
X_lcm = np.lcm(360, 360-X)
print(X_lcm // X)


import numpy as np
 
X = int(input())
X_lcm = np.lcm(360, X)
print(X_lcm // X)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X=int(input())
import math
print(360*X//math.gcd(360,X))

X=int(input())
import math
print(360*X//math.gcd(360,X)

X=int(input())
import math
a=360*X//math.gcd(360,X)
print(a//X)

Verdicts: Wrong Answer

Runtime Error

Accepted