Problem:


Score: 100 points

Problem Statement

Takahashi the Jumbo will practice golf.

His objective is to get a carry distance that is a multiple of K, while he can only make a carry distance of between A and B (inclusive).

If he can achieve the objective, print OK; if he cannot, print NG.

Constraints

All values in input are integers.

1 \leq A \leq B \leq 1000

1 \leq K \leq 1000

Input

Input is given from Standard Input in the following format:

K
A B

Output

If he can achieve the objective, print OK; if he cannot, print NG.

Sample Input 1

7
500 600

Sample Output 1

OK

Among the multiples of 7, for example, 567 lies between 500 and 600.

Sample Input 2

4
5 7

Sample Output 2

NG

No multiple of 4 lies between 5 and 7.

Sample Input 3

1
11 11

Sample Output 3

OK



Sample input:
7
500 600


Sample output:
OK

Submission status: Runtime Error

Solution code:
K =int(input())
A,B =map(int,input().split())
count ==0
for i in range(A,B+1):
    if i%K==0:
        print('OK')
        count =1
        break
 if count ==0:   
        print('NG')

Submission status: Runtime Error

Solution code:
k = int(input())
list = list(map(int, input().split()))
if list[1] > list[0]+k:
  print("OK")
elif list[0] % k == 0 or list[1] % k == 0:
else:
  print("NG")

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = list(map(int, input().split()))
if(k >= a and ((k / b) <= a and (k / b) =< b)):
    print('OK')
else:
    print('NG')

Submission status: Runtime Error

Solution code:
K=int(input())
A,B=map(int,input().split())
a='NG'
for i in range(A,B+1):
  if i%K==0:
    a=OK'
    break
print(a)

Submission status: Runtime Error

Solution code:
K = int(input())
A = int(input().split()[0])
B = int(input().split()[1])

for i in range(A, B + 1):
    if i % K == 0:
        print("OK")
        break
        exit()
print("NG")

Submission status: Runtime Error

Solution code:
K=int(input())
A,B=map(int,input().split)
c=B-A
d=c-K
if d>-2:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

Solution code:
n=int(input())
a,b=map(int,input().split())
ans='NG'
for i in range(a,b+1):
  if i%k==0:
    ans='OK'
print(ans)

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = [input() for i in range(2)]
if (b-a+1 >= k):
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
    k=int(input())
    a,b=map(int,input().split())
    print("OK" if a//k < b//k or a%k==0 or b%k==0 else "NG")

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int, input().split())
for i in range(1000):
  if A <= K*a <= B:
    print("OK")
    exit(0)
print("No")

Submission status: Runtime Error

Solution code:
K=int(input().split())
A,B=map(int,input().split())
n=A//K
print("OK" if A<=K*n<=B or K*(n+1)<=B else "NG")

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int, input().split())
isCompelte = False

for i in range(A,B+1):
  if i % K == 0:
    isComplete = True
    break

if isComplete:
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
k=int(input())
a=int(input())
b=int(input())

for i in range(a,b+1):
  if i%k==0:
    print('OK')
    exit()
print('NG')

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = map(int, input().split())
flag = 0
for i in range(a,b+1):
  if i % k == 0:
    flag = 1
    break
if flag = 1:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

Solution code:

K = int(input())
A, B = map(int, input().split())
cnt = 0
while true:
  cnt+=K
  if a <= cnt <= b:
    print("OK")
    break
  if b < cnt:
    print("NG")
    break

Submission status: Runtime Error

Solution code:
K=int(input())
M,N = map(int,input().rstrip().split(" ")) 
#print(K,M,N)
for number in range(M,N+1):
    if number%K==0:
        ans=True
if ans:
    print("YES")
else:
    print("NG")

Submission status: Runtime Error

Solution code:
K=int(input())
A,B=map(int,input().split())
a=0
for i in range(A,B+1):
  if i%k==0:
    a=1
