Problem:


Score: 100 points

Problem Statement

Takahashi the Jumbo will practice golf.

His objective is to get a carry distance that is a multiple of K, while he can only make a carry distance of between A and B (inclusive).

If he can achieve the objective, print OK; if he cannot, print NG.

Constraints

All values in input are integers.

1 \leq A \leq B \leq 1000

1 \leq K \leq 1000

Input

Input is given from Standard Input in the following format:

K
A B

Output

If he can achieve the objective, print OK; if he cannot, print NG.

Sample Input 1

7
500 600

Sample Output 1

OK

Among the multiples of 7, for example, 567 lies between 500 and 600.

Sample Input 2

4
5 7

Sample Output 2

NG

No multiple of 4 lies between 5 and 7.

Sample Input 3

1
11 11

Sample Output 3

OK



Sample input:
7
500 600


Sample output:
OK

Submission status: Accepted

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


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

Submission status: Accepted

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

yn=0
for i in range(A,B+1,1):
    if (i % K) == 0:
        print("OK")
        yn=1
        break
if yn==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(0)
print('NG')

Submission status: Accepted

Solution code:
def solve(string):
    k, a, b = map(int, string.split())
    return "OK" if b - a >= k or min(map(lambda x: x % k, range(a, b + 1))) == 0 else "NG"


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Accepted

Solution code:
K = input()
AB = input()

K = int(K)
AB = [int(i) for i in list(AB.split())]
x = AB[1]/K

if int(x) * K >= AB[0]:
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:
K=int(input())
a,b=map(int,input().split())
print("OK" if b%K<b-a+1 else "OK" if K==1 else "NG")

Submission status: Accepted

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

result = "NG"

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

print(result)

Submission status: Accepted

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

if (a==b and a%k==0):
        flg+=1

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

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
multiple = int(input())

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



if a % multiple == 0 :
    print("OK")
elif math.ceil(a / multiple ) * multiple <= b:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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


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

    print("NG")


lovegolf(a,b,k)

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())
in1 = input().split(" ")
A = int(in1[0])
B = int(in1[1])
val = "NG"
for i in range(A,B+1):
    if i%K==0:
        val = "OK"
