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: Wrong Answer

Solution code:

# Author : devil9614 - Sujan Mukherjee

from __future__ import division, print_function

import os,sys
import math
import collections
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def msi(): return map(str,input().strip().split(" "))
def li(): return list(mi())

def dmain():
    sys.setrecursionlimit(100000000)
    threading.stack_size(40960000)
    thread = threading.Thread(target=main)
    thread.start()
    
#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
#from math import log,sqrt,factorial
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *,threading
#from itertools import permutations
#Copy 2D list  m = [x[:] for x in mark] .. Avoid Using Deepcopy

abc='abcdefghijklmnopqrstuvwxyz'
abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]
def getKey(item): return item[1] 
def sort2(l):return sorted(l, key=getKey,reverse=True)
def d2(n,m,num):return [[num for x in range(m)] for y in range(n)]
def isPowerOfTwo (x): return (x and (not(x & (x - 1))) )
def decimalToBinary(n): return bin(n).replace("0b","")
def ntl(n):return [int(i) for i in str(n)]
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(n-r))

def ceil(x,y):
    if x%y==0:
        return x//y
    else:
        return x//y+1

def powerMod(x,y,p):
    res = 1
    x %= p
    while y > 0:
        if y&1:
            res = (res*x)%p
        y = y>>1
        x = (x*x)%p
    return res

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x
    
def isPrime(n) : # Check Prime Number or not 
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
    return True



def read():
    sys.stdin = open('input.txt', 'r')  
    sys.stdout = open('output.txt', 'w') 

def padded_bin_with_complement(x):
    if x < 0:
        return bin((2**16) - abs(x))[2:].zfill(16)
    else:
        return bin(x)[2:].zfill(16)
def binaryToDecimal(binary): 
      
    binary1 = binary 
    decimal, i, n = 0, 0, 0
    while(binary != 0): 
        dec = binary % 10
        decimal = decimal + dec * pow(2, i) 
        binary = binary//10
        i += 1
    print(decimal) 
def CountFrequency(arr): 
    return collections.Counter(arr)

def main():
    k = ii()
    a,b = mi()
    f= 0
    for i in range(a,b+1):
        if i%k == 0:
            f= 1
            break
    if f:
        print("OK")
    else:
        print("NO")













    












    
    
       



    






# region fastio
# template taken from https://github.com/cheran-senthil/PyRival/blob/master/templates/template.py

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion


if __name__ == "__main__":
    #read()
    main()
    #dmain()

# Comment Read()

Submission status: Wrong Answer

Solution code:
K = int(input())

minMax = list(map(int,input().strip().split()))

A = minMax[0]
B = minMax[1]

if B-A >= K-1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

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

syou = a // k
# amari = a % k

if b >= (syou * k + k):
    print('OK')
else:
    print('NG')

Submission status: Wrong Answer

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

if a//k<1 and b//k>=1:
    print("OK")
elif k==1 or a==k or (b-a)//k>1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
K = int(input())
score = input().split()
s = int(score[1]) - int(score[0])
if ( int(score[0]) % K ) == 0:
		print('OK')
elif ( int(score[1]) % K ) == 0:
		print('OK')
elif s == 0:
	if (s % K) == 0:
		print('OK')
	else:
		print('NG')