if a==1:
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
K=int(input())
A,B=map(int,input().split())
a=0
for i in range(A,B+1):
  if i%k==0:
    a=1
if a=1:
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
from bisect import bisect_left as bl
n=int(input())
a=list(map(int,input().split()))
t=[[]for i in range(n)]
for i in range(n-1):
    u,v=map(int,input().split())
    t[u-1].append(v-1)
    t[v-1].append(u-1)
b=[1]+[0]*(n-1)
q=[[0,[a[0]],1]]
while q:
    c,d,e=q.pop(0)
    for i in t[c]:
        s=d[::]
        g=e
        if b[i]==0:
            h=bl(d,a[i])
            if e>h:
                s[h]=a[i]
            else:
                s.append(a[i])
                g+=1
            b[i]=g
            q.append([i,s,g])
for i in range(n):
    print(b[i])

Submission status: Runtime Error

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

c = A / K
b = c * K
flag = False

if b == B:
  flag = True
b += K
  if b <= B:
    flag = True

if flag == True:
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

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

c = A / K
b = c * K
flag = False

if b == B:
  flag = True
while b <= B:
  b += K
  elif b <= B:
    flag = True

if flag == True:
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
l = [int(input()) for i in range(2)]
k = l[0][0]
a = l[1][0]
b = l[1][1]
if b - a >= k - 1:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

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

flag = 0
for i in range(a ,b + 1, 1)
	if i % k == 0:
		flag = flag + 1
		break
		print("OK")
elif flag == 0:
	print("NO")

Submission status: Runtime Error

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

b=list[0]//a
c=list[1]//a

if list[1]%a==0
	print("OK")

elif c-b>=1:
	print("OK")

