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:
# -*- coding: utf-8 -*-
import sys
import itertools#これは色々使える組み込み関数みたいなやつ
import fractions
import copy
import bisect
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入力が早いが使える時に使っていこう
from operator import mul
from functools import reduce
from collections import Counter
#from collections import deque

#input = stdin.readline


N=3
M=3
i=0
j=0
k=0
n=3
r=1
a=[0]*5
b=[]
k=int(input())
#r=int(input())
#print(M)
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"
#s=input()
#a=[int(i) for i in s]
#
A,B=map(int, input().split(" "))

for i in range(B-A+1):
    #print(A+i)
    #if 567 % k == 0:
    #    print(123567)
    #    sys.exit()
    if (A+i) % k == 0:
        print("OK")
        sys.exit()

print("NG")
#number_list=list(map(int, input().split(" ")))#数字の時
#print(number_list)
"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#メモ
for i in number_list:#こっちの方がrage使うより早いらしい
    print(number_list[i-1])#

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''
#array=[input().split()for i in range(N)]
#print(type(array[0][0]))
#print(array)
"正方行列にstr型の値を入力"
'''

#brray=[list(map(int, input().split(" ")))for i in range(N)]
#print(type(brray[0][0]))
#print(brray)
'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"
#以下に別解を記載
#N, M = [int(i) for i in input().split()]
'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()
#a=[int(i) for i in s]
#print(a[0])
#print([a])
#単数値．桁ごとに分割したい．入力と出力は以下の通り
#イメージとして1桁ごとにリストに値を入れているかんじ

'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()#str style 何個でもいけることが多い
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''


#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"


#a,b=map(int, input().split())  #int style 複数数値入力　「A B」みたいなスペース空いた入力のとき

#なんかうまく入力されるけど
#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)
#複数行の数値を入力して正方行列を作成


##############################################################################################
##############################################################################################
#under this line explains example calculation

'''
コンビネーションの組み合わせの中身を出力する形式
for i in itertools.combinations(brray, 2)
combinationsをpermutationsにすれば順列になる
今回なら(abc133B)
入力
1 2
5 5
-2 8
出力
[[1, 2], [5, 5], [-2, 8]]
もちろん一次元リストでも使えるし
何よりiもリストのように使えるので便利
'''

#nCr combination
'''
def cmb(n,r):
    #When n < r , this function isn't valid
    r= min(n-r,r)
    #print(n,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    #flochart mul(n,n-1)=x
    #next     mul(x,n-2)........(n-r+1,n-r)
    #mul read a,b and returns a*b

    under = reduce(mul, range(1, r+1))
    #print(over, under)
    #reduce is applied mul(1,2)=2
    #next   mul(2,3)=6
    #next   mul(6,4)=4.........last(r!,r+1)=r+1!

    return over // under
    #// is integer divide
    #calc example 5C2
    #over=5*4*3
    #under=3*2*1
a = cmb(n, r)
#print(a)
'''

'''
#集計
#example
#a=[2,2,2,3,4,3,1,2,1,3,1,2,1,2,2,1,2,1]
#a=Counter(a)
for i in a.most_common(n):print(i)
#most_common()メソッドは、出現回数が多い要素順にCounterオブジェクトを並び替えます。
#引数にint型の数字nを設定した場合は、出現回数が高い上位ｎ個の要素を返します。
#何も設定しなければ、コンテナ型にあるすべての要素を出現回数の順番に並び替えたタプル型オブジェクトを返します。
#out put
#(2, 8)
 #(1, 6)