elif (s // K) > 0:
		print('OK')
else:
		print('NG')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
inp = [input() for i in range(2)]
K = int(inp[0])
A,B = inp[1].split()
A,B = int(A),int(B)
c,bbb = 0,0
if 1<= A <= B <= 1000 and 1<= K <= 1000:
  for h in range(A,B,1):
    c = h % K
    if c == 0:
      bbb += 1
  if bbb > 0:
    print('OK')
  elif K == 1:
    print('OK')
  elif K ==A or K ==B:
    print('OK')
  else:
    print('NG')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
A,B=map(int,input().split())
L=[]
for i in range(A,B):
    L.append(i%K)
if 0 in L:
    print("OK")
else:
     print("NG")

Submission status: Wrong Answer

Solution code:
N = int(input())
A=[int(x) for x in input().split()]
k=0
if N==1:
    print("OK")
else:
     if A[0]//int(N) == A[1]//int(N) and A[0]%int(N)==A[1]%int(N) and A[0]%int(N)==0 :
        print("OK")
     elif A[0]//int(N) != A[1]//int(N) and A[0]%int(N)!=0:
        print("OK")
     else:
        print("NG")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if  0 < abs(A-B) < K:
    for i in range(A, B):
        ans = i % K
        if ans == 0:
            print('OK')
            break    
    if ans != 0:
        print('NG')
elif abs(A -B) == 0:
    if A % K == 0 :
        print('OK')
    else:
        print('NG')
elif abs(A-B) >= K :
    print('OK')

Submission status: Wrong Answer

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

if B//K - A//K >=1:
	print('OK')
elif B == A:
	print('OK')
else:
	print('NG')

Submission status: Wrong Answer

Solution code:
import math
k=int(input())
a,b=map(int,input().split())
s=math.ceil((b-a)/k)

if(k==1):
  print("OK")

ans=0
for i in range(1,s+1):
  if(k*i>=a):
    if(k*i<=b):
      ans=1
      break

if(ans==0):
  print("NG")
if(ans==1):
  print("OK")

Submission status: Wrong Answer

Solution code:
n = int(input())
a,b = map(int, input().split())
ans = "NG"
if a==b:
    ans = "OK"
if (b-a)/n>=1:
    ans = "OK"
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a,b = map(int,input().split())
x = b-a

if x>=n:
    print("OK")
elif x==0:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

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

if a == b:
    if a % b == 0:
        print("OK")
    else:
        print("NG")
else:
    while a <= b:
        a += 1
        if a % n == 0:
            print('OK')
            break
        elif a == b:
            print("NG")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
account = 100
goal = int(input())
count = 0

while True:
  count += 1
  account *= 1.01
  if account >= goal:
  	break
print(count)

Submission status: Wrong Answer

Solution code:
from sys import stdin

def main():

    input = stdin.readline

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

    
    for i in range(1,1001):
        if A <= i * K & B <= i * K:
            print("OK")
            return 0
    else:
        print("NG")

    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
K = int(input())
AB = list(map(int, input().split()))
A = AB[0]
B = AB[1]
if A % K == 0 or B % K == 0 or B - A >= K:
	print("OK")
else:
	print("NG")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b - a >= k:
  print("OK")
elif  k == 1:
  print("OK")
elif b == k or a == k:
  print("OK")
elif b % k == 0 or a % k == 0:
  print("OK")
elif b < k < a:
  print("OK")
elif a != b and k == 2:
  print("OK")
else:
  print("NG")

Submission status: Wrong Answer

Solution code:
k = int(input())
arr = input().split(" ")
m, n = int(arr[0]), int(arr[1])
if n>=m+k-1 and m//k>=1:
  print('OK')
else:
  print('NG')

Submission status: Wrong Answer

Solution code:
N = int(input())
L= list(map(int,input().split()))
min = L[0]
max = L[1]

for i in range(min,max):
  if i % N == 0:
    print("OK")
    break
else:
  print("OK")

Submission status: Wrong Answer

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

if a//k<1 and b//k>=1:
    print("OK")
elif k==1 or a==k or (b-a)//k>=1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
k = int(input())
a,b = map(int, input().split())
c,d,e = a%k,b%k,0
if c!=0 and d!=0:
    if b-a+1 <= k:
      if d > c:
          e = 1

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

Submission status: Wrong Answer

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

print('OK' if b - a + 1 >= k else 'NG')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if K == 1 or A%K == 0 or B%K == 0:
    print("OK")
elif (B-A)/K >= 1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
num = int(input())
a,b = map(int, input().split())
if (a//num+1)*num <= b:
  if a<=(b//num-1)*num:
    print('OK')
elif num==1:
    print('OK')
else:
  print('NG')

Submission status: Wrong Answer

Solution code:
import sys
#sys.exit()
#sorted( ,reverse=True)
K = int(input())
A,B = map(int, input().split())
if A > 2*K or B//K <2 :
    
#A = list(map(int, input().split()))

    print('NG')

else:
    
    print('OK')
print( A//K ,B//K)
#print(A)
#print('Yes')
#print('No')

Submission status: Wrong Answer

Solution code:
import math

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

if math.floor(b/k) - math.floor(a/k) > 0 or k == 1:
    print("OK")

else:
    print("NG")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K = int(input())
score = input().split()
s = int(score[1]) - int(score[0])
if ( int(score[0]) % K ) == 0:
		print('OK')
elif s == 0:
	if (s % K) == 0:
		print('OK')
	else:
		print('NG')
elif (s // K) > 0:
		print('OK')
else:
		print('NG')

Submission status: Wrong Answer

Solution code:
K = int(input())
A,B = map(int,input().split())
if B-A>=K-1:
    print('OK')
else:
    k = K-B+A
    if A%K>=k:
        print('OK')
    else:
        print('NG')

Submission status: Wrong Answer

Solution code:
K = int(input())

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

if (A % K == 0) or (B % K == 0):
  print("OK")
  
elif (B - A + 1) >= K:
  print("OK")
  
else:
  print("NG")

Submission status: Wrong Answer

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

s= int(A/K)


if s*K==A:
  print("OK")

elif (s+1)*K>B:
  print("NG")
  
else:
  print("NG")

Submission status: Wrong Answer

Solution code:
k = int(input())
a,b = map(int,input().split())
flag = False
list = [i for i in range(a,b)]
if k == 1 or k == a or k == b:
    flag = True
else:
    c = 1
    while k*c < b:
        if c * k in list:
            flag = True
            break
        else:
            c += 1

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

Submission status: Wrong Answer

Solution code:
inp = [input() for i in range(2)]
K = int(inp[0])
A,B = inp[1].split()
A,B = int(A),int(B)
c,bbb = 0,0
if 1<= A <= B <= 1000 and 1<= K <= 1000:
  for h in range(A,B,1):
    c = h % K
    if c == 0:
      bbb += 1
  if bbb > 0:
    print('OK')
  elif K == 1:
    print('OK')
  else:
    print('NG')

Submission status: Wrong Answer

Solution code:
import math
#def getTotal(now_depo, now_year, goal):
#  if(now_depo >= goal):
#    return now_year
#  else:
#    return getTotal(math.floor(now_depo * 1.01), now_year + 1, goal)

goal = int(input())
depo = 100
#print(getTotal(depo, 0, goal))
now_year = 0
while (True):
  depo = math.floor(depo * 1.01)
  now_year += 1
  if(depo >= goal):
    print(now_year)
    break

Submission status: Wrong Answer

Solution code:
k = int(input())
x,y = map(int,input().split())

if any(i %k == 0 for i in range(x,y)) == 'True':

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
b,c=map(int, input().split())
k = b
while  b<= k <= c :
    if k % n == 0 :
        print('OK')
        exit()
    b = b +1
print('NG')

Submission status: Wrong Answer

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

if A % K == 0:
  print('OK')
elif B % K == 0:
  print('OK')
elif A <= K and K <= B:
  print('OK')
elif K * ((A // K) + 1) <= B:
  print('OK')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
K = int(input())

A, B = map(int, input().split())
c = False
for i in range(A, B+1):
    if i % K == 0:
        c = True

print('OK' if c else 'No')

Submission status: Wrong Answer

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

aK = a // k
aMod = a % k

bK = b // k
dif = bK - aK
if (dif > 1):
    print('OK')
elif (a == b):
    print('OK')
else:
    print('NG')

Submission status: Wrong Answer

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

a1=float(a/k)
b1=float(b/k)
a2=a%k
b2=b%k

if b1-a1>=1.0 or a2==0 or b2==0:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
k = int(input())
l, m = map(int, input().split())

if (l-l%k == m):
    print("OK")
elif ((l/k+k)*k <= m):
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

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("No")

Submission status: Wrong Answer

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

if (K == 1):
  print('OK')
elif (B < K):
  print('NG')
elif(A < K):
  r = K % A
  if (A + r <= B):
    print('OK')
  else:
    print('NG')
elif(K < A):
  q = A // K
  if(K * (q + 1) <= B):
    print('OK')
  else:
    print('NG')
else:
  print('OK')

Submission status: Wrong Answer

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

flg = 0
while n < b:
    n += n
    if a <= n <= b:
        print('OK')
        flg = 1
        break
if flg == 0:
    print('NG')

Submission status: Wrong Answer

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

if K == 1:
    print("OK")
elif (B-A)/K >= 1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

if B < K:
  print("NG")

elif A <= K:
   print("OK")

elif (B-A+1) < A%K:
  print("NG")

else:
  print("OK")

Submission status: Wrong Answer

Solution code:
k = input()
a, b = (int(x) for x in input().split())
K = int(k)
A = int(a)
B = int(b)
i = 1

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

if i == 1:
    print('OK')
else:
    print('NG')

Submission status: Wrong Answer

Solution code:
N = int(input())
A=[int(x) for x in input().split()]
k=0
if N==1:
    print("OK")
else:
     if A[0]//int(N) == A[1]//int(N) and A[0]%int(N)==A[1]%int(N) and A[0]%int(N)==0 :
        print("OK")
     elif A[0]//int(N) != A[1]//int(N):
        print("OK")
     else:
        print("NG")

Submission status: Wrong Answer

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

if A == B or K == 1:
  print('OK')
elif (B - A) >= K:
  print('OK')
elif K == A or K == B:
  print('OK')
else:
  print('NG')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
A=list(map(int,input().split()))
D=A[0]//K
E=A[1]//K
if ((E-D)>0):
  print("OK")
else:
  print("NG")

Submission status: Wrong Answer

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

if K == 1:
    print("OK")
elif B-A/K >= 1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A%K == 0 or B%K == 0:
    print("OK")
elif abs(A/K - B/K) >= 1: 
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
n = int(input())
b,c=map(int, input().split())
k = b
while  b<= k <= c :
    k % n == 0
    print('OK')
    exit()
    b = b +1
print('NG')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
inp = [input() for i in range(2)]
K = int(inp[0])
A,B = inp[1].split()
A,B = int(A),int(B)
c,bbb = 0,0
if 1<= A <= B <= 1000 and 1<= K <= 1000:
  for h in range(A,B,1):
    c = h % K
    if c == 0:
      bbb += 1
  if bbb > 0:
    print('OK')
  else:
    print('NG')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if(a+(n-a%n)<b):
  print("OK")
else:
  print("NG")

Submission status: Wrong Answer

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

a_div_k = a // k
b_div_k = b // k

if k == 1 or (k == 1000 and a == 1000 and b == 1000):
    print("OK")
elif k == b:
    print("OK")
elif a_div_k < b_div_k:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
k = int(input())
x,y = map(int,input().split())

if any(i %k == 0 for i in range(x,y)):

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

Submission status: Wrong Answer

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

if K == 1:
    print("OK")
elif B-A >= 1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
N = int(input())
L= list(map(int,input().split()))
min = L[0]
max = L[1]

for i in range(min,max):
  if i % N == 0:
    print("OK")
    break
else:
  print("NG")

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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("No")

Submission status: Wrong Answer

Solution code:
K=int(input())
 
A,B=list(map(int, input().split()))
i=0
for i in range(A,B+1):
    if i%K==0:
        print("Yes")
        i=1
        break
if i==0:
    
    print("No")

Submission status: Wrong Answer

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

if int(b) >= int(k):
    if int(k) == 1:
        print ("OK")
    elif int(a) == int(b):
        if int(a)%int(k) == 0:
            print ("OK")
    elif (int(a)+int(b))%int(k) == 0:
            print("NG")
    else:
        print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
K=int(input())
A_B=list(map(int,input().split()))
A=A_B[0]
B=A_B[1]
m=1
c=0
for i in range(A,(B+1)):
  if(i%K==0):
    c=1
  else:
    c=0
if(c==1):
  print("OK")
elif(c==0):
  print("NG")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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
        break

print('OK' if c == 1 else 'No')

Submission status: Wrong Answer

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

a = (B//K) - (A//K)

if B<K:
    print("NG")

if A==B:
    if A % K == 0:
        print("OK")

    else:
        print("NG")

else:
    if a==0:
        print("NG")
    
    else:
        print("OK")

Submission status: Wrong Answer

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

for i in range(B, C):
  if i % A == 0:
    flag = 0
    print("OK")
    break

if flag==1:
  print("NG")

Submission status: Wrong Answer

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

if A == B or K == 1:
  print('OK')
elif (B - A) >= K:
  print('OK')
else:
  print('NG')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print('OK' if b - a >= k else 'NG')

Submission status: Wrong Answer

Solution code:
import math

x = int(input())

i = 0
n = 100
while n < x:
    n = math.floor(n * 1.01)
    i += 1

print(i)

Submission status: Wrong Answer

Solution code:
K = int(input())
A, B = [int(x) for x in input().split(" ")]
if B - A + 1  >= K:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
K=int(input())
(A,B)=input().split()
(A,B)=(int(A),int(B))
Ans="NG"
for i in range(1000//K):
  if A<=i*K<=B:
    Ans="OK"
print(Ans)

Submission status: Wrong Answer

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

if (B - A) >= K:
  print('OK')
elif A == B or K == 1:
  print('OK')
else:
  print('NG')

Submission status: Wrong Answer

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
if count==0:
  print("NG")

Submission status: Wrong Answer

Solution code:
k = input()
a, b = (int(x) for x in input().split())
K = int(k)
A = int(a)
B = int(b)
i = 0

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

if i == 1:
    print('OK')
else:
    print('NG')

Submission status: Wrong Answer

Solution code:
k = int(input())

data = input().split()
a = int(data[0])
b = int(data[1])

if a % k == 0 or b % k == 0 or b//k > a//k:
    print("OK")
else:
    print("NO")

Submission status: Wrong Answer

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

if A >= B:
    l = A
    s = B
else :
    l = B
    s = A


if  0 < l - s < K:
    for i in range(s, l):
        ans = i % K
        if ans == 0:
            print('OK')
            break    
    if ans != 0:
        print('NG')
elif l -s == 0:
    if l % K == 0 :
        print('OK')
    else:
        print('NG')
elif l - s >= K :
    print('OK')

Submission status: Wrong Answer

Solution code:

K = int(input())
temp = input().split(" ")
A, B = int(temp[0]), int(temp[1])

is_ok = (A < B and A // K < B // K) or (A == B and A % K == 0)
print("OK" if is_ok else "NO")

Submission status: Wrong Answer

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

if (b // k) - (a // k) >= 2:
    print("OK")
elif k == 1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if int(b) >= int(k):
    if k == 1:
        print ("OK")
    elif int(a) == int(b):
        if int(a)%int(k) == 0:
            print ("OK")
    elif (int(a)+int(b))%int(k) == 0:
            print("NG")
    else:
        print("OK")
else:
    print("NG")

Submission status: Wrong Answer

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

a_div_k = a // k
b_div_k = b // k

if k == 1 or (k == 1000 and a == 1000 and b == 1000):
    print("OK")
elif a_div_k < b_div_k:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
import sys
#sys.exit()
#sorted( ,reverse=True)
K = int(input())
A,B = map(int, input().split())
if A < 2*K or B//K <2 :
    
#A = list(map(int, input().split()))

    print('NG')

else:
    
    print('OK')
#print( A/K ,B/K)
#print(A)
#print('Yes')
#print('No')

Submission status: Wrong Answer

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

sa = m[1] - m[0]
flag = 0
hantei = m[0]

if sa == 0:
    if sa % n == 0:
        print("OK")
        exit()
    else:
        print("NG")
        exit()

if hantei % n == 0:
    flag += 1

for x in range(sa):
    hantei = (x + 1) + m[0]
    if hantei % n == 0:
        flag += 1

if flag >= 1:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
k = int(input())
arr = input().split(" ")
m, n = int(arr[0]), int(arr[1])
if n//k>=2 and n-k>=m:
  print('OK')
else:
  print('NG')

Submission status: Wrong Answer

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

if B//K - A//K >=1:
	print('OK')
elif B == A:
	print('OK')
else:
	print('NG')

Submission status: Wrong Answer

Solution code:
k=int(input())
a=list(map(int,input().split()))
b=k*(a[0]//k)+k
if b<=a[1]:
    print('OK')
else:
    print('NG')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))  # 入力のときに N を使う必要はありません
icount = 0
if A[1] - A[0] >= N:
  print('OK')
  icount = icount + 1
else:
  for i in range(A[0], A[1]+1):
    if i % A[0] == 0:
      print('OK')
      icount = icount + 1
      if icount == 1:
        break
      
if icount == 0:
  print('NG')

Submission status: Wrong Answer

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