else:
  print("NG")

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = map(int,input().split())
ans = 0
for i in range(a//k,b//k+1):
  if a <= k * i <= b:
    ans = 1
if ans = 1:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

Solution code:
number=list(map(int,input().split()))
n,m,q=number[0],number[1],number[2]
nums=[]
for i in range(q):
    tmp=list(map(int,input().split()))
    nums.append(tmp)
answer=0
mid=0
List1=[]
for i in range(m):
  List1.append(i)
import itertools
for i in list(itertools.combinations_with_replacement(List1,n)):
    mid=0
    for j in range(q):
        if i[nums[j][1]-1]-i[nums[j][0]-1]==nums[j][2]:
            mid+=nums[j][3]
    answer=max(mid,answer)
    
print(answer)

Submission status: Runtime Error

Solution code:
k= int(input())
cont=0
a, b= input().split()
a= int(a)
b= int(b)
while 1:
    cont+= k
    if a<= cont <= b:
        print("OK")
        break
    if x > b:
        print("NG")
        break

Submission status: Runtime Error

Solution code:
K=input()
A=input()
B=input()
y=(int(A)-int(B))/int(K)
if(y>1):
  print("yes")
else:
  print("no")

Submission status: Runtime Error

Solution code:
k=int(input())
a,b=list(map(int,input().split()))
while True:
  x+=k
  if a<=x<=b:
    print('OK')
    break
  if x>b:
    print('NG')
    break

Submission status: Runtime Error

Solution code:
k,a,b=map(int,input().split())
for i in range (a,b):
    if k//i==0:
        print('ok')
        break
    else:
        print('ng')
        break

Submission status: Runtime Error

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

c=0
for i in range(a, b+1):
	if i%k == 0:
        c += 1
if c == 0:
	print("NG")
else:
    print("OK")

Submission status: Runtime Error

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

for i in range(b-a):
  if (a + i) % k == 0:
    print("OK")
  else:
    print("NG")

Submission status: Runtime Error

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

flag = False
for i in range(a, b + 1):
    if i // k > 0 ans i % k == 0:
        flag = True
        
if flag:
    print('OK')
else:
    print('NG')

Submission status: Runtime Error

Solution code:
K=int(input())
A,B=map(int,input())
if (A-1)/K == B/K:
  print('NG')
else:
  print('OK')

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = map(int, input().sprit())
ans = 'NG'
for i in range(a,b+1) :
  if i%k == 0 : 
    ans = 'OK'

print(ans)

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = map(int, input().sprit())
ans = False
for i in range(a,b+1) :
  if i%k == 0 : 
    ans = True

if ans==True : print('OK')
else : print('NG')

Submission status: Runtime Error

Solution code:
import sys
K = int(input())
a, b = map(int, input().split())
for i in range(a, b+1):
  if i%K  0:
    print('Yes')
    sys.exit()
print('No')

Submission status: Runtime Error

Solution code:
K=int(input())
A,B = map(int,input().split())
flg = False:
for i in range(A,B+1):
    if i%K == 0:
        flg = True:
if flg == True:
    print("OK")
else:
    print("NG")

Submission status: Runtime Error

Solution code:
k = int(input)
a,b = map(int, input().sprit())
ans = False
for i in range(a,b+1) :
  if i%k == 0 : 
    ans = True

if ans==True : print('OK')
else : print('NG')

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = (int(i) for i in input().split())

for i in range(a, b+1):
  if i % k == 0:
    print('OK')
    return

print('NG')

Submission status: Runtime Error

Solution code:
k = int(input)
a,b = map(int, input().sprit())
ans = False
for i in range(a,b+1) :
  if i%k == 0 : 
    ans = True

if ans : print('OK')
else : print('NG')

Submission status: Runtime Error

Solution code:
k = int(input)
a,b = map(int, input().sprit())
ans = False
for i in range(a,b+1) :
  if i%k == 0 : 
    ans = True

if ans : print('OK')
else print('NG')

Submission status: Runtime Error

Solution code:
k = int(input)
a,b = map(int, input().sprit())
ans = False
for i in range(a,b+1) :
  if i%k == 0 : 
    ans = True
    break
    
if ans : print('OK')
else print('NG')

Submission status: Runtime Error

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

for i in range(1,1001):
  n==k*i
  if a<=n<=b:
    print('OK')
    exit()
  else:
    continue

print('NG')

Submission status: Runtime Error

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

for i in range(A,B+1):
    if i%K==0:
        print("OK")
        break
else:
print("NO")

Submission status: Runtime Error

Solution code:

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

for i in range(A, B+1):
    if i % K == 0:
        print('OK')
        exit()

print('NG')

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = map(int, input().split)
largest = (b//k)*k
print("OK" if largest >= a else "NG")

Submission status: Runtime Error

Solution code:
  k = int(input())
  a, b = map(int,input().split())
  for i in range(a, b):
    if i%k ==0:
      print('OK')
      return
    print('NG')
  return

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = int(input())
if k <= b-a+1:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
k=int(input())
a,b=map(int, input().split())
ok=False
for i in range(a, b+1):
  ok = ok or i % k
print(['NG','OK'][ok])

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int, input().split())
if K=1:
    print("OK")
elif B-A>=K:
    print("OK")
else:
    print("NG")

Submission status: Runtime Error

Solution code:
SIZE = 10 ** 6 + 100
g1, g2, inv = [1, 1], [1, 1], [0, 1]
for i in range(2, SIZE + 1):
    g1.append((g1[-1] * i) % MOD)
    inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
    g2.append((g2[-1] * inv[-1]) % MOD)
def nPr(n, r):
    if r < 0 or r > n:
        return 0
    return g1[n] * g2[r] % MOD
def nCr(n, r):
    if r < 0 or r > n:
        return 0
    r = min(r, n - r)
    return g1[n] * g2[r] * g2[n - r] % MOD

Submission status: Runtime Error

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

if k == 1:
  print("OK")
  exit()
else:
  for i in range(a, b):
    if i % k == 0:
      ans = "OK"
      break
    else:
      ans = "NG"
print(ans)

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int, input().slice())
print("OK" if B - A >= K else "NG")