print (val)

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")
    flg=1
    break
  else:
    flg=0

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = [int(a) for a in input().split()]
p = (A // K) * K
if (A <= p and p <= B) or (A <= p + K and p + K <= B):
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A, B = [ int(a) for a in 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:
k = int(input())
a,b = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


i = 1
while K * i <= 1000:
  if A <= K * i and K * i <= B:
    print("OK")
    exit()
  else:
    i+=1

print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
A1 = int(A / K)
A2 = int(A % K)
B1 = int(B / K)
# B2 = B % K
if (B1 - A1) >= 1 or A2 == 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:
    if A % K == 0 or B % K == 0:
        print("OK")
    else:
        print("NG")
elif A // K < B // 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:
    count+=1
print("NG" if count==0 else "OK")

Submission status: Accepted

Solution code:
import sys

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


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

Submission status: Accepted

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

# if A==B:
#     if A % K ==0:
#         flag = True
for i in range(A,B+1,1):
    #print(i)
    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())

largest = int(B/K) * K

if largest >= A:
  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:
import sys

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

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

print('NG')

Submission status: Accepted

Solution code:
k,a,b = map(int,open(0).read().split())
print('NOGK'[b%k<=b-a::2])

Submission status: Accepted

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

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

if 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 = list(map(int, input().split()))

ans = "NG"

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

print(ans)

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

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 == B:
    if A % K == 0:
        print('OK')

    elif B % K == 0:
        print('OK')

    else:
        print('NG')

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

    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()
    print('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 (0 in [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 (a+i)%n==0:
    print('OK')
    exit()
print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
K = int(input())
A, B = list(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())
d = K
while d <= B:
    if d >= A:
        print("OK")
        exit()
    d += K
print("NG")

Submission status: Accepted

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

result = 'NG'
for i in range(1000):
  if A <= i*K <=B:
    result = 'OK'
    break
  elif B < i*K:
    break

print(result)

Submission status: Accepted

Solution code:
k = int(input())

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

flag = False

for i in range(1,1000):
    n = i*k
    if n >= a and n <=b:
        flag =True
        break

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

Submission status: Accepted

Solution code:
def can(K,A,B):
    for n in range(1,1001):
        if n*K>=A and n*K<=B:
            return True
    return False

K = int(input())
A, B = map(int, input().split())
print("OK" if can(K,A,B) else "NG")

Submission status: Accepted

Solution code:
import math
K = int(input())
A, B = map(int, input().split())
para = math.floor(B/K) - math.floor(A/K)
if para > 0 or B%K == 0 or A%K == 0:
    print('OK')


else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s,d = map(int,input().split())

c = 0
for i in range(s,d+1):
  if i % n == 0:
  	c = c + 1
  else:
    c = c
    
if c != 0:
 	print("OK")
else:
  	print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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
    else:
        pass
if flg==True:
    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:
        break
if i % k ==0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

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

c = b - a

d = b % k

if c >= d:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:

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

maxbk = (B//K)*K

if maxbk >= A:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:

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

#倍数が何個含まれるかで考える場合
# a = A // K
# b = B // K
# 
# if b-a >= 1 or K == 1:
#     print("OK")
# elif B%K==0 or A%K==0:
#     print("OK")
# else:
#     print("NG")

#B以下の最大のKの倍数がAを超えるかどうかで考える場合
#B以下の最大のkの倍数
maxbk = (B//K)*K

if maxbk >= A:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

a = A // K
b = B // K

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

Submission status: Accepted

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

ans = 'NG'

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

    
print(ans)

Submission status: Accepted

Solution code:
K = int(input())
A, B = [int(x) for x in 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())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

num = a
flag = True

while num <= b:
    if num % k == 0:
        print("OK")
        flag = False
        break
    num = num + 1
    
if flag:
    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())
a,b = map(int,input().split())
res = []
for i in range(a,b+1):
    if i % k == 0:
        res.append(True)
    else:
        res.append(False)
if any(res):
    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:
# AtCoder
K = int(input())
A, B = map(int, input().split())

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

Submission status: Accepted

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

if k == 1:
    print("OK")
else:
    cur = k
    while cur < a:
        cur += k
    
    if a <= cur <= 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 = 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 = 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 = list(map(int, input().split()))
flg = 1
for i in range(A, B+1):
    if i%K == 0:
        print('OK')
        flg = 0
        break
if (flg):
    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())
f=0
for i in range(1,1001):
  if a<=i*k<=b:
    print("OK")
    f=1
    break
if f==0:
  print("NG")

Submission status: Accepted

Solution code:
K = int(input())
[A, B] = list(map(int, input().split()))
for i in range(A, B + 1):
    X = i / K
    Y = i // K
    if X == Y:
        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())

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:
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:
# -*- coding: utf-8 -*-
"""
Spyderエディタ

これは一時的なスクリプトファイルです
"""
k = int(input())
under, upper = map(int, input().split())
ans = 'NG'
for i in range(under, upper + 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:
import itertools
import math
import fractions
import functools
k = int(input())
a, b = map(int, input().split())
count = 0
for i in range(a,b+1):
    if i % k == 0: count += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
K = int(input())
A, B = [int(n) for n in input().split()]

for n in range(A, B+1):
    if n % K == 0:
        print("OK")
        exit()
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==0 or B%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(0, 1000):
    Ki = K * i
    if A <= Ki <= 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")
        exit()

print("NG")

Submission status: Accepted

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


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


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

Submission status: Accepted

Solution code:
root = int(input())
ranges = list(map(int, input().split()))
flag = False

for i in range(ranges[0], ranges[1] + 1):
    if i % root == 0:
        flag = True
        
if flag: 
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
for num in range(k, 1001, k):
    if a <= num <= b:
        print('OK')
        exit()
print('NG')

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

hage = int(input())
hoge = input().split()
 
hoge[0] = int(hoge[0])
hoge[1] = int(hoge[1])

renji = int(hoge[0]) - int(hoge[1])
 
e = hage
 
while e <= hoge[1]:
    if hoge[0] <= e and hoge[1] >= e:
        print("OK")
        break
    e = e + hage
if e > hoge[1] or e < hoge[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:
K = int(input())
A,B = map(int,input().split(" "))
n=0
s='NG'
while(n<=B):
    n+=K
    if A<=n and n<=B:
        s='OK'
print(s)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

k = ni()
a, b = na()
for i in range(1, b//k+2):
    if a <= i*k <= b:
        print('OK')
        exit(0)
print('NG')

Submission status: Accepted

Solution code:
import sys
K = int(input())
A, B = map(int,(input().split()))
i=1
while(K*i<=B):
  if(K*i>=A):
    print("OK")
    sys.exit()
  i+=1
print("NG")

Submission status: Accepted

Solution code:
# A
# We Love Golf

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

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

if flag:
    print("NG")

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
print("OK" if counter > 0 else "NG")

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    k = int(input())
    [a,b] =[int(i) for i in input().split()]
    if a%k == 0 or b >= a + (k - a%k):
        print("OK")
    else:
        print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

c = b - a

res = b % k

if res <= c:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())

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

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

if golf(A,B,K) == 0:
    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
    
    
if flag==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 (b//k+1):
  if a<=(k*i)<=b:
    print("OK")
    flag=True
    break
if flag==False:
  print("NG")

Submission status: Accepted

Solution code:
from sys import stdin

K = int(stdin.readline().rstrip())
A, B = [int(x) for x in stdin.readline().rstrip().split()]
print('OK' if any([i%K==0 for i in range(A, B+1)]) else 'NG')

Submission status: Accepted

Solution code:
#author : dokueki

import sys
INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize)-1
sys.setrecursionlimit(10**7)
mod = 1000000007


def IOE():
    sys.stdin = open("input.txt", "r")
    sys.stdout = open("output.txt", "w")


def main():
    k = int(sys.stdin.readline())
    a, b = map(int, sys.stdin.readline().split())
    for i in range(a, b + 1):
        if i % k == 0:
            print("OK")
            break
    else:
        print("NG")


if __name__ == "__main__":
    try:
        IOE()
    except:
        pass
    main()

Submission status: Accepted

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

Submission status: Accepted

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

amari = b % k

ans = 'NG'
if k <= b:
    if b-a >= amari:
        ans =  'OK'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def is_fly(k,a,b):
  for i in range(a,b+1):
    if(i % k == 0):
      return True
  return False

k = int(input())
a,b = (int(x) for x in input().split())
if(is_fly(k,a,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')
    break
else:
  print('NG')

Submission status: Accepted

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

while True:
    if A == B + 1:
        print('NG')
        break
    if A % K == 0:
        print('OK')
        break
    A += 1

Submission status: Accepted

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

while True:
    if A % K == 0:
        print('OK')
        break
    A += 1
    if A == B + 1:
        print('NG')
        break

Submission status: Accepted

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

res = 0
i = a

while i <= b:
    if i % k == 0:
        res = 1
    i += 1


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

Submission status: Accepted

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

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

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:
def main():
    K = int(input())
    A, B = map(int, input().split())

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3


def main() -> None:
    K = ri()
    A, B = rmi()
    for trial in range(A, B + 1):
        if trial % K == 0:
            w('OK')
            return
    w('NG')


def r() -> str:
    return input().strip()


def ri() -> int:
    return int(r())


def rmi(delim: str = ' ') -> tuple:
    return tuple(map(int, input().split(delim)))


def w(data) -> None:
    print(data)


def wm(*data, delim: str = ' ') -> None:
    print(delim.join(map(str, data)))


if __name__ == '__main__':
    import sys
    sys.setrecursionlimit(10**9)
    main()

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:
import sys
K = int(input())
A, B = map(int, input().split())

for i in range(1000):
  if A <= K*i <= B:
    print('OK')
    sys.exit(0)

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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())
m = 0
for i in range(A, B+1):
  if i%K == 0:
    m = 1
print('OK' if m==1 else 'NG')

Submission status: Accepted

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

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

Submission status: Accepted

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