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

ans = "NG"

t = 0
while t <= b:
    t += k
    if a <= t <= b:
        ans = "OK"

print(ans)

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
x=b//k
if a<=x*k<=b:
    print('OK')
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:
        flg=True
        break

if flg:
    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=map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

if check(K, A, B):
  print('OK')
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:
        print("OK")
        c=1
        break
if c==0:
    print("NG")

Submission status: Accepted

Solution code:
k, a, b = map(int, open(0).read().split())
print("NOGK"[a//k < b//k or a//k == a/k::2])

Submission status: Accepted

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

if b-a >= k-1:
  print('OK')
elif a % k - b % k > 0 or a % 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:
import math
K = int(input())
A, B = map(int,input().split())

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

if counter == 0:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=int(input())
A,B=input().split()
A=int(A)
B=int(B)
for i in range(B+1):
    if i>=A  and i%K==0:
       print('OK')
       break
    if i==B:
        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:
# A
K = int(input())
A, B = map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

i = a // k
j = b // k

res = j - i

if res >= 1:
  print('OK')
elif res == 0 and k == 1:
  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())

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 = (int(x) for x in input().split())

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

Submission status: Accepted

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

    
main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
if 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())

clear = []

for target in range (A,B+1):
    if target % K == 0:
        clear.append(target)
        
if not clear:
    print("NG")
else:
    print("OK")

Submission status: Accepted

Solution code:
k = int(input())

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

counter = 0

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

if counter == 0:
    print("NG")

Submission status: Accepted

Solution code:
k = int(input())
combined = input().split(" ")
a = int(combined[0])
b = int(combined[1])
result = False

while True:
    if a % k == 0:
        result = True
        break
    if a == b:
        break
    a += 1

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

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 = map(int, input().split())
flag = False
i = A
while(i<=B):
  if i%K==0:
    flag=True
    break
  i +=1
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')
        quit()

print('NG')

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
def main():
    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')


if __name__ == '__main__':
    main()

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')
        break
else:
    print('NG')

Submission status: Accepted

Solution code:
K = int(input())
from_A, to_B = map(int, input().split())