Submission status: Runtime Error

Solution code:
#inport
import sys
import numpy as np
import itertools as itlt
from collections import deque

#input 
    
N,M,Q = [int(x) for x in sys.stdin.readline().split()]
g = [0,0,0,0] * Q
#print(g)
for _ in range(Q):
    g[_] = [int(x) for x in sys.stdin.readline().split()]

choice = list(np.arange(1, M+1))
combi = list(itlt.combinations_with_replacement(choice, N))
score = 0

for i in range(np.size(combi,axis = 0)):
    score_tmp = 0
    for j in range(Q):
        if (combi[i][g[j][1]-1] - combi[i][g[j][0]-1]) == g[j][2]:
            score_tmp = score_tmp + g[j][3]
    if score_tmp > score:
        score = score_tmp

print(score)

Submission status: Runtime Error

Solution code:
k=int(input())
a,b=map(int,input().split())
 
for i in 1000:
 if a<=k*i<=b:
  print("OK")
 else:
  pass
print("NG")

Submission status: Runtime Error

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

for i in 1000:
 if a<=k*i<=b:
  print("OK")
 else:
  pass
print("NG")

Submission status: Runtime Error

Solution code:
k=int(input())
a,b=map(int,input().split())
flg=False
for i in range(a,b+1):
  if i % k = 0:
    flg=True
    break
if flg:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input().split())
x = 0
  
while True:
  x += k
  
  if a <= x <= b:
    print('OK')
	break
  
  if x > b:
    print('NO')
    break

Submission status: Runtime Error

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


for i in range(1,1000):
    if K * i > 1000
        break
    if K * i >= A and K * i <=B:
        print('OK')
        exit()

print('NG')

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input().split())
for i in range(a, b+1):
  if i % k == 0:
    ans = 0
if ans == 0:
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input().split())
for i in range(a, b+1):
  if i % k == 0:
    ans = 0
