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

x = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

low, hi = map(int, input().split())

start = a * int(low//a)

boolean = False

while not (start > hi):
  if low <= start <= hi: 
    boolean = True
    break
  start += a

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

Submission status: Accepted

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

print("ONKG"[B%K>B-A::2])

Submission status: Accepted

Solution code:
def main():
    import sys
    read = sys.stdin.buffer.read
    readline = sys.stdin.buffer.readline
    readlines = sys.stdin.buffer.readlines
    sys.setrecursionlimit(10 ** 7)

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

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

Submission status: Accepted

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

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

elif X == 0 :
    print("NG")

else :
    print("OK")

Submission status: Accepted

Solution code:
K,A,B = map(int,open(0).read().split())
a = "NG"

for N in range(A,B+1):
  if N%K==0:
    a = "OK"

print(a)

Submission status: Accepted

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

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

elif C == 0 :
    print("NG")

else :
    print("OK")

Submission status: Accepted

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

ans = 0
ng = 0
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 = list(map(int, input().split()))
if A[1]//K!=A[0]//K or A[1]%K==0 or A[0]%K==0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

min_num = A//K
max_num = B//K

for i in range(min_num, max_num+1):
  if A <= i*K <= B:
    print("OK")
    exit(0)

print("NG")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
k = int(input())
a, b = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import copy

def main():
    K = int(input())
    A, B = map(int, input().split(' '))
    origin = copy.copy(K) 
    
    while K < 1001:
        if K >= A and K <= B:
            print('OK')
            return
        K = K + origin
    print('NG')
main()

Submission status: Accepted

Solution code:
import numpy as np
def cumsum(x):
    return list(np.cumsum(x))

def cumsum_number(N,K,x):
    ans=[0]*(N-K+1)
    number_cumsum = cumsum(x)
    number_cumsum.insert(0,0)
    for i in range(N-K+1):
        ans[i]=number_cumsum[i+K]-number_cumsum[i]
    return ans
"""
int #整数
float #小数

#for
for name in fruits: #fruitの頭から操作
    print(name)

#リスト
list0 = [] #リスト生成
list0 = [1,2,3,4] #初期化
list0 = [0]*10 #[0,0,0,0,0,0,0,0,0,0]
list1= [i for i in range(10)] #>>> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
list1 = list(map(int, input().split()))　# 複数の入力をリストに入れる
number=[int(input()) for i in range(int(input()))] #複数行の入力をリストに
list1 = list1 + [6, 7, 8] #リストの追加
list2.append(34) #リストの追加　最後に（）内が足される
list.insert(3,10) #リストの追加　任意の位置（追加したい位置,追加したい値）
len(list4) #リストの要素数
max(sa) #list saの最小値
list5.count(2) #リスト(文字列も可）内の2の数
list1.sort() #並び替え小さい順
list1.sort(reverse=True)  #並び替え大きい順
set(list1) #list1内の重複している要素を削除し、小さい順に並べる
sum([2,3,   ,3]) #リストの合計

abs(a) #aの絶対値
max(a,b) min(a,b) #最大値　最小値
text1 = text1.replace("34","test") #text1内の"34"を"test"に書き換える(文字列内の文字を入れ替える)

exit(0) #強制終了

cumsum(リスト) #累積和をリストで返す
cumsum_number(N,K,x) #N個の数が含まれるリストx内のK個からなる部分和をリストで返す
"""
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())
ans="NG"
for i in range(A,B+1):
    if  i%K==0:
        ans="OK"
print(ans)

Submission status: Accepted

Solution code:
import sys
import itertools
# import numpy as np
import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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()))
x=A//K
y=B//K+1
empty=0
for i in range(x,y):
    if A<=K*i<=B:
        empty=empty+1
if empty!=0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in list(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")
        exit()
print("NG")

Submission status: Accepted

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

if K>B:
    ans='NG'
elif K>=A:
    ans='OK'
else:
    K=K*(math.ceil(A/K))
    if K>B:
        ans='NG'
    else:
        ans='OK'

print(ans)

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:
k = int(input())
a, b = map(int, input().split())
f = 0
for i in range(a, b+1):
    if i%k == 0:
        f = 1

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

Submission status: Accepted

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

while True:
    if A <= K*i <=B:
        print('OK')
        break
    elif B < K*i:
        print('NG')
        break
    else:
        i += 1

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())
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())
l=list(range(a,b+1))
r=False
for i in l:
  if i%k==0:
    r=True
    break
print("NOGK"[r::2])

Submission status: Accepted

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

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

Submission status: Accepted

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


for x in range(a,b+1):
    if x % 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())
flag=False
for i in range(1000):
  tmp=K*i
  if A<=tmp<=B:
    flag=True
    break
if flag:
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:

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

while True:
  if i * K >= A:
    if i * K <= B:
      print("OK")
      break
    else:
      print("NG")
      break
  i += 1

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = int(input())
lists = list(map(int, input().split()))
if lists[0] % N == 0 or lists[1] % N == 0:
    print("OK")