for i in range(from_A, to_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 > (A-1)//K:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    a, b = [int(i) for i in input().split()]
    if a % k == 0:
        print('OK')
        exit()
    if b % k == 0:
        print('OK')
        exit()
    if b // k > a // k:
        print('OK')
    else:
        print('NG')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
cnt = 0
while K * cnt <= 1000:
    if A <= K * cnt <= B:
        print('OK')
        exit()
    cnt += 1
print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

from numba import njit, b1, i8


@njit(b1(i8, i8, i8), cache=True)
def solve(K, A, B):
    for i in range(A, B + 1):
        if i % K == 0:
            return True
    return False


def main():
    input = sys.stdin.buffer.readline
    K = int(input())
    A, B = map(int, input().split())

    print('OK' if solve(K, A, B) else 'NG')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

from numba import njit, void, i8
input = sys.stdin.buffer.readline
K = int(input())
A, B = map(int, input().split())


@njit(i8(i8, i8, i8), cache=True)
def main(K, A, B):

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


if __name__ == '__main__':
    main(K, A, B)

Submission status: Accepted

Solution code:
import sys
from numba import njit
input = sys.stdin.buffer.readline

K = int(input())

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


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


if __name__ == '__main__':
    main(K, A, B)

Submission status: Accepted

Solution code:
import sys
from numba import njit
input = sys.stdin.buffer.readline

K = int(input())

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


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


if __name__ == '__main__':
    main(K, A, B)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.buffer.readline
 
 
def main():
    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')
 
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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

K = int(input())

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


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


if __name__ == '__main__':
    main(K, A, B)

Submission status: Accepted

Solution code:
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k >= A and k <= B:
        print('OK')
        a = True
        break
    else:
        k = K
        a = False
        continue
if a != True:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    K = int(input())
    A, B = map(int, input().split())
    largest = B // K * K
    print("OK" if A <= largest else "NG")
    return


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

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

if m != 0:
    print("OK")
elif m == 0:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
i = 1
c = 0
if k > b:
    print('NG')
while k <= b:
    if a <= k*i<= b:
        print("OK")
        break
    elif k*i >b:
        c = 1
        break
    else:
        i += 1
if c == 1:
    print('NG')

Submission status: Accepted

Solution code:
k = int(input())
a, b = [int(i) for i in 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:
x = int(input())
y, z = map(int,input().split())
i = 1
while x * i:
    if x * i > z:
        print("NG")
        exit()
    if y <= x * i <= z:
        print("OK")
        exit()
    i += 1

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

Submission status: Accepted

Solution code:
# Atcoderテスト場所
k = int(input())
a,b = map(int, input().split())
ans = "NG"
for i in range(a,b+1):
    # print(i)
    if(i%k==0):
        ans = "OK"
        break
print(ans)

Submission status: Accepted

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

f=0
for x in range(A,B+1):
    f=f or (x%K==0)

if f:
    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:
# coding: utf-8

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

for x in range(1000):
    if a <= x*k <= b:
        print('OK')
        break
else:
    print('NG')

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
check = False
for i in range(A, B + 1):
  if i % K == 0:
    check = True
    break;
if check == True:
  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-a>=k:
    print('OK')    
elif a%k>b%k:
    print('OK')
elif k==1:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

i = 1
while(True):
  if((A<=K*i) and (K*i<=B)):
    print('OK')
    sys.exit()
  if(B<K*i):
    print('NG')
    sys.exit()
  i += 1

Submission status: Accepted

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

for i in range(1001):
    if a <= k*i <=b:
        print('OK')
        exit(0)
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")
        break
else:
    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())

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

i=int(A)

while i<=int(B):
    if i%int(K)==0:
        print("OK")
        break
    i+=1
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:
        ans = "OK"

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

print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

s=range(A,B+1)   
for n in range(1,1000):  
        if K*n in s:
            print("OK")
            break
        if K==1:
            print("OK")
            break
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 a // k != b // k:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
k = int(input())
a, b = map(int, input().split())
print(["NG", "OK"][b // k * k >= a])

Submission status: Accepted

Solution code:
K = int(input())

A,B = map(int,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())

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

print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

aa = a % k
bb = b % k

if(b - a >= k):
    print('OK')
elif(aa > bb):
    print('OK')
elif(aa == 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')
    quit()
print('NG')

Submission status: Accepted

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

x = (a + k - 1) // k * k

if x <= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

print(res)

Submission status: Accepted

Solution code:
K=int(input())

ARGS=input().split()
A=int(ARGS[0])
B=int(ARGS[1])

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

Submission status: Accepted

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

largest = int(b / k) * k

if( a <= largest ):
    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())
flg = False

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

flg = check()
if flg:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

    i = 1

    while k*i <= b:
        if a <= k*i <= b:
            print('OK')
            return
        i += 1
    else:
        print('NG')
resolve()

Submission status: Accepted

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

import numpy as np

k = int(input())
a, b = [int(x) for x in input().split()]
a_b = np.arange(a, b + 1)
ans = "OK" if (a_b % k == 0).any() else "NG"
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())

a = 0

for i in range(A, B+1):
  if i%K == 0:
    a+=1
  else:
    pass
if a != 0:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

if a%k==0:
    print("OK")
else:
    if(a-a%k+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:
k = int(input())
a, b = list(map(int, input().split()))

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

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

Submission status: Accepted

Solution code:
K=int(input())
A, B=map(int, input().split())
listAtoB=list(range(A,B+1))
k=list(filter(lambda  x: x% K == 0,listAtoB))

if K==1 or len(k) >= 1:
	print("OK")
else:
	print("NG")

Submission status: Accepted

Solution code:


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

k = int(B/K) - int((A-1)/K) 

if K == 1:
	print("OK")
elif k >= 1:
	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(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())
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: Accepted

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

Submission status: Accepted

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

while True:
    if b < k * i:
        print('NG')
        break
    elif a <= k * i <= b:
        print('OK')
        break
    else:
        i += 1

Submission status: Accepted

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

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:
        break
print("OK" if i%k==0 else "NG")

Submission status: Accepted

Solution code:
k=int(input())
a,b=list(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())

answer = 'NG'

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
abs = [int(e) for e in input().split()]

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

Submission status: Accepted

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

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:
        continue
else:
    print("NG")

Submission status: Accepted

Solution code:
K = int(input())
AB = input()
l = AB.split()
A = int(l[0])
B = int(l[1])
li = []
for i in range(A, B+1) : 
  if i % K == 0 :
    li.append(i)
  else :
    continue
if len(li) >=1 :
  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
  if 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:
import sys
k=int(input())
a, b =map(int, sys.stdin.readline().rstrip().split())
s = "NG"
for i in range(b-a+1):
	if (a+i)%k==0:
		s="OK"
print(s)

Submission status: Accepted

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

fly = range(A, B+1)

for i in fly:
  if i % K == 0:
    print('OK')
    break
else:
    print('NG')

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int, input().split())
print('OK') if (a%k ==0 or (b//k)-(a//k) >= 1) 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")
    return

main()

Submission status: Accepted

Solution code:
import sys
#from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def main():
    k = int(stdin.readline().rstrip())
    a,b = map(int, stdin.readline().rstrip().split())
    #l = list(map(int, stdin.readline().rstrip().split()))
    #numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]
    #word = [stdin.readline().rstrip() for _ in range(n)]
    #number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]
    #zeros = [[0] * w for i in range(h)]
    for i in range(1,1000):
        if a<=k*i<=b:
            print("OK")
            exit()
    print("NG")

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=int(input())
ab=list(map(int, input().split()))
A=ab[0]
B=ab[1]
flg=False
for i in range(A,B+1):
    if i%K==0:
        flg=True
if flg:
    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")
        quit()
    else:
        continue
print("NG")

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    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')


if __name__ == "__main__":
    setrecursionlimit(10000)
    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")
    break
else:
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input().rstrip())
A, B = map(int, input().rstrip().split())
v = int(B / K) * K
r = 'OK' if A <= v else 'NG'
print(r)

Submission status: Accepted

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

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')
sys.exit()

Submission status: Accepted

Solution code:
N=int(input())
A,B=list(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:
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-1)//k != b//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) * k >= a else 'NG')

Submission status: Accepted

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

if A % K == 0 or B % K == 0:
    ans = "OK"
elif A//K != B//K:
    ans = "OK"
else:
    ans = "NG"

print(ans)

Submission status: Accepted

Solution code:
K = int(input())
A, B = [int(i) for i in 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())
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())
count = 0

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

if count ==0:
    print('NG')

else:
    print('OK')

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    k = input()
    k = int(k)
    ab = input()
    ab = ab.split()
    a = int(ab[0])
    b = int(ab[1])
    flag = False
    sum = k
    while k<=b:
        if a<=k and k<=b:
            flag = True
        k += sum
    if flag:
        print("OK")
    else:
        print("NG")