if ans = 0:
  print("OK)
else:
  print("NG")

Submission status: Runtime Error

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

x = 0;
for i in range(a,b+1);
    if i % k == 0:
        x += 1;

if x == 0:
    print('NG')
else:
    print('OK')

Submission status: Runtime Error

Solution code:
a = int(input())

low, hi = map(int, input().split())

start = a * low//a

boolean = False

while not (start > hi):
  if lo <= start <= hi: 
    boolean = True
    break

if boolean: print("OK")
else: print("NG")

Submission status: Runtime Error

Solution code:
k = int(input())
a = int(input())
b = int(input())

for i in range(a,b):
  if i%k == 0: 
    print("OK")
    break
else:
  print("NG")

Submission status: Runtime Error

Solution code:
K=int(input())
A=int(input())
B=int(input())
largest=(B/K)*K
if A<=largest:
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
K=int(input())
A=int(input())
B=int(input())
if B-A>=7:
  print("OK")
elif K=="1":
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

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

for i in range(a,b+1):
  if i%k == 0:
    print('OK')
    return
  else:
    print('NG')

Submission status: Runtime Error

Solution code:
from decimal import Decimal

def main():
    a, b, n = list(map(int, input().split()))
    
    floor_list = []
    
    for i in range(n+1):
        floor_1 = int(Decimal(a*i/b))
        floor_2 = a * int(Decimal(i/b))
        floor_list.append(floor_1 - floor_2)
    
    print(max(floor_list))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = map(int,input().split())
c = k
while(c <= b):
	if a <= k <= b:
		print("OK")
		quit()
    c += k
print("NG")

Submission status: Runtime Error

Solution code:
from itertools import combinations_with_replacement

def main():
    N, M, Q = map(int, input().split())
    qs = [list(map(int,input().split())) for _ in range(Q)]
    seq = [i for i in range(1,M+1)]
    C = combinations_with_replacement(seq, N)
    max_score = 0

    for A in C:
        A = sorted(A)
        score = 0
        for q in qs:
            if A[q[1]-1] - A[q[0]-1] == q[2]:
                score += q[3]
        max_score = max(score, max_score)
    print(max_score)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
k = int(input)
a, b = map(int, input().split())
if(1<=k<=1000 && 1<=a<=b<=1000):
  tmp = a
  while TRUE:
    tmp += 1
    if tmp%k != 0:
      print('NG')
    else:
      print('OK')
else:
  print('NG')

Submission status: Runtime Error

Solution code:
k = int(input())
[a,b] = [int(i) for i in input().split()]
f = 0
for i in range(a,b+1):
	if i % k == 0:
    	f = 1
if f:
	print("OK")
else:
	print("NG")

Submission status: Runtime Error

Solution code:
K = int(input())
a,b = map(int, input().split())
if a < K and K < B:
    print("OK")
elif (b - a) > K:
    print("OK")
elif (b-a)== 0 and K == 1:
    print("OK")
else :
    print("NG")

Submission status: Runtime Error

Solution code:
K = int(input())
a,b = map(int, input().split())
if a < K and K < B:
    print("OK")
elif (b - a)/K >= 1:
    print("OK")
elif (b-a)== 0 and K == 1:
    print("OK")
else :
    print("NG")

Submission status: Runtime Error

Solution code:
import itertools
N, M, Q = map(int, input().split())
a = [0]*Q
b = [0]*Q
c = [0]*Q
d = [0]*Q
for i in range(Q):
     a[i], b[i], c[i], d[i] = map(int, input().split())
ans = 0
for A in combinations_with_replacement(range(1, M+1), N):
    tmp = 0
    for i in range(Q):
        if A[b[i]-1] - A[a[i]-1] == c[i]:
            tmp += d[i]
    ans = max(ans, tmp)
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b, c = int(list(map(int, input().split())))
d = b//a
e = c//a
if d == e:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int, input().split())
for i in range(A:B+1):
  if i % K ==0:
    print("OK")
    exit()
else:
  print ("NG")

Submission status: Runtime Error

Solution code:
K= int(input())
A, B = map(int, input().split())
i = 0
while A <= B:
  if A / K == A // K:
    i = i + 1
    A = A + 1
  else:
    i = i + 0
    A = A + 1
    
if i = 0:
  print("NG")
else:
  print("OK")

Submission status: Runtime Error

Solution code:
K= int(input())
A, B = map(int, input().split())
i = 0
while A <= B:
  if K / 4 == K // 4:
    i = i + 1
    A = A + 1
  else:
    i = i + 0
    A = A + 1
    
if i = 0:
  print("NG")
else:
  print("OK")

Submission status: Runtime Error

Solution code:
from sys import stdin
import itertools
import numpy as np
from numba import njit

def main():
#入力
    readline=stdin.readline
    N,M,Q=map(int,readline().split())
    a=np.zeros(Q,dtype=np.int64)
    b=np.zeros(Q,dtype=np.int64)
    c=np.zeros(Q,dtype=np.int64)
    d=np.zeros(Q,dtype=np.int64)
    for i in range(Q):
        a[i],b[i],c[i],d[i]=map(int,readline().split())

    arrays=np.array(list(itertools.combinations_with_replacement(range(1,M+1),N)),dtype=np.int64)
    l=len(arrays)

    print(f(l,Q,a,b,c,d,arrays))
    
@njit("i8(i8,i8,i8[:],i8[:],i8[:],i8[:],i8[:,:])",cache=True)
def f(l,Q,a,b,c,d,arrays):
    max_res=0
    for i in range(l):
        res=0
        for j in range(Q):
            if arrays[i][b[j]-1]-arrays[i][a[j]-1]==c[j]:
                res+=d[j]
        max_res=max(max_res,res)
    return max_res

if __name__=="__main__":
	main()

Submission status: Runtime Error

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

