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())
k = K
for i in range(1, 1001):
  if a <= k <= b:
    print('OK')
    break
  else:
    k = K*i
    if k > b:
      print('NG')
      break

Submission status: Accepted

Solution code:
import math
K = input()
AB = input().split()

K = int(K)
A = int(AB[0])
B = int(AB[1])

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

Submission status: Accepted

Solution code:
in1 = int(input())
in2, in3 = map(int,input().split())


for i in range(in2, in3+1):
  if i % in1 == 0:
    print("OK")
    break
  elif i == in3:
    print("NG")

Submission status: Accepted

Solution code:
k=int(input())
a,b =map(int,input().split())
for i in range(1,(a//k)+2):
    if a <= i*k and i*k <=b:
        print("OK")
        exit()
print("NG")

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
i = 0
while i*k <= b:
    if a <= i*k <= b:
        print("OK")
        break
    i += 1
else:
    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 == B//K and A%K==0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
K=()
A=()
B=()

K=int(input(""))
A, B = map(int, input().split())
V=False
C=K
D=B+1

for i in range(0,D):
      K=C*i
      if K>=A and K<=B:
            V=True
            break
      else:
            V=False

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3

#標準出力からの読み込み
input_a = input()
input_b = input()
k = int(input_a)
a = int(input_b.split(" ")[0])
b = int(input_b.split(" ")[1])

#判定ロジック
if b//k - a//k > 0:
    print("OK")
elif b//k - a//k == 0 and (b%k == 0 or a%k == 0):
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

for i in range(1, 1000):
  if a<= (i* k) <= b:
    print("OK")
    break
  elif (i* k) > b:
    print("NG")
    break
else:
    print("NG")

Submission status: Accepted

Solution code:
import math

def main():
    K=int(input())
    (A,B)=[int(x) for x in input().strip().split()]
    if A % K == 0:
        print('OK')
    elif math.ceil(A/K)*K <= B:
        print('OK')
    else:
        print('NG')
 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
 
a=int(input())
li = list(map(int,input().split()))
#print(math.ceil(li[0]/a)*a)
if li[1]<math.ceil(li[0]/a)*a:
    print("NG")
else:
    print("OK")

Submission status: Accepted

Solution code:


def main():
    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")
            return
    print("NG")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K=int(input())
A,B=(int(x) for x in input().split())
if K-(A%K)<=B-A or A%K==0:print('OK')
else:print('NG')

Submission status: Accepted

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

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

kk = a // k
kk = k*kk

while(kk <= 1000):
    if(kk <= b and kk >= a):
        print("OK")
        exit()
    #print(kk)
    kk = kk + k
    #j = j + 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    K = int(input())
    A, B = map(int, input().split())
    print(golf(K, A, B))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

c = a//k
d = b//k

if a%k == 0:
  print("OK")
else:
  if c<d:
    print("OK")
  else:
    print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A, B = tuple(int(x) for x in input().split())

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

print('NG')

# start = (A // K) * K
# # if start % K == 0:
# #     import ipdb; ipdb.set_trace()
# #     print('OK')
# #     exit(0)

# if start == B or start + K <= B:
#     print('OK')
#     exit(0)

# print('NG')

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int,input().split())
c = b//k
ans=0
 
for i in range(c+1):
    i += 1
    ans = i*k
    if a<= ans <=b:
        print("OK")
        break
    else:
        ans = -1
 
if ans == -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:
import sys

input = sys.stdin.readline

N = int(input())
A,B = map(int,input().split())
for i in range(A,B+1):
    if i%N == 0:
        print('OK')
        sys.exit(0)
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")
    break

Submission status: Accepted

Solution code:
n = int(input())

(a, b) = [int(s) for s in input().split()]

v = range(n, 1001, n)

v = [i for i in v if a <= i <= b]

ans = 'OK'

if len(v) == 0:
    ans = 'NG'

print(ans)

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
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

ok_flag = False
value = K

while value <= B:
    if value >= A and value <= B:
        ok_flag = True
        break
    value += K

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

Submission status: Accepted

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

con = (a // k + 1) * k

if(con >= a and b >= con):
    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())
c = a // k * k
if a <= c <= b or a <= (c+k) <= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    inputs = input().split(' ')
    start = int(inputs[0])
    end = int(inputs[1])
    
    if start == end:
        if start % k == 0:
            print('OK')
        else:
            print('NG')

    else:
        if (start % k == 0) or (end % k == 0):
            print('OK')
        else:
            if (end - start) >= k:
                print('OK')
            else:
                for i in range(start, end):
                    if i % k == 0:
                        print('OK')
                        break
                    elif i == end - 1:
                        print('NG')
                        break
                    else:
                        pass

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(1, 1001):
    if a <= (k * i) <= b:
        break
    else:
        count += 1

if count == 1000:
    print("NG")
else:
    print("OK")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    k = I()
    a, b = LI()
    flag = False
    if k == 1:
        print(
            'OK'
        )
        exit()
    for i in range(a, b+1):
        if i % k == 0:
            flag = True
    if flag == True:
        print('OK')
    else:
        print('NG')
    return


# Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
k = int(input())
a, b = [int(x) for x in 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:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

from collections import defaultdict
from sys import exit
import math


def main():
    k = getN()
    a,b = getList()
    for i in range(a, b+1):
        if i % k == 0:
            print("OK")
            return

    print("NG")
    return
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
K = int(input())
arr = list(map(int, input().split()))
a = arr[1] % K
b = arr[1] - arr[0]
if a <= b:
    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:
#-*- using:utf-8 -*-

k = int(input())
a, b = map(int, input().split())
while a<=b:
    if(a%k==0):
        print("OK")
        break
    elif a==b:
        print("NG")
        break
    else:
        a += 1

Submission status: Accepted

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

if bmod < b - a:
    print("OK")
    exit()

print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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



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

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

Submission status: Accepted

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

t = (b//k)*k

if t <= b and a <= t:
    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"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from copy import copy, deepcopy
from collections import Counter
from math import sqrt

MOD = 10**9 + 7
K = int(input())
A, B = list(map(int, input().split()))
flag = 0
for i in range(B-A+1):
    if (A+i) % K == 0:
        flag = 1
        break

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

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

print('NG')

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int,input().split())
n = 1
ans = "NG"
while (k*n) <= b:
    if (k*n) >= a and (k*n) <= b:
        ans = "OK"
        break
    n += 1
print(ans)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    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())

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

Submission status: Accepted

Solution code:
S = int(input())
A,B = map(int,input().split())
check = False
ans = 0
i = 1
while ans <= B:
  ans = S * i
  if A <= ans and B >= ans:
    check = True
    break
  i += 1
if check:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

res = "NG"

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

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=int(input())
x,y = map(int,input().split())
count = 0

for i in range(x, y + 1):
    if i % a == 0:
        count += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

x = np.array(list(range(a, b+1)))
x = x % k

if 0 in x:
    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())
