Problem:


Score : 200 points

Problem Statement

We ask you to select some number of positive integers, and calculate the sum of them.

It is allowed to select as many integers as you like, and as large integers as you wish.
You have to follow these, however: each selected integer needs to be a multiple of A, and you need to select at least one integer.

Your objective is to make the sum congruent to C modulo B.
Determine whether this is possible.

If the objective is achievable, print YES. Otherwise, print NO.

Constraints

1 ≤ A ≤ 100

1 ≤ B ≤ 100

0 ≤ C < B

Input

Input is given from Standard Input in the following format:

A B C

Output

Print YES or NO.

Sample Input 1

7 5 1

Sample Output 1

YES

For example, if you select 7 and 14, the sum 21 is congruent to 1 modulo 5.

Sample Input 2

2 2 1

Sample Output 2

NO

The sum of even numbers, no matter how many, is never odd.

Sample Input 3

1 100 97

Sample Output 3

YES

You can select 97, since you may select multiples of 1, that is, all integers.

Sample Input 4

40 98 58

Sample Output 4

YES

Sample Input 5

77 42 36

Sample Output 5

NO



Sample input:
7 5 1


Sample output:
YES

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
for i in range(B):
  if (i+1)*A%B== C:
    print('Yes')
    exit()
print('No')

Submission status: Wrong Answer

Solution code:
a,b,c = map(int, input().split())
rec = []
for i in range(1,b+1):
  rec.append(((i*(i+1)/2)*a)%b)
if c in rec:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
calc = 0

for i in range(1000):
    calc += A
    rem = calc % B
    if rem == C:
        print('Yes')
        exit()

print('No')

Submission status: Wrong Answer

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

A,B,C = map(int, input().split())

mod = []
for i in range(max(B,C)):
    res = A * i % B
    if res == C:
        ans = "YES"
        print(i)
        break
    if res in mod:
        ans = "NO"
        break
    mod.append(res)

print(ans)

Submission status: Wrong Answer

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

A,B,C = map(int, input().split())

mod = []
for i in range(max(B,C)):
    res = A * i % B
    if res == C:
        ans = "Yes"
        print(i)
        break
    if res in mod:
        ans = "No"
        break
    mod.append(res)

print(ans)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
l = []

#aに１～bの数をかけたリストを作る
for i in range(b + 1):
  if i == 0:
    pass
  else:
    l.append((i * a) % b)
  
if c in l == True:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
if A % B == C - 1:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b, c = i_map()

    print('YES' if a % 2 == b % 2 else 'NO')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a, b, c = map(int,input().split())
A = []
for i in range(1,b+1):
    mod = a*i % b
    if mod in A:break
    A.append(mod)

A.sort()
if len(A) >= 2:
    i = A[1]
else:
    i = 0

if i == 0 and c == 0:
    print('Yes')
    exit()
elif i == 0 and c != 0:
    print('No')
    exit()

if c % i == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())

amari = []

for i in range(1, B+100):
    amari.append(A*i%B)

print('Yes' if C in amari else 'No')

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())

ans = "No"
for i in range(1, 1000):
    a = A*i
    if a % B == C:
        ans = "Yes"
        break
        
print(ans)

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
s=0
for i in range(0,B+1):
    x=A*i//B
    if x==C:
        s=s+1
    else:
        s=s
if s!=0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())

ans="No"
for i in range(0,b+1):
  for j in range(0,a+1):
    if a*i == b*j+c:
      ans="Yes"
      break
      
print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())

ans="NO"
for i in range(1,b+1):
  for j in range(1,a+1):
    if a*i == b*j+c:
      ans="YES"
      break
      
print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())

ans="No"
for i in range(1,b+1):
  for j in range(1,a+1):
    if a*i == b*j+c:
      ans="Yes"
      break
      
print(ans)

Submission status: Wrong Answer

Solution code:
A, B, C = map(int,input().split())

for i in range(1,10000):
    a = A*i
    if a % B == C:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
A, B, C = map(int,input().split())

for i in range(1,10000):
    a = A*i
    if a % B == C:
        print('Yes')