for i in rage(a, b):
  if i % k == 0:
    print('OK')
  else:
    print('NG')

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = int(input().split())
if k <= b - a:
  print('OK')
else:
  if b % k <= a % k:
    print('OK')
  else:
    print('NG')

Submission status: Runtime Error

Solution code:
x = input()
k = int(x[0,0])
a = int(x[1, 0])
b = int(x[1, 1])
if k <= b - a:
  print('OK')
else:
  if b % k <= a % k:
    print('OK')
  else:
    print('NG')

Submission status: Runtime Error

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

for i in range(A, B):
  if i % K == 0:
    print('OK')
    sys.exit()
print('NG')

Submission status: Runtime Error

Solution code:
x = input()
x = x.split()
x = x.split(\n)
k = int(x[0])
a = int(x[1])
b = int(x[2])
if k <= b - a:
  print('OK')
else:
  if b % k <= a % k:
    print('OK')
  else:
    print('NG')

Submission status: Runtime Error

Solution code:
x = input()
x = x.split()
x = x.split('\n')
k = int(x[0])
a = int(x[1])
b = int(x[2])
if k <= b - a:
  print('OK')
else:
  if b % k <= a % k:
    print('OK')
  else:
    print('NG')

Submission status: Runtime Error

Solution code:
x = input()
x = x.split()
x = x.split('/')
k = int(x[0])
a = int(x[1])
b = int(x[2])
if k <= b - a:
  print('OK')
else:
  if b % k <= a % k:
    print('OK')
  else:
    print('NG')

Submission status: Runtime Error

Solution code:
x = input()
x = x.split()
k = int(x[0])
a = int(x[1])
b = int(x[2])
if k <= b - a:
  print('OK')
else:
  if b % k <= a % k:
    print('OK')
  else:
    print('NG')

Submission status: Runtime Error

Solution code:
x = input()
x = x.split()
k = int(x[0])
a = int(x[1])
b = int(x[2])
if k <= b - a:
  print('OK')
else:
  if b % k <= a % k:
    print('OK')
  else:
    print('NG')

Submission status: Runtime Error

Solution code:
import math
A, B, N = map(int,input().split())
ans = 0
for i in range(1,min(N,B)):
  X = math.floor(A*i//B)-A*math.floor(i//B)
  if(X>=ans):
    ans = X
print(ans)

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int,input().spilt())
if(A<=(B//K)*K){
  print("OK")
}
else{
  print("NG")
}

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int,input().spilt())
if(A<=B/K*K){
  print("OK")
}
else{
  print("NG")
}

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int,input.spilt())
if(A<=B/K*K){
  print("OK")
}
else{
  print("NG")
}

Submission status: Runtime Error

Solution code:
N = int(input())
A, B = map(int,input.split())
if(A<=B/K*K){
  print("OK")
}
else{
  print("NG")
}

Submission status: Runtime Error

Solution code:
K = int(input())
A,B = map(int,input().split())
f = "NG"

for i in range(A, B+1):
  i % K == 0:
    f = "OK"
    
print(f)

Submission status: Runtime Error

Solution code:
K = int(input())
A,B = map(int,input().split())
n = 1
while True:
    if A <= K*n and K*n <= B:
        print('OK')
        break
    elif Kn > B:
        print('NG')
        break
    n = n + 1

Submission status: Runtime Error

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

 
for i in range(a, b+1):
	if i % k == 0:
    	print("OK")
    	break
else:
	print("NG")

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input().split())
B = b + 1
 
for i in range(a, B):
	if i % k == 0:
    	print("OK")
    	break
else:
	print("NG")

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = list(map, int(input()))
B = b + 1

for i in range(a, B):
  if i % k == 0:
    print("OK")
  else:
    print("NG")

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input().split)
a <= c <= b
if c % k == 0:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

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

for s range in (a , b)
	if s % k ==0:
  		print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
K = int(input())
A,B =list(map(int,input().split()))
count =0
while count * K<A:
	count +=1