m=int(A/K)
if m*K==A:
  print('OK')
elif (m+1)*K>B:
  print('NG')
else:
  print('OK')

Submission status: Accepted

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

while a <= b :
    if a % c == 0:
        d = d + 1;

    a = a + 1;
    
if d == 0:
    print("NG");

else:
    print("OK");

Submission status: Accepted

Solution code:
#A
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())
if A%K==0 or B%K==0:
    print("OK")
    exit()
if int(A/K)<int(B/K):
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
# import math
# from collections import Counter

# N = int(input()) # 1行, 単数
# arg = list(map(int, input().split())) # 1行, 配列
# D = Counter(arg) # 出現数カウント

# print('Yes')
# print('No')
# print()
N = int(input()) # 1行, 単数
arg = list(map(int, input().split())) # 1行, 配列

A = arg[0]
B = arg[1]
flag = "NG"

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

print(flag)

Submission status: Accepted

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

p = 0
while 1:
    p += k
    if p >= a:
        if p <= b:
            print("OK")
        else:
            print("NG")
        exit()

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

result = 'OK'
if (A%K != 0)&(B%K != 0):
    A = A//K + 1
    B = B//K
    if B-A<0:
        result = 'NG'
        
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
aa = input().split()
aaa = aa[0]
bbb = aa[1]
a = int(aaa)
b = int(bbb)
l = 0
for i in range(a,b+1):
    if i % k == 0:
        print("OK")
        l = 1
        break
    else:
        continue
if l == 1:
    pass
else:
    print("NG")

Submission status: Accepted

Solution code:
k =int(input())

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

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

Submission status: Accepted

Solution code:
p=int(input())
n, k = map(int, input().split())
t=1
p2=0
while p2<k:
  p2=p*t
  if n<=p2 and p2<=k:
    print("OK")
    break
  t+=1
else:
  print("NG")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
def main():
    K = int(input())
    A, B = map(int, input().split())
    answer = ""
    if A % K == 0:
        answer = "OK"
    elif (A//K + 1)*K <= B:
        answer = "OK"
    else:
        answer = "NG"
    print(answer)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
k=int(input())
a,b=map(int, input().split())
if a==b:
  area=[a,b]
else:
  area=[int(i) for i in range(a,b+1)]

for i in area:
  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()]

N = int(A / K)
mod = A % K
target = K * (N+1)

if(target <= B or mod == 0):
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