print('No')

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
mod=set()
tmp=0
D=A
while tmp not in mod:
    mod.add(tmp)
    tmp=D%B
    if tmp==C:
        print('Yes')
        exit()
    D+=A
print('No')

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())

ans = "No"
for i in range(1, B + 1):
    if i * A % B == C:
        ans = "Yes"

print(ans)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
print("Yes" if any((a*i)%b==c for i in range(1, b+1)) else "No")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
for i in range(1,b+1):
    if (a*i)%b==c:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
ans = "No"
for k in range(B):
    if (k * A) % B == C:
        ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
for k in range(B):
    if (k * A) % B == C: print("Yes"); exit()
print("No")

Submission status: Wrong Answer

Solution code:
def zz():
    return map(int,input().split())

a,b,c = zz()
ans = 0
for i in range(1,b+1):
   if (a*i)%b == c:
       ans = 1
       break

if ans == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
def zz():
    return map(int,input().split())

a,b,c = zz()
ans = 0
for i in range(1,b+1):
   if (a*i)%b == c:
       ans += 1
       break

if ans == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
if A%B==0 :
    if C==0:
        print('YES')
    else:
        print('NO')
elif (A%B)%2==1:
    if C%2==1:
        print('YES')
    else:
        print('NO')
elif (A%B)%2==0:
    print('YES')

Submission status: Wrong Answer

Solution code:
import math

a, b, c = map(int, input().split())

d = math.gcd(a, b)

print("Yes" if c % d == 0 else "No")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
ch=0
for x in range(b):
  if (x*a)//b==c:
    ch+=1
    
if ch>0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())

if c>a:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
s = 0
ans = False
for i in range(1,A*100):
    s += A*i
    if s%B ==C:
        ans = True
print("YES" if ans else "NO")

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())

for i in range(10**6):
    if A * i % B == C:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())

if any((a * i) % b == c for i in range(1, b+1)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
flag = False
for i in range(10000):
    if (i*b+c)%a==0:
        flag = True
        break
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
A,B,C= list(map(int, input().strip().split()))
a=A%B
f="No"
for i in range(B):
    if (a*i)%B==C:
        f="Yes"
        break
print(f)

Submission status: Wrong Answer

Solution code:
import math
A, B, C = list(map(lambda n: int(n), input().split(" ")))

print("Yes") if C % math.gcd(A,B) == 0 else print("No")

Submission status: Wrong Answer

Solution code:
def gcd(x, y):
  while y:
    x, y = y, x%y
    print("{}, {}".format(x, y))
  return x

A, B, C = map(int, input().split())

if  C % gcd(A, B) == 0 :
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())

if abs(A-B) < C:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
A,B,C = (int(T) for T in input().split())
Flag = False
for T in range(1,B+1):
    if (T*A)%B==C:
        Flag = True
print(['No','Yes'][Flag])

Submission status: Wrong Answer

Solution code:
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

import math
A, B, C = MAP()

if C % math.gcd(A, B) == 0:
    print("YES")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
l = []
s = 0
ans = 'NO'

for i in range(1,101):
    if i % A ==0:
        l.append(i)
for j in l:
    if j % B == C:
        ans = 'YES'
        break
print(ans)

Submission status: Wrong Answer

Solution code:
#9
a,b,c = map(int,input().split())
ans = "No"

for i in range(1,b+1):
    if a*i%b == c:
        ans = "Yes"
        break
        
print(ans)

Submission status: Wrong Answer

Solution code:
A, B, C = list(map(int, input().split()))
i = 1
d_set = set()
while(True):
    d = A*i % B
    if d == C:
        print('Yes')
        break
    if d in d_set:
        print('No')
        break
    d_set.add(d)
    i += 1

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
for i in range(1,10**5):
  if (B*i+C)%A==0:
    print('Yes')
    break
else:
  print('No')

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())

for i in range(1,10**4):
  if A==B*i+C:
    print('Yes')
    break
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# ABC060 B - Choose Integers
A,B,C = map(int,input().split())
for i in range(2,1001):
    A +=A*i
    if A%B==C:
        print('YES')
        exit()
print('NO')