if count *K <=B:
	print("OK")
else
	print("NG")

Submission status: Runtime Error

Solution code:
k = int(input())
a = int(input())
b = int(input())

for i in range(a,b):
	if i % k == 0:
		print("OK")
		break
else:
	print("NG")

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = map(int,input().split())
i = n % k
if i == 0:
    print('OK')
    exit()

j = n - i

if a > j:
    print('NG')
else:
    print('OK')

Submission status: Runtime Error

Solution code:
N,M,Q = map(int,input().split())
ls_rq = [list(map(int, input().split())) for i in range(Q)]

#深さ優先探索により各数列を生成する
As=[]
from queue import LifoQueue as lq
S=lq()
S.put([])
while not S.empty():
  a=S.get()
  if len(a)==N:
    As.append(a)
  else:
    if len(a)==0:
      b=1
    else:
      b=a[-1]
    for  i in range(b,M+1):
      S.put(a+[i])

#各数列のスコアを求める
ls_score=[]
for ls in As:
  score=0
  for j in range(Q):
    if ls[ls_rq[j][1]-1]-ls[ls_rq[j][0]-1]==ls_rq[j][2]:
      score+=ls_rq[j][3]
  ls_score.append(score)    
  score=0

#スコアの最大値を求める  
ans=max(ls_score)  
print(ans)

Submission status: Runtime Error

Solution code:
K = int(input())
A,B = map(int,input().split())
if A == B:
	if K//A == 0:
        print('OK')
	else:
        print('NG')
else:
	if K//A == K//B:
		print('NG')
	else:
		print('OK')

Submission status: Runtime Error

Solution code:
K = int(input())
A,B = map(int,input().split())
if A == B:
	if K//A == 0:
        print('OK')
    else:
		if K//A == K//B:
			print('NG')
		else:
			print('OK')

Submission status: Runtime Error

Solution code:
K = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
  if i%K == 0:
  print('OK')
  else:
  print('No')
  return

Submission status: Runtime Error

Solution code:
K = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
  if i%K == 0:
  print('OK')
  else:
  print('No')

Submission status: Runtime Error

Solution code:
K = int(input())
a,b = map(int,input().split())
for i in range(a,b+1):
  if i%K == 0:
  print('OK')
else:
  print('No')

Submission status: Runtime Error

Solution code:
K = int(input())
a,b = map(int,input().split())
for i in range(a,b+1)
if i%K == 0
  print('OK')
else:
  print('No')

Submission status: Runtime Error

Solution code:
K = int(input())
A,B = map(int,input().split())
for i in range(a,b+1)
if i%K == 0
  print('OK')
else:
  print('No')

Submission status: Runtime Error

Solution code:
#-*-ccoding:utf-8-*-
k = int(input())
a, b = map(int, input().split())
is_ok = False

for i in range(a,b+1):
  if i % k == 0:
    is_ok = true
    
if is_ok:
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
k = input()
a, b = map(int, input().split())
ka = a // k
kb = b // k
if b - a >= k - 1:
  print("OK")
elif kb - ka > 0:
  print("OK")
else:
  print("NG")

Submission status: Runtime Error

Solution code:
k = input()
a, b = map(int, input().split())
if (b % k) - (a % k) <= 0 or b - a >= 0:
  print("OK")
else:print("NG")

Submission status: Runtime Error

Solution code:
k = input()
a, b = map(int, input().split())
if b//k - a//k <= 0 or b - a >= 0:
  print("OK")
else:print("NG")

Submission status: Runtime Error

Solution code:
k=int(input())
a,b=map(input().split())
for i in range(a<b):
	if range(a<b)%k==0:
		print('OK')
    else:
    	print('NG')

Submission status: Runtime Error

Solution code:
#H,W入力
h,w= map(int,input().split())

c =[]
road = [[0] * w for i in range(w)]

for i in range(h):
    c.append([])

