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:
#import collections
# c = collections.Counter()
#import itertools as it
#import math
#import numpy as np
#import sys 
#sys.exit()
 
#  = input()
k  = int(input())
a, b  = map(int, input().split())
'''
#  = list(map(int, input().split()))
'''
'''
n = input()
a = [int(input()) for i in range(n)]
'''
'''
n,m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(m)]
'''

#-------------------------------#

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

Submission status: Accepted

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

val1=(a-1)//k
val2=b//k

if(val1<val2):
    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
print('OK' if flag==1 else 'NG')

Submission status: Accepted

Solution code:
k = int(input(""))
ab, bc = input("").split()
a = int(ab)
b = int(bc)
present = 0
while a <= b:
    if a % k == 0:
        print("OK")
        present = 1
        break
    a += 1
if present == 0:
    print("NG")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    K = int(input())
    A, B = map(int, input().split())
    OK = False
    for i in range(A,B+1):
        if i%K == 0:
            print("OK")
            OK = True
            break
    if OK == False:
        print("NG")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

res = a/n

count = 0
for i in range(a,b+1):
  if int(res)*n == i or int(res+1)*(n) == i:
    print("OK")
    exit()
  else:
    count += 1

if count == (b-a+1):
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

# K = 1
# A, B = 11, 11

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

a = math.ceil(A/K)
# b = B//K
C = K * (a)

# if K > B:
    # print ("NG")


if C <= B:
    print ("OK")
else:
    print ("NG")

Submission status: Accepted

Solution code:
K = int(input())
input_AB = input().split(' ')
A = int(input_AB[0])
B = int(input_AB[1])
divA = A // K
divB = B // K

if divA != divB:
  print('OK')
elif 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 = False
for i in range(a, b+1):
    if i%k == 0:
        print('OK')
        c = True
        break
if not c:
    print('NG')

Submission status: Accepted

Solution code:
import sys

k = int(input())
i = list(map(int, input().split()))
a = i[0]
b = i[1]
for j in range(a, b + 1):
  if j % k == 0:
    print("OK")
    sys.exit(0)
print("NG")

Submission status: Accepted

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

while True:
    if a <= k *i and b >= k * i :
        print("OK")
        break
    if b < k *i:
        print("NG")
        break
    i+=1

Submission status: Accepted

Solution code:
import math
bai = (int)(input())
min, max = map(int, input().split(" "))
for i in range((math.ceil)(min / bai) * bai, ((int)(max / bai) * bai) + 1):
    print("OK")
    break
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

nk = k

while True:
    if a <= nk <= b:
        print('OK')
        break
    elif b < nk:
        print('NG')
        break
    nk += k

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

Submission status: Accepted

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

i = 0
a = "NG"

while(K * i < B):
  i += 1
  if(A <= K * i and K * i <= B):
    a = "OK"

print(a)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
n,m = map(int,input().split())
if n%k==0:
  a=k
else:
  a = m-n+n%k
if a//k >=1:
  print("OK")
else:
  print("NG")

Submission status: Accepted

Solution code:
k = int(input())

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

count=0

c=b-a

ans=0

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

if 0<ans:
    print('OK')