Submission status: Wrong Answer

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

A,B,C = [int(i) for i in input().split()]

M = []
for i in range(1,100+1):
    if (A*i)%B in M:
        break
    else:
        M.append((A*i)%B)

if C in M:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
ans = "No"
for i in range(b):
    if a*i % b == c:
        ans = "Yes"
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c=list(map(int,input().split()))
flag=0
for itr in range(100000):
    if (a*itr)%b==c: 
        print('NO')
        flag=1
        break
if flag==0: print('YES')

Submission status: Wrong Answer

Solution code:
a,b,c=list(map(int,input().split()))
for itr in range(100000):
    if (a*itr)%b==c: 
        print('NO')
        break
    else: 
        print('YES')
        break

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())

startR = A % B
i = 1
while True:
    
    R = A*i % B
    if R == C:
        print("Yes")
        break
    
    if i != 1:
        if R == startR:
            print("No")
            break
    
    i += 1

Submission status: Wrong Answer

Solution code:
a, b, c = [int(w) for w in input().split()]

cond = False
for n in range(a, a*b+1, a):
    if n % b == c:
        cond = True
        break

print("Yes" if cond else "No")

Submission status: Wrong Answer

Solution code:
a,b,c = map(int, input().split())

for i in range(a, 100000000, a):
    if i % b == c:
        print("YES")
        exit()

print("No")

Submission status: Wrong Answer

Solution code:
a,b,c = map(int, input().split())

for i in range(a, 100000, a):
    if i % b == c:
        print("YES")
        exit()

print("No")

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
print("Yes" if any((A*i)%B==C for i in range(B)) else "No")

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())

for i in range(a, a * b + 1, a):
    if i % b == c:
        print("Yes")
        break
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())

if (a%2==0 and b%2==0 and c%2==1) or (a%2==1 and b%2==0 and c%2==0) or (a%2==0 and b%2==1 and c%2==0):
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
import sys
A,B,C = map(int,input().split())
ln = 100//A+1
for i in range(1,ln+1):
    if (A*i-C)% B == 0:
        print('YES')
        sys.exit()
print('NO')

Submission status: Wrong Answer

Solution code:
import sys
A,B,C = map(int,input().split())
ln = 100//A+1
for i in range(1,ln+1):
    if (A*i+C)% B == 0:
        print('YES')
        sys.exit()
print('NO')

Submission status: Wrong Answer

Solution code:
import sys
A,B,C = map(int,input().split())
ln = 100//A+1
for i in range(ln):
    if (A*i+C)% B == 0:
        print('YES')
        sys.exit()
print('NO')

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())

ans = ''

if a % b == 0:
    if c == 0:
        ans = 'YES'
    else:
        ans = 'NO'
else:
    k = a % b
    for x in range(c+1):
        if (k * x) % b == c:
            ans = 'YES'
            break
    else:
        ans = 'NO'

print(ans)

Submission status: Wrong Answer

Solution code:
A,B,C = [int(i) for i in input().split()]
for i in range(1,B+1):
  if A * i % B == C:
    print("YES")
    break
    if A * i % B != C and i == B:
      print("NO")

Submission status: Wrong Answer

Solution code:
A,B,C = [int(i) for i in input().split()]
for i in range(1,B+1):
  if A * i % B == C:
    print("YES")
  else:
    print("NO")

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
if (A%2==0 and B%2==1) or (A%2==1 and B%2==0):
  print('NO')
else:
  print('YES')

Submission status: Wrong Answer

Solution code:
import sys
a,b,c = map(int,input().split())
sum = 0
for i in range(1,100):
	sum += a*i
	if (sum)%b == c:
		print("YES")
		sys.exit()
print("NO")

Submission status: Wrong Answer

Solution code:
import sys
a,b,c = map(int,input().split())
sum = 0
for i in range(1,21):
	sum += a*i
	if (sum)%b == c:
		print("YES")
		sys.exit()
print("NO")

Submission status: Wrong Answer

Solution code:
import sys

A, B, C = map(int, input().split())
i = 1
while (A*i)%B != C:
    i += 1
    if i > 100:
        print('NO')
        sys.exit()