if (b // k) > (a // k):
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
i = 1
while k*i < a:
  i += 1
if k*i <= b:
  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'

print(ans)

Submission status: Accepted

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

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
i = a
while i <= b:
    if i % k == 0:
        flg = True
        break
    i += 1

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
c=0
d=0
for i in range(a,b+1):
  if i%k==0:
   	c+=1
  else:
    d+=1
if c>=1:
  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 (b//k)*k >=a:
  print("OK")
else:
  print("NG")

Submission status: Accepted

Solution code:
import math
k = int(input())
a,b = map(int,input().split())
to = math.ceil(a/k)
print("OK" if ((k*to) >= a) and ((k*to) <= b) else "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:
#########行列読み込み ##############################################
"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""
##################################################################
#########入力系####################################################
"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""
##################################################################

#########行列読み込み ##############################################
"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""
##################################################################
#########入力系####################################################
"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""
##################################################################
K = int(input())
A,B = map(int,input().split())	
cnt = 0
for i in range(A,B+1):
    if i%K==0:
       cnt +=1
       break
    
if cnt>=1:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
x = int(A / K)
y = int(B / K)
x2 = A % K
y2 = B % K

if y == x and (x2 == 0 or y2 == 0):
    print('OK')
    exit()
if y != x or K == 1:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

canDo = 0
for distance in range(a, b+1):
    if distance % k == 0:
        canDo = 1
        break

print("OK" if canDo else "NG")

Submission status: Accepted

Solution code:
def main():
    K = input()
    AB = input().split()
    A = int(AB[0])
    B = int(AB[1])
    K = int(K)
    count = 0
    for i in range((B // K)+1):
        if K * i >= A:
            print("OK")
            count = 1
            break
    if count == 0:
        print("NG")
    

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
A,B = input().split()
a = int(A)
b = int(B)
x = 0
for y in range(a,b+1):
  if y % k == 0:
    x = x+1
  else:
    x = x
if x == 0:
  print('NG')
else:
  print('OK')

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 = list(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:
#!/usr/bin/env python3
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())

first = A//K
first_a = A%K

if first_a == 0:
    if first*K <= B:
        print('OK')
        exit();
if (first+1)*K <= B:
    print('OK')
    exit();

print('NG')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import numpy as np

K = int(input())
a, b  = map(int, input().split())
array = np.linspace(a,b, (b - a + 1)).astype(int)
if np.any(array % 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(b+1):
    if k * i >= a and k * i <= b:
        flag = True
if flag == True:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

for i in range(l[0], l[1]+2):
    if i == l[1]+1:
        print('NG')
        break
    if i % k == 0:
        print('OK')
        break

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
mes = 0
for num in range (A,B+1):
    if num % K == 0 : mes = 1
    else : pass

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

Submission status: Accepted

Solution code:
K = input()
min_val,max_val=input().split(' ')
if(int(K)==1):
    print('OK')
else:
    list_val=list(range(int(min_val),int(max_val)+1))
    list_val = list(map( lambda x:x%int(K),list_val))
    if (0 in list_val):
        print('OK')
    else:
        print('NG')

Submission status: Accepted

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

kk = k
ok = False
while not ok:
    if kk >= a and kk <= b:
        print("OK")
        ok = True
    if kk > b:
        print("NG")
        ok = True
    kk = kk + k

Submission status: Accepted

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

def amari(x,y):
    if x%y!=0:
        return 1
    else:
        return 0

if (a <= (a//k+amari(a,k))*k)  and ((a//k+amari(a,k))*k <= b):
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

flag=1
while(a<=b):
    if(a%k==0):
        print("OK")
        flag=0
        break
    a+=1
if(flag):
	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('NG')
else:
    print('OK')

Submission status: Accepted

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

Submission status: Accepted

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

while s <= B:
    count += 1
    s = K * count
    if(A <= s and s <= B):
        print('OK')
        break
    elif(s >= B):
        print('NG')
        break
    else:
        pass

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
printn = lambda x: print('\n'.join(x))

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

Submission status: Accepted

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

ans = "NG"

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

print(ans)

Submission status: Accepted

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

x = list(range(A, B+1))

for i in x:
  if i % K == 0:
    print('OK')
    break
  elif i == B:
    print('NG')
  else:
    pass

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#整数の入力
N = int(input())
#スペース区切りの整数の入力
A, B = map(int, input().split())

a = int(A/N)
b = int(B/N)

if(b>a):
  print("OK")
elif(((B%N)==0)or((A%N)==0)):
  print("OK")
elif((b==0)or(a==0)):
  print("NG")
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())

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

Submission status: Accepted

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

Submission status: Accepted

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

k = int(k)
a = int(a)
b = int(b)
ans = 'NG'

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

print(ans)