else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

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

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=[int(_) for _ in input().split()]
s=((a//k)+1)*k
if a%k==0 or s<=b:
    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) <= B - A:
        print("OK")
    else:
        print("NG")

Submission status: Accepted

Solution code:
t = int(input())
a = list(map(int, input().split()))
i = (a[0] // t) - 1
k = t
while k < a[0]:
    k = t * i
    i += 1
if a[0] <= k <= a[1]:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
k = int(input()) 
a = list(map(int, input().split()))
if a[0]%k == 0:
    ans=("OK")
else:
    ans=("OK" if k*((a[0]//k)+1) <= a[1] else "NG")
print(ans)

Submission status: Accepted

Solution code:
k = int(input())
A,B = map(int,input().split())
x = B // k
y = A // k

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

Submission status: Accepted

Solution code:
K = int(input())
N, M = map(int, input().split())

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

for i in range(N, M + 1):
    if (i / K).is_integer():
        print("OK")
        exit()


print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
k = int(input())
nums = [int(e) for e in input().split()]
a = nums[0]
b = nums[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

under = K*math.ceil(A/K)
if(under<= B):
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
k = int(input())
a, b = list(map(int, input().split()))
if a == b:
    if a%k == 0:
        print('OK')
    else:
        print('NG')
    sys.exit()
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=[int(i) for i in input().split(" ")]

if B/K-int(A/K)>=1 or A/K-int(A/K)==0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

num = a / k
one_ = math.ceil(num)
if k == 1:
  print("OK")
else:
  if k * one_ <= b:
    print("OK")
  else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

  print('NG')


if __name__ == "__main__":
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A,B= list(map(int,input().split()))
C=list(range(A,B+1))
i=0
while i<len(C):
  if C[i]%K==0:
    print("OK")
    break
  i+=1
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:
        print("OK")
        flag = True
        break

if flag == False:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a ,b = map(int, input().split())
flag= False
for i in range(a,b+1):
  if i%k is 0:
    flag= True
    break

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

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 main():
    k = int(input())
    a, b = list(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:
k = int(input())
a, b = map(int, input().split())
q = a // k
if q * k == a: 
    ans = 'OK'
elif (q+1) * k >= a and (q+1) * k <= b:
    ans = 'OK'
else:
    ans = 'NG'
print(ans)

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    a, b = eval(input().replace(' ', ','))
    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:
#!python3

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


def main():
    x = ((A - 1) // K + 1) * K
    ans = "OK" if x <= B else "NG"
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k = int(input())
range_num = input().split(" ")
a = int(range_num[0])
b = int(range_num[1])
con1 = 1 <= a and a <= b and b <= 1000
con2 = 1 <= k and k <= 1000
count = 0
if con1 == True and con2 == True:
    b = b + 1
    for i in range (a, b):
        if i % k == 0:
            count = count + 1
        else:
            count = count
    if count > 0:
        print("OK")
    else:
        print("NG")
else:
    print()

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

while A <= B:
    if A % K == 0:
        print("OK")
        break
    elif A == B:
        print("NG")
        break
    else:
        A += 1

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
m = input().split()
a = int(m[0])
b = int(m[1])
 
if b//n - a//n >= 1:
    print('OK')
elif b%n == 0:
    print('OK')
elif a%n == 0:
    print('OK')
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())
    f = 0
    for i in range(a, b + 1):
        if i % k == 0:
            print("OK")
            f = 1
            break

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if cnt > 0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:

K = int(input())
A, B = map(int, input().split(' '))
res = 'NG'
for c in range(A, B + 1):
    if not c % K: res = 'OK'
print(res)

Submission status: Accepted

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

if a % k == 0:
    print('OK')
elif b % k == 0:
    print('OK')
elif (int(a / k) + 1) * k < b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
temp = 0
ans = 'NG'

while temp <= 1000:
    temp += K
    if A <= temp and temp <= B:
        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
  if i == B:
    print("NG")

Submission status: Accepted

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    K=I()
    a,b=MI()
    
    flag=0
    for i in range(a,b+1):
        if i%K==0:
            flag=1
    
    if flag==1:
        print("OK")
    else:
        print("NG")
    
main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = int(input())
line = input().split()
A = int(line[0])
B = int(line[1])
pivot = "NG"
lis = []
for i in range(A,B+1):
    lis.append(i)
    if i % count == 0:
        pivot = "OK"
        print(pivot)
        break
        
if pivot == "NG":
    print("NG")

Submission status: Accepted

Solution code:
import sys;input=lambda:sys.stdin.readline().rstrip();aint=lambda:int(input());ints=lambda:list(map(int,input().split()))
Yes=lambda b:print("Yes"if b else"No");YES=lambda b:print("YES"if b else"NO")

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

c=a//K
d=b//K

if c-d==0 and a/K!=c:
	print("NG")
if a/K==c:
	print("OK")
if c<d:
	print("OK")

Submission status: Accepted

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

while k < a:
    k += n

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a[1]//k != a[0]//k:
  print('OK')
elif a[0]%k == 0:
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:
import math
K = int(input())
A, B = map(int, input().split())
a = math.ceil(A / K)
b = math.floor(B / K)
if b - a >= 0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

x = 0
while x <= 1000:
    if A <= x <= B:
        print("OK")
        break
    x += K
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if isOK:
  print('OK')
else:
  print("NG")

Submission status: Accepted

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

ans = 'NG'

if a % k == 0 or b % k == 0:
    ans = ('OK')

if (a // k) != (b // k) or k==1 :
    ans = ('OK')

print(ans)

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
ans = "NG"
for i in range(a,b+1):
    if not i%k :
        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:
# -*- coding: utf-8 -*-
K = int(input())
A,B = map(int, input().split())
n = 0
for m in range(100):
    if A<=K*m and K*m<=B:
        n += 1
if n > 0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

for i in range(D):
    if A<=K*(i+1) and K*(i+1)<=B:
        E=True
        break
    else:
        pass
if E==False:
    print("NG")
else:
    print("OK")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = input()
K = int(k)
t = input().split()
T =[int(s) for s in t]
a1 = T[0] // K
b1 = T[1] // K
a2 = T[0] % K
if a1 == b1 and a2 != 0:
    print('NG')
else:
    print('OK')

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:
		print('OK')
		f=1
		break
if f==0:
	print('NG')

Submission status: Accepted

Solution code:
K, A, B = [int(_) for _ in open(0).read().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+1 >= k or a % k == 0 or b % k == 0:
    print("OK")
elif a%k > b%k:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

result = False
for i in range(1, 1000):
    if A <= K * i and K * i <= B:
        result = True
        break

    if K * i > B:
        break

if result:
    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 != 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())
ans = 'NG'
j = k
for i in range(1, b + 1):
    if k >= a and k <= b:
        ans = 'OK'
        break
    if k > b:
        break
    k += j
print(ans)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

if(lAB[0] % k == 0):
    print('OK')
elif (lAB[0] // k != lAB[1] // k):
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

x = 0

# rangeは最後を取らない
for i in range(b - a + 1):
    # print(i)
    # print(i, b-a)
    # print("a")
    if a % k == 0:
        x = 1
        break
    # print(x)
    a += 1

# print(x)
if(x == 1):
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

lines = 2
inp = list()

for _ in range(lines):
    inp.append(sys.stdin.readline().strip())


k = int(inp[0])
ab = inp[1].split()
a = int(ab[0])
b = int(ab[1])

na1, na2 = divmod(a, k)
nb1, nb2 = divmod(b, k)

if na1 < nb1 or na2 == 0 or nb2 == 0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

m = b // a
n = m * a
if (b % a == 0):
    print("OK")
elif (n + a <= c):
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import sys
import math

lines = sys.stdin.readlines()
K = int(lines[0])
X = lines[1].split(' ')

A = int(X[0])
B = int(X[1])

n = math.ceil(A/K)-1
m = int(B/K)

if m-n >0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

print "NG"

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 = (int(x) for x in input().split())
ki = k
f=0
while ki <= b:
  if ki >= a and ki <= b:
    print("OK")
    f=1
    break
  ki += k
if f == 0:
  print("NG")

Submission status: Accepted

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

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

    print("NG")


if __name__ == '__main__':
    main()

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

    m = A % k
    
    if m==0:
        print("OK")
    else:
        if (k-m) <= (B-A):
            print("OK")
        else:
            print("NG")
        
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

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

if A == B and A % K == 0:
  print("OK")
  sys.exit()

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())
if a == b and a % k == 0:
    print("OK")
elif 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())
t = (A//k)+1 if A%k != 0 else A//k
s = B//k
print('OK'if t<=s else 'NG')

Submission status: Accepted

Solution code:
a=int(input())
b=input().split()
c = int(b[0]) % a
if c ==0:
    c = a
d = int(b[1]) - int(b[0])
if c + d >= a :
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
K=int(input())
A,B=list(map(int,input().split()))
n=int(A/K)
m=int(B/K)
if K==1:
  print("OK")
elif A/K-n==0.0 or B/K-m==0.0:
  print("OK")
elif m-n>=1:
  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:
    print("OK")
elif (A//K+1)*K <= B:
    print("OK")
else:
    print("NG")