print(i)
print('YES')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
for i in range(1,b+1):
  if a*i%b==c:
    print("YES")
    break
  else:
    continue
print("NO")

Submission status: Wrong Answer

Solution code:
import math
A,B,C = map(int,input().split())
num = math.gcd(math.gcd(A,B),C)
A = A//num
B = B//num
C = C//num
for i in range(1,100000):
    if (A*i)%B == 1:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
import itertools
A, B, C = map(int,input().split())

lst = []
for i in range(1,100):
    lst.append(A * i)


for i in range(1,3):
    for v in itertools.combinations(lst,i):
        print(v)
        if sum(v) % B == C:
            print('YES')
            exit()
print('NO')

Submission status: Wrong Answer

Solution code:
import itertools
A, B, C = map(int,input().split())

lst = []
for i in range(1,100):
    lst.append(A * i)


for i in range(1,5):
    for v in itertools.combinations(lst,i):
        print(v)
        if sum(v) % B == C:
            print('YES')
            exit()
print('NO')

Submission status: Wrong Answer

Solution code:
# Begin Header {{{
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
# }}} End Header
# _________コーディングはここから！！___________
# ... 最小側の制約も確認した？
# ... オーバーフローしない？
a, b, c = map(int, input().split())
i = 1
ok = False
while i<=b-b//2:
    if (a*i-c)%b != 0: i+=1
    else:
        ok = True
        break
if ok: print("YES")
else: print("NO")

Submission status: Wrong Answer

Solution code:
def main():
    a, b, c = map(int, input().split())
    for num in range(a, 1000, a):
        if num % b == c:
            print('YES')
            return

    print('NO')

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
a = "NO"

for n in range(101):
  if n%A==0 and n%B==C:
    a = "YES"

print(a)

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
if A == 1:
    print("YES")
elif (A % 2 == 1 and C % 2 == 0) or (A % 2 == 0 and C % 2 == 1):
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
for i in range(b):
  if (i*a)%b==c:
    print('YES')
    break
print('NO')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
for i in range(B,2*B+1):
    if A*i % B == C:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
for i in range(1,B+1):
    if A*i % B == C:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
num = a
if (a % 2 == 1 and c % 2 == 0) or (a % 2 == 0 and c % 2 == 1):
  print('NO')
else:
  print('YES')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
num = a
if (a % 2 == 1 and c % 2 == 0) or (a % 2 == 0 and c % 2 == 1):
  print('NO')
else:
  while True:
    if a % b == c:
      print('YES')
      break
    a += num

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
num = a
if (a % 2 == 1 and c % 2 == 0) or (a % 2 == 0 and c % 2 == 1):
  print('No')
else:
  while True:
    if a % b == c:
      print('YES')
      break
    a += num

Submission status: Wrong Answer

Solution code:
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions
from operator import itemgetter
import itertools


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
a, b, c = map(int, input().split())
for i in range(10**5):
    ans = a*i
    if ans & b == c:
        print('YES')
        exit()
print('NO')

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())

sum_a = 0

for i in range(1, B+1):
    sum_a = A*i
    if sum_a % B == C:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())

sum_a = 0

for i in range(1, B+1):
    sum_a += A*i
    if sum_a % B == C:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())

if A % B == 0 and C!=0:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())

res = a%b

for i in range(1, b):
    if (res*i)%b == c:
        print('YES')
        break
print('NO')

Submission status: Wrong Answer

Solution code:
#! env python
# -*- coding: utf-8 -*-

import os
import sys


# ac_py.main
# Date: 2020/06/14
# Filename: main 
# Author: acto_mini

def main():
    A, B, C = map(int, input().split())

    if A % 2 != C % 2:
        print("NO")
        exit()

    for i in range(1, B*A+1):
        if (i * A) % B == C:
            print("YES")
            break
    else:
        print("NO")

    return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#! env python
# -*- coding: utf-8 -*-

import os
import sys


# ac_py.main
# Date: 2020/06/14
# Filename: main 
# Author: acto_mini

