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())
counter=0
for i in range(a,b+1):
    if i%k==0:
        counter+=1
if counter>=1:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

#n = int(input())
#l = list(map(int, input().split()))
'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    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")


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

print(ret)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! env/bin/local python3
# -*- coding:utf-8 -*-

# -- submit ----

# --- fetch input ---
inputs: list = []
while True:
    try:
        inputs.append(input().strip('\n'))
    except EOFError:
        break

# --- write code below ---
k = int(inputs[0])
a, b = [int(i) for i in inputs[1].split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

x = A // K
y = B // K

if x != y:
  print("OK")
elif A % K == 0:
  print("OK")
elif B % K == 0:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

lis = list(range(a,b+1))
ans = [i%k for i in lis]

if 0 in ans:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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
    else:
        pass
    
print('OK' if flg else 'NG')

Submission status: Accepted

Solution code:
import math

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

tmp=0
ans=False
for i in range(1001):
    tmp=i*K
    if tmp >= A and tmp <= B:
        ans=True

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

Submission status: Accepted

Solution code:
K = int(input())

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

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

print('NG')

Submission status: Accepted

Solution code:
import sys
from random import choice,randint
inp=sys.stdin.readline
out=sys.stdout.write
flsh=sys.stdout.flush
 
sys.setrecursionlimit(10**9)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
 
def MI(): return map(int, inp().strip().split())
def LI(): return list(map(int, inp().strip().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]
def LI_(): return [int(x)-1 for x in inp().strip().split()]
def LF(): return [float(x) for x in inp().strip().split()]
def LS(): return inp().strip().split()
def I(): return int(inp().strip())
def F(): return float(inp().strip())
def S(): return inp().strip()
def pf(s): return out(s+'\n')
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

def main():
    k = I()
    a,b=MI()
    for i in range(a,b+1):
        if i%k==0:
            print("OK")
            break
    else:
        print("NG")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k, a, b = map(int, open(0).read().split())
for i in range(b+1):
    if k * i > b:
        print('NG')
        break
    if k * i >= a:
        print('OK')
        break

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:
k = int(input())
a,b = map(int,input().split())
flag = "ng"
for i in range(a,b+1):
    if i % k == 0:
        flag = "ok"
if flag == "ok":
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
K = int(input())
a, b = map(int, input().split())
if a%K == 0:
  print('OK')
elif b//K > a//K:
  print('OK')
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:
        print('OK')
        count += 1
        break
if count == 0:
    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())
c=0
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        c+=1
        break
    else:
        pass
if c==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')
        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 < B // K or A % K == 0 or B % K == 0 else "NG")

Submission status: Accepted

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

a = A//K
if a*K >= A and a*K <= B:
    print("OK")
elif (a+1)*K >= A and (a+1)*K <= B:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    K = I()
    A, B = LI()

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

if __name__ == '__main__':
    resolve()

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(" "))
can = False
for i in range(a,b+1):
  if i % k == 0:
    can = True
if can:
  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')
        break

Submission status: Accepted

Solution code:
k,a,b=map(int,open(0).read().split())
for i in range(1,10000):
  if a<=k*i<=b:
    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:
import sys

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

tmp = A//K

for i in range(1000):
    t = (tmp+i) * K
    if A<= t <= B:
        print('OK')
        sys.exit()
    if t > B:
        break
print('NG')

Submission status: Accepted

Solution code:
n = int(input())
a,b = map(int, input().split())
flg = 0
for i in range(10000):
  if n * i >= a and n * i <= b:
    flg = 1
if flg == 1:
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:
import queue
import copy
import math
from collections import deque
import bisect

# そのまま入力文字列の入力
k = int(input())

# 2つの入力を空白で分割し、数値化
a, b = map(int, input().split())

for x in range(a, b+1):
    d, m = divmod(x, k)

    if m == 0:
        print("OK")
        exit(0)

print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

if math.ceil(A/K)*K <= 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):
    if i % k == 0:
        res = "OK"
        break
print(res)

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

print('NG')

Submission status: Accepted

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

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    K = II()
    A,B = MI()
    ans = 0

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


if __name__ == "__main__":
	main()

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())
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 = list(map(int, input().split()))
 
count = 0
for ele in range(a, b+1):
    if ele % 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())
c = 0
for i in range(a,b+1):
	if i%k == 0:
		c += 1
if c >= 1:
	print('OK')
else:
	print('NG')

Submission status: Accepted

Solution code:
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
    else:
        continue
if flag==True:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

A_w = A // K
A_a = A % K
B_w = B // K 

if A_w == B_w and A_a != 0:
    print("NG")
else:
    print("OK")

Submission status: Accepted

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

tf = False
for k in range(A, B + 1):
    if k % K == 0:
        tf = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    K = int(input())
    A, B = map(int, input().split())
    N = B-A
    frag = 0
    for cycle in range(0,N+1) :
        value = A + cycle
        if value % K == 0 :
            print("OK")
            frag = 1
            break
    if frag == 0 :
        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
        break

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    ab = list(map(int, input().split()))

    c = False
    for i in range(ab[0],ab[1]+1):
        if i % k == 0:
            c = True
            break
    print('OK' if c else 'NG')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K = int(input())


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

if A//K<B//K or 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())
if (B // K * K) >= A: print("OK")
else: print("NG")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6) #再帰関数の上限
import math
from copy import copy, deepcopy
from operator import itemgetter

from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque 
#deque(l), pop(), append(x), popleft(), appendleft(x)
##listでqueの代用をするとO(N)の計算量がかかってしまうので注意
#dequeを使うときはpython3を使う、pypyはダメ
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone

def input(): return sys.stdin.readline()[:-1]
def printl(li): print(*li, sep="\n")
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds

#mod = 10**9+7
#w.sort(key=itemgetter(1),reversed=True)  #二個目の要素で降順並び替え

K = int(input())
A,B = map(int, input().split())
#L = [int(input()) for i in range(N)]
#A = list(map(int, input().split()))
#S = [list(map(int, input().split())) for i in range(N)]


if A%K==0 or B%K==0:
    print('OK')
    exit()

elif A//K<B//K:
    print('OK')
    exit()
print('NG')

Submission status: Accepted

Solution code:
from collections import  *
def io():
    return map(int,input().split())
def op():
    return list(map(int,input().split()))
# for _ in range(int(input())):
k=int(input())
a,b=io()
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 A % K == 0 or B//K != A//K:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import collections
import math
import operator as op
from functools import reduce
from collections import Counter
import numpy as np
import math
import bisect
import heapq

MOD = 1000000007


def get_inputs(cast_func=None):
    if cast_func is None:
        return input().split()
    else:
        return list(map(cast_func, input().split()))


def get_input(cast_func=None):
    if cast_func is None:
        return input()
    else:
        return cast_func(input())


def main():
    K = get_input(int)
    A, B = get_inputs(int)

    mul = K
    while mul <= B:
        if mul >= A and mul <= B:
            print("OK")
            return
        mul += K

    print("NG")


   

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from functools import lru_cache, reduce
from heapq import heapify, heappop, heappush
from itertools import chain, combinations, permutations, product
from typing import List, Dict

# import numpy as np

sys.setrecursionlimit(10**5 + 1)
input = sys.stdin.readline
write = sys.stdout.write


def read_item(cls=int):
    return cls(input())


def read_n_item(cls=int) -> list:
    return [cls(s) for s in input().split()]


def list2d(row, col, init_val=0) -> List[list]:
    return [[init_val] * col for _ in range(row)]


MOD = 10**9 + 7
# MOD = 998244353


k = read_item()
a, b = read_n_item()

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 = [int(x) for x in input().split()]
if a//K == b//K and a % K != 0 and b % K != 0:
    print("NG")
else:
    print("OK")

Submission status: Accepted

Solution code:
import math
k = int(input())
a, b = map(int, input().split())
print('OK' if math.ceil(a/k) <= b/k else '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())
if b - a >= k or a % k == 0 or b % k == 0:
    print('OK')
    exit()
elif a % k <= b % k:
    print('NG')
else:
    print('OK')

Submission status: Accepted

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

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

print(anser)

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')
        break

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
ans = 'NG'
if A % K == 0:
    ans = 'OK'
elif B % K == 0:
    ans = 'OK'
x = A // K
y = B // K
if y > x:
    ans = 'OK'
print(ans)

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

Solution code:
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)

else:
    print("NG")

Submission status: Accepted

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

print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

m = ceil(A/K)-1
if (m+1)*K>B:
    print('NG')
else:
    print('OK')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
#  = input()
k  = int(input())
a, b  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

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

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
	K = int(input())
	A, B = map(int, input().split())
	c = 0
	for i in range(A,B+1):
		if i % K == 0:
			c = 1

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
MOD = 1000000007

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

for i in range(1,1000):
    ans = K*i
    if ans >= A and ans <= B:
        print("OK")
        exit()

print("NG")

Submission status: Accepted

Solution code:
from collections import deque, Counter, defaultdict
from itertools import chain, combinations
import json
# import numpy as np
import bisect
import sys
import math
import bisect
from functools import lru_cache

sys.setrecursionlimit(10 ** 8)

M = 10 ** 9 + 7
INF = 10 ** 17


def main():
    K = int(input())
    A, B = [int(a) for a 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 = 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())

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

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

main()

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 x in range(1001):
    if a<=k*x<=b:print("OK");break
else:print("NG")

Submission status: Accepted

Solution code:
N = int(input())
A, B = map(int, input().split())
hoge = N
while hoge <= B:
    if A <= hoge <= B:
        print("OK")
        exit()
    hoge += N

print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
r = 'NG'
v = a
while True:
	if v % k == 0:
		r = 'OK'
		break
	elif v == b:
		break
	v += 1
print(r)

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
    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:
def main():
    K = int(input())
    A, B = list(map(int, input().split()))
    for i in range(A, B + 1):
        if i % K == 0:
            return True
    return False

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# import numpy as np
# from itertools import *
# from collections import *

# S = input().split()
# N = int(input().split())
# K, N = [int(x) for x in input().split()]

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

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

print('NG')

Submission status: Accepted

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


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

solve()

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%K!=0 and i==B:
        print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = [int(e) for e in input().split()]
if b//k != a//k or 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())
c = [i for i in range(a,b+1)]
ans = 'NG'
for j in c:
    if j%k == 0:
        ans ='OK'
        break
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
num = B // K
if num * K >= 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):
    #print(i)
    if i % k == 0:
        flag = 1

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

Submission status: Accepted

Solution code:
import sys
# sys.stdin = open('input.txt')

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
ans=False
for i in range(999):
    if a<= k*i <= b:
        ans=True
print("OK" if ans==True else "NG")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
d = 0
while d<=b:
  if a <=d:
    print('OK')
    break
  d+= k
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(flg)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def input(): return sys.stdin.readline().rstrip()

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

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

if __name__ == '__main__':
  main()

Submission status: Accepted

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