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

Solution code:
#include <CodeforcesSolutions.h>
#include <ONLINE_JUDGE <solution.cf(contestID = "1362",problemID = "B",method = "GET")>.h>
"""
    Author : thekushalghosh
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time,random
start_time = time.time()
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################

def solve():
    k = inp()
    a,b = invr()
    if a <= math.ceil(a / k) * k <= b:
        print("OK")
    else:
        print("NG")
                
################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    
#---------------------- USER DEFINED INPUT FUNCTIONS ----------------------#
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 
#------------------ USER DEFINED PROGRAMMING FUNCTIONS ------------------#
def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)
 
def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
    return(q)

def power_two(n):
    if n == 1:
        return(True)
    sttr = str(n)
    len_str = len(sttr)
    sttr = list(sttr)
    num = 0
    if (len_str == 1 and sttr[len_str - 1] == '1'): 
        return(False)
    while (len_str != 1 or sttr[len_str - 1] != '1'):
        if ((ord(sttr[len_str - 1]) - ord('0')) % 2 == 1):
            return(False)
        j = 0; 
        for i in range(len_str):  
            num = num * 10 + (ord(sttr[i]) - ord('0')); 
            if (num < 2): 
                if (i != 0):  
                    sttr[j] = '0'
                    j += 1
                continue
  
            sttr[j] = chr((num // 2) + ord('0'))
            j += 1; 
            num = (num) - (num // 2) * 2
        len_str = j
    return(True)

def log_two(n): 
    return(math.log(n) / math.log(2))

#-----------------------------------------------------------------------#
        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
    
main()

Submission status: Accepted

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

if B//K!=A//K:
  print('OK')
elif A%K==0:
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:

def main():
    k = int(input())
    a,b = list(map(int,input().split()))

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

if __name__=='__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
list = list(map(int, input().split()))
while list[0]<=list[1]:
  if list[0]%K==0:
    print('OK')
    exit()
  list[0]+=1
print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if k == 1:
    print('OK')
    exit()

if k > b:
    print('NG')
    exit()

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
     K = int(input())
     A, B = map(int, input().split())
     print('NOGK'[A+B%K<=B::2])


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int, input().split())
def f():
    if A % K == 0:
        return 'OK'
    out = (A // K) * K + K
    if out <= B:
        return 'OK'
    else:
        return 'NG'

print(f())

Submission status: Accepted

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("OK")
        sys.exit()
print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A,B = (int(x) for x in input().split())
Flag = 0
for T in range(0,B-A+1):
    if (A+T)%K==0:
        Flag = 1
        break
if Flag:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
if a<k and b<k:
    print('NG')
else:
    print('NOGK'[(a//k!=b//k or a%k==0)::2] if a!=b else 'OK')

Submission status: Accepted

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

adiv =a//k


if k*(adiv+1)<=b:
   print('OK')
elif a%k==0 or b%k==0: 
    print('OK')
else:
    print('NG')

Submission status: Accepted

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('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B =map(int,input().split())
ad,am=divmod(A,K)
bd,bm=divmod(B,K)
if bd>ad:
    print("OK")
elif am ==0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

if ans != "OK":
    ans = "NG"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

if A % K == 0:
    print("OK")
elif (A // K + 1) * K <= B:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

L = B // K * K
if A <= L:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

if (a//k + 1)*k <= b or k == 1 or a%k == 0:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

upper_times_k = (b // k) * k

if a <= upper_times_k:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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(0)
print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
a,b=input().split()
a = int(a)
b = int(b)
i=0
s = ""
while (a+i <= b):
  if((a+i)%k==0):
  	s=  "OK"
  i += 1
if (s != "OK"):
	s= "NG"
print(s)

Submission status: Accepted

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


if a%k == 0:
  print('OK')
elif (a//k +1)*k <= b:
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:
import sys
K = int(input())
A, B = [int(x) for x in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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('NG')

Submission status: Accepted

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

print("OK" if (b//k)*k >= a else "NG")

Submission status: Accepted

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

remain = A % K

if (remain == 0) or (A + (K- remain) <= B):
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

c = B//K
if c * K >= A:
  print('OK')
else:    
  print('NG')

Submission status: Accepted

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

j = b - i

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

Submission status: Accepted

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

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

Submission status: Accepted

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

flag = 0
i = 1
while flag == 0:
    if k * i <= b:
        if a <= k * i <= b:
            flag = 1
        i = i + 1
    else:
        break

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k,a,b=map(int,open(0).read().split())
print('ONKG'[b%k>b-a::2])

Submission status: Accepted

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


if __name__ == '__main__':
	print(main())

Submission status: Accepted

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('NG')

Submission status: Accepted

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

flag=False

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
#A
K = int(input())
A,B = map(int,input().split())
a = A//K
b = B//K
if 1 <= b and a != b or A%K == 0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

qb = b // k
if a <= qb * k <= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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('NG')

Submission status: Accepted

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

if A%K == 0:
    print("OK")
    sys.exit()
if A + (K - A%K) <= B:
    print("OK")
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if B // K * K >= A:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
l, h = map(int, input().split(' '))

for n in range(l, h + 1):
    if n % K == 0:
        print('OK')
        break
else:
    print('NG')

Submission status: Accepted

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==1:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
N = int(input())
A, B = map(int, input().split())
# rangeのときは多くもらないといけないからB+1
for i in range(A, B+1):
#   この中の何番目かでNで割って余りが0なら終了
  if i % N == 0:
    print('OK')
    break
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

K = int(input())
A,B = map(int,input().split())
n = K
i = 1
while n <= B:
    if A <= n and n <= B:
        print("OK")
        sys.exit()
    i += 1
    n = K * i

print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = b//k - (a - 1)//k

if cnt:
	print "OK"
else:
	print "NG"

Submission status: Accepted

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

Submission status: Accepted

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

multiple = 0

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

if multiple == 1:
    print('OK')
elif multiple == 0:
    print('NG')

Submission status: Accepted

Solution code:
n=int(input())
a,b=map(int,input().split())
flag=False
for i in range(1000):
  ans=1+i
  if(a<=ans and b>=ans):
    if(ans%n==0):
      flag=True
      
if(flag):
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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
print("OK" if is_ok else "NG")

Submission status: Accepted

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
print("OK" if flag else "NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = a % k
if ans == 0 or (a - ans + k) <= b:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

    res = 'NG'
    for i in range(A//K, B+1):
        if K*i >= A and K*i<=B:
            res = 'OK'
            break
    print(res)            



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
k = int(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")
elif a % k == 0 or b % k == 0:
  print("OK")
else:
  print("NG")

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int,input().split())
bb = b//k
aa , i = divmod(a, k)
if (aa != bb) or ( i ==0):
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import sys
N=int(input())
a,b=map(int,input().split())
for i in range(a,b+1):
  if i%N==0:
    print("OK")
    sys.exit()
print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

NUM = 0

while 1:
    NUM += K
    if NUM >= A:
        break

if NUM <= B:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
#ABC165-A

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

p = 0

for i in range(b-a+1):
    if (a+i)%k == 0:
        p = 1
        break

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if  flag:
  print('NG')

Submission status: Accepted

Solution code:
K = 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: Accepted

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

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

Submission status: Accepted

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

if A%K==0 or B%K==0:
    print('OK')
elif B//K != A//K:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
k=int(input())

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

ans='NG'

for i in range(1000):
    if a<=k*i<=b :
        ans='OK'
        break

print(ans)

Submission status: Accepted

Solution code:
k=int(input())
l=list(map(int, input().split(' ')))
a=l[0]
b=l[1]

if (b-a)+1>=k:
    print('OK')
else:
    maybe=(a//k)*k
    ans=False
    while maybe<=b:
        if maybe>=a:
            ans=True
            break
        else:
            maybe+=k
    if ans:
        print('OK')
    else:
        print('NG')

Submission status: Accepted

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
    elif i == b:
        print('NG')

Submission status: Accepted

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('NG')

Submission status: Accepted

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

for i in range(m):
  if a<=k*(i+1) and b>=k*(i+1):
    print('OK')
    exit()
  else:
    i += 1

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

warikiretakadouka = False

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

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

Submission status: Accepted

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('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a, b = input().split()
count = 0
for x in range(int(a), int(b)+1):
    if x % n == 0:
        count = count + 1
        print("OK")
        break
    else:
        continue
if count == 0:
    print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
X = int(A / K)
Y = K * X
CHECK = "OK"
while A==A:
 #   print(Y)
    if Y >= A and Y <= B:
        break
    elif Y < A:
        Y += K
    else:
        CHECK = "NG"
        break
print(CHECK)

Submission status: Accepted

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

print('OK') if (A + K - 1) // K * K <= B else print('NG')

Submission status: Accepted

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('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

if B//K > A//K or A*B%K==0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
K = int(input())
A,B = [int(x) for x in input().split()]
for s in range(A,B+1):
    if s % K == 0:
        print("OK")
        exit()
print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(1001):
    if i * k >= a and i*k <= b:
        result = "OK"
        break
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A,B = map(int,input().split())
if A//N == A/N:
  print("OK")
else:
  if B//N - A//N > 0:
    print("OK")
  else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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