def main():
    A, B, C = map(int, input().split())

    if A % 2 != C % 2:
        print("NO")
        exit()

    for i in range(1, C*100):
        if (i * A) % B == C:
            print("YES")
            break
    else:
        print("NO")

    return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#! env python
# -*- coding: utf-8 -*-

import os
import sys


# ac_py.main
# Date: 2020/06/14
# Filename: main 
# Author: acto_mini

def main():
    A, B, C = map(int, input().split())

    if A % 2 != C % 2:
        print("NO")
        exit()

    for i in range(1, 101):
        if (i * A) % B == C:
            print("YES")
            break
    else:
        print("NO")

    return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#! env python
# -*- coding: utf-8 -*-

import os
import sys


# ac_py.main
# Date: 2020/06/14
# Filename: main 
# Author: acto_mini

def main():
    A, B, C = map(int, input().split())

    if A % 2 != C % 2:
        print("NO")
        exit()
    else:
        print("YES")

    return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
print('No' if all((a*i)%b != c for i in range(1,b+1)) else 'Yes')

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
ans = 0

for i in range(1, b+1):
  if a*i % b == 1:
    ans += 1
    
if ans > 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
ai=a%2
b=b%2
c=c%2

if a==1:
    print('YES')
elif ai==0 and b==0 and c==1:
    print('NO')
elif ai==1 and b==0 and c==0:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
ai=a%2
b=b%2
c=c%2

if a==1:
    print('YES')
elif a==0 and b==0 and c==1:
    print('NO')
elif a==1 and b==0 and c==0:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
ai=a%2
b=b%2
c=b%2
if ai==0 and b==0 and c==1:
    print('NO')
elif ai==1 and b==0 and c==0:
    print('NO')
elif a==1:
    print('YES')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
a=a%2
b=b%2
c=b%2
if a==0 and b==0 and c==1:
    print('NO')
elif a==1 and b==0 and c==0:
    print('NO')
elif a==1:
    print('YES')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())

if a % b == 0 and c != 0:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
x=0
for i in range(b):
    x+=a
    if a%b==c:
        print('YES')
    x='-1'
    break
if x!='-1':
    print('NO')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
x=0
for i in range(b):
    x+=a
    if a%b==c:
        print('YES')
    x='-1'
    break
if x=='-1':
    print('NO')

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())

ans = 'NO'

for i in range(1, b+1):
    print(i, (a*i) % b)
    if (a*i) % b == c:
        ans = 'YES'
        break

print(ans)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())

num = 0

while True:
    num += a
    if num % b == c:
        ans = 'YES'
    elif a == 1:
        ans = 'YES'
        break
    elif num % b < c:
        ans = 'NO'
        break

print(ans)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())

num = 0

while True:
    num += a
    if num % b == c:
        ans = 'YES'

    elif num % b < c:
        ans = 'NO'
        break

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
A,B,C = map(int,input().split())
for i in range(1,B+1):
    if A * i % B == C:
        print("Yes")
        sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:

a, b, c = map(int, input().strip().split())
a_temp = a

for i in range(b):
    if a_temp % b == c:
        print('Yes')
        break
    a_temp += a
else:
    print('No')

Submission status: Wrong Answer

Solution code:

import sys

a, b, c = map(int, input().strip().split())
a_temp = a

for i in range(b):
    if a_temp % b == c:
        print('Yes')
        sys.exit()
    a_temp += a
else:
    print('No')

Submission status: Wrong Answer

Solution code:

a, b, c = map(int, input().strip().split())
a_temp = a

for i in range(b + 1):
    if a_temp % b == c:
        print('Yes')
        exit()
    a_temp += a
else:
    print('No')

Submission status: Wrong Answer

Solution code:

a, b, c = map(int, input().strip().split())
a_temp = a

flg = False

for i in range(b):
    if a_temp % b == c:
        print('Yes')
        exit()
    a_temp += a
else:
    print('No')

Submission status: Wrong Answer

Solution code:

a, b, c = map(int, input().strip().split())
a_temp = a

flg = False

for i in range(b):
    if (a_temp - c) % b == 0:
        print('Yes')
        exit()
    a_temp += a
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())