elif ((lists[0]//N) * N) + N < lists[1]:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

if b//k!=(a-1)//k:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

i=1
while k*i<=b:
  if a<=k*i:
    print('OK')
    exit(0)
  i+=1
print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
ab = [int(x) for x in input().split()]

m = int(ab[1] / k) * k

if ab[0] <= m:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import sys
k = int(input())
a, b = map(int, input().split())
dist = list(range(a, b+1))

for d in dist:
    if d % k == 0:
        print('OK')
        sys.exit()

print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def we_love_golf():
    K = int(input())
    condition = input()
    condition_list = condition.split()
    A = int(condition_list[0])
    B = int(condition_list[1])
    
    for i in range(A, B+1):
        if i % K == 0:
            print('OK')
            return
    
    print('NG')
    return

we_love_golf()

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

Submission status: Accepted

Solution code:
import sys
from collections import deque
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())
def LS(): return list(sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

def Main():
    k = I()
    a,b = IL()
    l = list(range(a,b+1))
    for rep in l:
        if rep%k==0:
            print('OK')
            exit()
    else:
        print('NG')
    return

if __name__=='__main__':
    Main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print('OK' if num >0 else 'NG')

Submission status: Accepted

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

l = K
ans = 'NG'
for l in range(K, 1001, K):
#     print(l)
    if l >= A and l <= B:
        ans = 'OK'
        break
    elif l > B:
        break

print(ans)

Submission status: Accepted

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

l = K
ans = 'NG'
while(l<= 1000):
    if l >= A and l <= B:
        ans = 'OK'
    l += K

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

Submission status: Accepted

Solution code:
def main():

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

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

    return print('NG')


if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
def main():
  k=int(input())
  a,b = map(int,input().split())
  for i in range(1000):
    if(a<=i*k and i*k <= b):
      print("OK")
      return 0
  print("NG") 
  return 0

main()

Submission status: Accepted

Solution code:
import numpy as np
k = int(input())
a, b = map(int, input().split())
dif = np.arange(a, b+1)
dif_num = dif % k
if 0 in dif_num:
    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(1001):
    if a<=k*i<=b:
        print("OK")
        sys.exit()
print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a%k == 0:
    print('OK')
else:
    nearest = a + (k - (a%k))
    if nearest <= b:
        print('OK')
    else:
        print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
largest = (B // K) * K  # B 以下の最大のKの倍数
if A <= largest:
  print("OK")
else:
  print("NG")

Submission status: Accepted

Solution code:

import glob

# 問題ごとのディレクトリのトップからの相対パス
REL_PATH = 'ABC\\165\\A'

# テスト用ファイル置き場のトップ
TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class Solver(Common):

    def resolve(self):


        K = int(self.input_data())
        A, B = map(int,self.input_data().split())

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



solver = Solver(REL_PATH)
solver.exec_resolve()

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
ans='NG'
if b-a-1>=k:
  ans='OK'
else:
  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=0
for n in range(a,b+1):
    if a%k==0:
        flag=1
        break
    else:
        a+=1

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

Submission status: Accepted

Solution code:
import numpy as np

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

driver_list = range(a, b+1, 1)
driver_arr = np.array(driver_list)
solver = driver_arr % k
if 0 in solver:
    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")
else:
  if (a//k)==(b//k):
    print("NG")
  else:
    print("OK")

Submission status: Accepted

Solution code:

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

if __name__=='__main__':
    k = int(input())
    a,b = list(map(int,input().split()))
    main(k,a,b)

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

Solution code:
import math
def fact(n):
    ans = 1
    for i in range(2, n+1):
        ans*= i
    return ans
def comb(n, c):
    return fact(n)//(fact(n-c)*c)

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

Submission status: Accepted

Solution code:

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print("NG" if A%K != 0 and (A//K+1)*K >B else "OK")

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())
line = input().split()
ans = "NG"
for i in range(int(line[0]),int(line[1])+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(1, b // k + 1):
    if a <= k * i <= b:
        print('OK')
        exit()
print('NG')

Submission status: Accepted

Solution code:
def check_baisuu(K, A, B):
  if (A % K == 0) or (B % K == 0):
    return True
  elif (A // K) < (B // K):
    return True
  else:
    return False

K, A, B = map(int, open(0).read().split())
if check_baisuu(K, A, B):
  print("OK")
else:
  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:
      return 'OK'
  return 'NG'

print(main())

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
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())
print('OK' if a <= b // k * k else '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())
f = "NG"

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

print(f)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
n = 1
while True:
    if A <= K*n and K*n <= B:
        print('OK')
        break
    elif K*n > B:
        print('NG')
        break
    n = n + 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def main():
    K=int(sys.stdin.readline().strip())
    A,B=tuple(map(int,sys.stdin.readline().split()))
    x=(A//K)*K
    if A<=x or A<=x+K<=B: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")
        exit()

print("NG")

Submission status: Accepted

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

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

flag = False

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

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

flag = False

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

else:
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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:


def main():
    import sys 
    input=sys.stdin.readline
    
    k=int(input())
    a,b =map(int ,input().split())
    
    for i in range(a,b+1):
        if i%k==0:
            print('OK')
            exit()
        
    print('NG')
    
    
if __name__=='__main__':
    main()