for i in range(h):
    c[i] = input()

for j in range(h):
    if 's' in c[j]:
         #初期座標を決定
        x = j
        y = c[j].index('s')

def dfs(p,q):
    if road[p][q] == 0 :
        road[p][q] = c[p][q]
        if c[p][q] == '.' or c[p][q] == 's':
            if  p != h-1:
                dfs(p+1,q)
            if p != 0:
                dfs(p - 1, q)
            if q != w - 1:
                dfs(p, q + 1)
            if q != 0:
                dfs(p, q - 1)
    return road

road = dfs(x,y)

ans = []
for k in range(w):
    ans.append('g' in road[k])

if True in ans:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input().split())
c = a // k
d = b // k
if c = d:
  print("NG")
else:
  print("OK")

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input().split())
c = a // k
d = b // k
if c = d:
  print("NG")
else:
  print("YES")

Submission status: Runtime Error

Solution code:
k = int(input().split())
a, b = map(int, input().split())
c = a // k
d = b // k
if c = d:
  print("NG")
else:
  print("YES")

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input())
c = a // k
d = b // k
if c = d:
  print("NG")
else:
  print("YES")

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input())
c = a // k
d = b // k
if c != d:
  print("NG")
else:
  print("YES")

Submission status: Runtime Error

Solution code:
k = int(input())
a, b = map(int, input(),split())
for i in range(a, b+1):
    if i % k == 0:
        print('OK')
        exit()
print('NO')

Submission status: Runtime Error

Solution code:
from sys import stdin
input = stdin.readline

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

maxpoint = 0
if b > n:
    for i in range(n+1):
        tmp = int((a * i) / b)  - a * int(i/b) 
        maxpoint = max(tmp,maxpoint)
else:
    for i in reversed(range(n+1)):
        tmp = int((a * i) / b)  - a * int(i/b) 
        if b > 1:
            if i % (b-1) == 0 :
                maxpoint = max(tmp,maxpoint)
                print(maxpoint) 
                exit()
        elif b == 1:
            print(0)
            exit()
        maxpoint = max(tmp,maxpoint)
        # print(maxpoint)

print(maxpoint)

Submission status: Runtime Error

Solution code:
K=int(input())
A,B=map(int,input().split())
for i in range(A,B+1):
  if i%K==0:
    print("OK")
    exec()
print("NG")

Submission status: Runtime Error

Solution code:
k = input()
a, b = map(int, input().split())
 
for i in range(a,b):
  if i%k == 0:
    print("OK")
    break
else:
  print("NG")

Submission status: Runtime Error

Solution code:
k = input()
a, b = map(int, input().split())
 
for i in range(a,b+1):
  if i%k == 0:
    print("OK")
    break
else:
    print("NG")

Submission status: Runtime Error

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

for i in range(a,b+1):
  if i%k == 0:
    print("OK")
    break
  else:
    print("NG")

Submission status: Runtime Error

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

if a % k == 0 or (a % k - b % k) >= 0:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

Solution code:
k = int(input())
a = int(input())
b = int(input())

if a % k == 0 or (a % k - b % k) >= 0:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

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

for i in range(a-1,b-1):
  if k//i == 0:
    print("OK")
    break
  else:
    continue
print("NO")

Submission status: Runtime Error

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

for i in range(a-1,b):
  if k//i == 0:
    print("OK")
    break
  else:
    continue
print("NO")

Submission status: Runtime Error

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

if(A%K==0 or B%K==0 or (B-A>=K and B!=A):
    print('OK')
else:
    print('NG')

Submission status: Runtime Error

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

if(A%K==0 and B%K==0 and B-A=>K):
    print('OK')
else:
    print('NG')

Submission status: Runtime Error

Solution code:
K=int(input())
A,B=map(int,input().split())
a=0
for i in range(A,B+1):
  if i%k==0:
    a+=1
if a==1:
  print("OK")
else:
  print("NG")