d=a%b
if d!=0:
  if c%d==0:
    frag="YES"
  else:
    for i in range(b-1):
      if (i+1)*d/b==c:
        frag='YES'
        break
    else:
      frag="NO"
else:
  frag="NO"
print(frag)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())

d=a%b
if d!=0:
  if c%d==0:
    frag="YES"
  else:
    for i in range(b-1):
      if i*d/b==c:
        frag='YES'
        break
    else:
      frag="NO"
else:
  frag="NO"
print(frag)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())

d=a%b
if d!=0:
  if c%d==0:
    frag="YES"
  else:
    frag="NO"
else:
  frag="NO"
print(frag)

Submission status: Wrong Answer

Solution code:
import sys
A, B, C = list(map(int, input().split()))

i = 1
tmp = A

while i<10000:
  if tmp%B != C:
    i = i+1
    tmp = tmp+ i*A
  else:
    print("YES")
    sys.exit()
print("NO")

Submission status: Wrong Answer

Solution code:
import sys
A, B, C = list(map(int, input().split()))

i = 1
tmp = A

while i<101:
  if tmp%B != C:
    i = i + 1
    tmp = tmp +  i * A
  else:
    print("YES")
    sys.exit()
print("NO")

Submission status: Wrong Answer

Solution code:
import sys
A, B, C = list(map(int, input().split()))

i = 1
tmp = A

if A%2 == 0 and C%2 ==1:
  print("NO")
  sys.exit()

while i<101:
  if tmp%B != C:
    i = i + 1
    tmp = tmp +  i * A
  else:
    print("YES")
    sys.exit()
print("NO")

Submission status: Wrong Answer

Solution code:
a,b,c = list(map(int,input().strip().split()))
for i in range(1,b):
  if a ** i % b == c:
    print("YES")
    exit()
print("NO")

Submission status: Wrong Answer

Solution code:
a,b,c = list(map(int,input().strip().split()))
for i in range(1,a):
  if a ** i % b == c:
    print("YES")
    exit()
print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Jun  2 21:44:35 2020

@author: naoki
"""
import fractions 

A, B, C = map(int,input().split()) # A,B,Cを入力

#不定方程式を解ければよい ax-by=c 
#そのためにユークリッドの互除法を用いる 
#gcd(a,b) = gcd(b,c) (但し、C≠０)ならば不定方程式が成立する。そうでないならば成立しない。
if (fractions.gcd(A,B) == fractions.gcd(B,C) and C != 0) or (fractions.gcd(A,B) != 1 and C == 0):
    print("YES")
elif B == 1 and C == 0 :
    print("YES")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Jun  2 21:44:35 2020

@author: naoki
"""
import fractions 

A, B, C = map(int,input().split()) # A,B,Cを入力

#不定方程式を解ければよい ax-by=c 
#そのためにユークリッドの互除法を用いる 
#gcd(a,b) = gcd(b,c) (但し、C≠０)ならば不定方程式が成立する。そうでないならば成立しない。
if (fractions.gcd(A,B) == fractions.gcd(B,C) and C != 0) or (fractions.gcd(A,B) != 1 and C == 0):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Jun  2 21:44:35 2020

@author: naoki
"""
import fractions

A, B, C = map(int,input().split()) # A,B,Cを入力

#不定方程式を解ければよい ax-by=c 
#そのためにユークリッドの互除法を用いる 
#gcd(a,b) = gcd(b,c) ならば不定方程式が成立する。そうでないならば成立しない。
if fractions.gcd(A,B) == fractions.gcd(B,C):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
from fractions import gcd
a,b,c = map(int, input().split())
if c%gcd(a,b)==0:
  print('Yes')
  exit()
print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
#aの倍数の中でbで割って余りがcになるものが存在すればよい
if a%2==0 and b%2==0 and c%2==1:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
#aの倍数の中でbで割って余りがcになるものが存在すればよい
if a%2==0 and b%2==0 and c%2==1:
    print("NO")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n,m,k=map(int,input().split())
n=n%m
for i in range(1,101):
  if n*i%m==0:
    print('YES')
    quit()
print('NO')