#(3, 3)
#(4, 1)
'''


#二部探索(binary search)
#A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6]
#print(A)
#index = bisect.bisect_left(A, 5) # 7 最も左(前)の挿入箇所が返ってきている
#A.insert(index, 5)
#print(index)
#print(A)
'''
bisect.bisect_left(a, x, lo=0, h=len(a))
引数
a: ソート済みリスト
x: 挿入したい値
lo: 探索範囲の下限
hi: 探索範囲の上限
(lo, hiはスライスと同様の指定方法)
bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。
'''





########################################################################
########################################################################
#b2=a[:]  #1次元のときはコピーはこれで良い
#print(b2)

#a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
#b3=copy.deepcopy(a)  #2次元配列はこうコピーする
#print(b3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ab = input().split()

a = int(ab[0])
b = int(ab[1])

c = 'NG'
m = n
while True:
	if a <= m <= b:
		c = 'OK'
		break
	if b < m:
		break
	m += n

print(c)

Submission status: Accepted

Solution code:
import numpy as np
import sys

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

list1 = list(np.arange(A,B+1))

for i in list1:
    if i%K==0:
        print("OK")
        sys.exit()    
print("NG")

Submission status: Accepted

Solution code:
# coding: utf-8

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

n = 0
for i in range(int(B)):
    n += int(K)
    if int(A)<=n and n<=int(B):
        print("OK")
        break
    elif int(B)<n:
        print("NG")
        break

Submission status: Accepted

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

if count > 0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
if a + k - a % k <= b or k == 1 or a % k == 0:
    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:
def main():
    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")
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
result = False
if A % K == 0:
    result = True
if B % K == 0:
    result = True
if (A // K) != (B // K):
    result = True

if result:
    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')
else:
  if(k*(a//k +1)<=b):
    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')
		break
else:
	print('NG')

Submission status: Accepted

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

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

print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - We Love Golf
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()))
rem = a%k
if rem > 0 and (k - rem) > (b - a):
	print("NG")
else:
	print("OK")

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:
n = int(input())
a,b = map(int,input().split())

if (b-1)//n > (a+1)//n or a%n==0 or b%n ==0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
x = int(input())
min, max = map(int, input().split())

a=min//x
b=min%x

c=max//x
d=max%x

ans='OK'

if a==c and b!=0:
    ans='NG'

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
ｋ=int(input())
a,b=map(int,input().split())

res=k
i=1
cnt=0
while res <= b:
    if res < a:
        res+=k
    else:
        print("OK")
        sys.exit()

print("NG")

Submission status: Accepted

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

if (b - a >= k) or (b % k < a % k) or (a % k == 0):
  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())
if a // k == b // k and a % k != 0:
    print("NG")
else:
    print("OK")

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:
def solution():
    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')

solution()

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

Submission status: Accepted

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

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())
print("OK" if b // k > (a - 1) // k else "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 = 0
for i in range(A,B+1):
    if i % 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())
find=0
for i in range(A,B+1):
    if (i%K)==0:
        find=1
        break

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=list(map(int,input().split()))
s=0
f=0
while s<=b:
  if s>=a:
    f=1
    break
  s+=k
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")
        exit(0)
print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

tmp = K
for i in range(100000):
    if A <= tmp <= B:
        print("OK")
        break
    else:
        tmp += K
    
    if tmp > B:
        print("NG")
        break

Submission status: Accepted

Solution code:
K = int(input())

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

possible = False

for i in range(A, B + 1):
  # print(i)
  if i % K == 0:
    possible = True

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

Submission status: Accepted

Solution code:
K = input()
A,B = input().split()
K,A,B = int(K),int(A),int(B)
count = "NG"
box = int(A / K)
for i in range(box,A+1):
    if i * K >= A and i * K <= B:
        count = "OK"
        print("OK")
        break
    i += 1
if count == "OK":
    pass
else:
    print("NG")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力の取得
K = int(input())
A,B = list(map(int, input().split()))

# 求解処理
min_value = K * (A // K)
if min_value < A:
    min_value += K
result = ""
if min_value <= B:
    result = "OK"
else:
    result = "NG"

# 結果出力
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from math import floor
k = int(input())
a,b = map(int,input().split())
ok = False
for i in range(a,b+1):
  if (i%k == 0):
    ok = True
if (ok):
  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(x) for x in input().split()]
print("OK" if a % k == 0 or b % k == 0 or a // k != b // k else "NG")

Submission status: Accepted

Solution code:
"""
import random
import functools
import copy
import bisect
import array
import re
import collections
import heapq
import fractions
import itertools
import string
import math
from operator import itemgetter as ig
from bisect import bisect_left, bisect_right, insort_left, insort_right
from itertools import permutations, combinations, product, accumulate, groupby
from heapq import heappush, heappop
from collections import deque, defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 7)
# import numpy as np

inf = 10 ** 20
INF = float("INF")
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]
ddn9 = ddn + [(0, 0)]
'''for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:'''
"""
from collections import defaultdict
import sys
sys.setrecursionlimit(10 ** 7)


def wi(): return list(map(int, sys.stdin.readline().split()))
# WideIntPoint


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


def ws(): return sys.stdin.readline().split()


def si(): return int(sys.stdin.readline())  # SingleInt


def ss(): return input()


def hi(n): return [si() for _ in range(n)]


def hs(n): return [ss() for _ in range(n)]  # HeightString


def s_list(): return list(input())


def mi(n): return [wi() for _ in range(n)]  # MatrixInt


def mip(n): return [wip() for _ in range(n)]


def ms(n): return [ws() for _ in range(n)]


def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[
    0]] for _ in range(n)]  # NumberGrid


def grid(n): return [s_list() for _ in range(n)]


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

# a/b の切り上げ


def round_up(a, b):
    """ a/b の切り上げ """
    c = (a + b - 1) / b
    return c


def lcm(a, b):
    """a,bの最小公倍数"""
    return a * b // gcd(a, b)


def main():
    k = int(input())
    a, b = wi()
    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 = map(int,input().split())

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

Submission status: Accepted

Solution code:
import numpy as np
import math
k=int(input())
a,b=map(int,input().split())

#print((a%k*b%k))

if((b//k-a//k)>=1 or (b%k*a%k)==0):
  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())
print("NG" if (a//k == b//k) and (a%k != 0) else "OK")

Submission status: Accepted

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

Submission status: Accepted

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

if a == b:
    if a % k == 0:
        print("OK")
        exit()
    else:
        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())

a = A/K
b = B/K

a_inte = A//K if A % K == 0 else A//K +1

if a <= a_inte <= b:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
ab=list(map(int, input().split()))
a=ab[0]
b=ab[1]
ak=(a)//k
bk=b//k
if a%k==0:
    print('OK')
elif ak!=bk:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
K=int(input())
A,B=[int(x) for x in input().split()]
d=K
while d<=B:
    if d>=A:
        print('OK')
        exit()
    d+=K
print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    x = 0
    while x <= b:
        x += k
        if a <= x <= b:
            print("OK")
            sys.exit()

    print("NG")

if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

if A // K != B // K:
    print('OK')
else:
    if 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())

number = [int(x) for x in range(A,B+1)]
flag = False
for i in number:
    if i % K == 0 :
        flag = True
        break

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

Submission status: Accepted

Solution code:
n=int(input())
i ,j= list(map(int, input().split()))
x=i//n
y=j//n
ans="NG"
for k in range(x,y+1):
    if k*n<=j and k*n>=i:
        ans="OK"
        break
print(ans)

Submission status: Accepted

Solution code:
num = int(input())
low, high = list(map(int, input().split()))
word="OK"
for i in range(low, high+1):
  if i % num ==0:
    word = "OK"
    break
  else:
    word = "NG"
  
print(word)

Submission status: Accepted

Solution code:
k = int(input())
a, b = [int(i) for i in 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())
o=0
for i in range(a,b+1):
    if i%k==0:
        o=1
        break
print("OK"if o else"NG")

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    K = int(input())
    A, B = map(int, input().split())
    for i in range(A, B+1):
        if i % K == 0:
            return 'OK'
    else:
        return 'NG'

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

Submission status: Accepted

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

n = b // k

if a <= n * k <= b:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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')
        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:
#!/usr/bin/env python
from collections import deque, defaultdict
import bisect
from math import factorial, sqrt

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

    flag = False
    k = K
    i = 1
    while k <= B:
        if k >= A:
            flag = True
            break
        i += 1
        k = K * i

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K = eval(input())
A, B = [eval(v) for v in input().strip().split(" ")]

i = 1
while K * i <= B:
    if K * i >= A:
        print("OK")
        exit(0)
    i += 1

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
		break
if c==1:
	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(1,1000):
  kk=k*i
  if (kk >= a and kk <= b):
    print ('OK')
    sys.exit()
  if (kk > b):
    print ('NG')
    sys.exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
l=[i*k for i in range(1,1001)]
for k in l:
    if a<=k<=b:
        print("OK")
        break
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

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:
K = int(input())
[A,B]= [int(s) for s in input().rstrip().split(' ')]
[a_1,a_2] = [A//K,A%K]
[b_1,b_2] = [B//K,B%K]
if a_1 != b_1:
    print("OK")
else:
    if a_2==0 or b_2==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(A, B+1):
    if i % K == 0:
        result = "OK"
        break

print(result)

Submission status: Accepted

Solution code:
K = int(input())
MIN, MAX = map(int, input().split())

flag = 1

for num in range(MIN, MAX + 1):
    if num % K == 0:
        print("OK")
        flag = 0
        break

if flag == 1:
    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())
num_list = []
for i in range(a,b+1,1):
    num_list.append(i)
for i in num_list:
    flag = False
    if i % k == 0:
        flag = True
        break
    else:
        continue
if flag:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
K = int(input())
i = input()

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

flag = 0

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

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

Submission status: Accepted

Solution code:
# region
import sys

DEBUG = True if (len(sys.argv) > 1 and sys.argv[1] == "DEBUG") else False


def dp(value):
    if DEBUG:
        print(value)
    return


def input_text(split=" "):
    # 入力
    result = []
    while True:
        try:
            row = list(
                map(lambda x: int(x) if x.isdecimal() else x, input().split(split))
            )
            result.append(row)
        except EOFError:
            break
    return result


# endregion
it = input_text()

k = it[0][0]
a = it[1][0]
b = it[1][1]

n = 0
while k * n <= b:
    if a <= k * n <= b:
        print("OK")
        sys.exit()
    n += 1

print("NG")

Submission status: Accepted

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

print(ans)

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- 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
    if i == b:
        print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A,B = list(map(int, input().split()))
num = K
flag = 0
while(flag==0):
  if(A<=num and num<=B):
    flag = 1
    break
  num += K
  if(num>B):
    break
if(flag==0):
  print("NG")
else:
  print("OK")

Submission status: Accepted

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

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

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

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

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=[int(x) for x in input().split()]
if b//k-(a-1)//k>0: 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())

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:
import sys

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

i=1
p = n * i

while p <= B:
  p = n * i
  if p >= A and p <= B:
    print("OK")
    sys.exit(0)
  i = i + 1

print("NG")

Submission status: Accepted

Solution code:
import sys


def solve(K: int, A: int, B: int):

    n = B // K

    if K*n >= A:
        print("OK")
    else:
        print("NG")

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(K, A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b,c=map(int,input().split())
if c-b>=c%a:
  print("OK")
else:
  print("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
    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(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())

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = (int(i) for i in input().split())
if a%k !=0:
	if not a-a%k+k<=b:
		print("NG")
	else:
		print("OK")
else:
	print("OK")

Submission status: Accepted

Solution code:
k=int(input())
ans="NG"
a,b=map(int,input().split())
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')
        exit()

print('NG')

Submission status: Accepted

Solution code:
base=int(input())
(mn, mx)=[int(x) for x in input().split()]
c=1
f=0
while base*c <= mx:
  if base*c >= mn:
    print("OK")
    f=1
    break
  c+=1
if f==0:
  print("NG")