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:
#!/usr/bin/env python3

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

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

Submission status: Accepted

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

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())
p = a % k
q = k - p
if (p == 0) or ((a + q) <= b):
    print('OK')
else:
    print('NG')

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

Submission status: Accepted

Solution code:
K = int(input())
x = [int(i) for i in input().split()]
A = x[0]
B = x[1]
if B//K - A//K >= 1 or (A%K == 0) or (B%K==0 ):
    print('OK')
else : print('NG')

Submission status: Accepted

Solution code:
import sys; input = sys.stdin.buffer.readline
from collections import defaultdict
con = 10 ** 9 + 7

def getlist():
	return list(map(int, input().split()))

def main():
	K = int(input())
	A, B = getlist()
	for i in range(1001):
		if A <= K * i and K * i <= B:
			print("OK")
			return

	print("NG")
	


if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
k = int(input())
# スペース区切りの整数の入力
a, b = map(int, input().split())

d = a % k
e = k - d

if (a % k == 0) or ((a + e) <= 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())
a, b = map(int, input().split())

c = 1
result = False

while not result:
  if a <= c*K and c*K <= b:
    result = True
  elif c*K > b:
    break
  c += 1

if result == 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:
    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 i % K == 0:
        print('OK')
        exit()
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

K = ri()
A, B = rl()

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

Submission status: Accepted

Solution code:
k=int(input())
suzi_list=input().split()
a=int(suzi_list[0])
b=int(suzi_list[1])
c=(b//k)*k
if a<=c:
  print('OK\n')
else:
  print('NG\n')

Submission status: Accepted

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

Submission status: Accepted

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

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

if b <= (c//a)*a:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    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 = list(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())
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())
flag = False


for i in range(a,b+1):#range(a,b+1)=[a,a+1,a+2,.....,b]
  if i % k == 0:
    flag=True
      
if flag :
  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):
  if i%K == 0:
    ans = "OK"
    break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=list(map(int,input().split()))
n=k*int(a/k)
p="NG" if n<a and n+k>b else "OK"
print(p)

Submission status: Accepted

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

for num in range(a, b+1):
  if num % 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 = 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())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
k = int(input())
a, b = map(int, input().split())

msg = 'NG'

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

print(msg)

Submission status: Accepted

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

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

while n1 < b:
  if (a <= n1):
    break
  else:
    n1 += n

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

Submission status: Accepted

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

a = int(A/K)
if A <= (a+1)*K <= B or A <= a*K <=B:
    print('OK')
else:
    print('NG')

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

golf(a,b,k)

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

i = int(a/k)
flag = False

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

Submission status: Accepted

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

print('NG')

Submission status: Accepted

Solution code:
from math import *
k=int(input())
a,b =map(int,input().split())
m=0
while a<=b :
    if a%k==0:
        m=1
        break
    a=a+1
if m==1:
    print("OK")
else :
    print("NG")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if A % K == 0:
    print('OK')
else:
    m = A // K
    if (m + 1) * K <= B:
        print('OK')
    else:
        print('NG')

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

def LI(): return list(map(int, stdin.readline().split()))
def LS(): return list(stdin.readline())

k = int(input())
a,b = LI()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

#output
answer = "NG"
for i in range(A, B+1):
    if i % K == 0:
        answer = "OK"
    else:
        continue

print(answer)

Submission status: Accepted

Solution code:
k=int(input())
a,b=[int(i) for i in 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:
from sys import setrecursionlimit, exit
setrecursionlimit(1000000000)

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

main()

Submission status: Accepted

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

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

print('OK' if ans 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())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def solve(K: int, A: int, B: int):
    for s in range(A, B+1):
        if s % K == 0:
            print("OK")
            return
    print("NG")
    return


def main():

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
print('NOGK'[a//k<b//k or a%k<1::2])

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 != 0:
    print("OK")
    
elif c == 0:
    print("NG")

Submission status: Accepted

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

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

if count == 0:
    print('NG')

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


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

div = a / float(k)

import math

if math.ceil(div) * k <= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
def main():
    K = int(input())
    A, B = map(int, input().split())
    div = A // K
    rem = A % K
    if rem == 0:
        flag = True
        print('OK')
    else:
        val = div * K + K
        if val <= B:
            print('OK')
        else:
            print('NG')

if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for _ in range(b-a+1):
    if a%k==0:
        flag = True
        break

    else:
        a += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(1001):
    if A <= K*i <= B:
        print('OK')
        break
    if B<K*i:
        print('NG')
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=input()
a,b=input().split()
c=int(a)
d=int(b)
l=int(k)
e=d-d%l
if e>=c:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

m=A//K*K

if m<A:
  m+=K
if m>=A and m<=B:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
k = int(input())
a,b = map(int,(input().split()))
if b%k == 0:
    kb = b
else:
    kb = int(b / k) * k
if a <= kb:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
C = "NG"
if A%K == 0:
    C = "OK"
else:
    if A//K != B//K:
        C = "OK"

print(C)

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
ls = list()
for i in range(1,b+1):
  if a <= i*k and i*k <= b:
    ls.append(1)
  else:
    ls.append(0)

print('OK' if sum(ls) > 0 else 'NG')

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
flg = 'NG'
cnt = 1
while True:

    if K * cnt > B:
        break
    if A <= K * cnt and K * cnt <= B:
        flg = 'OK'
    cnt += 1
print(flg)

Submission status: Accepted

Solution code:
import sys
import os
import math
import bisect
import collections

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

rb = b % a
if ((a - rb) % a) <= 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:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
k = int(input())
a,b = map(int,(input().split()))
flag = False

for i in range(1,b+1):
    if((k * i >= a) and (k * i <= 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())

while A<=B:
  if A%K == 0:
    print('OK')
    exit()
  A += 1

print('NG')

Submission status: Accepted

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


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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
k = int(input())
a,b = map(int,input().split())
jag = math.floor(b/k)*k # k以下の最大の倍数を算出
if jag >= a:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
from collections import defaultdict

import sys
sys.setrecursionlimit(10**6)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    k=ii()
    a,b=mis()
    x=b//k-(a-1)//k
    print('OK' if x>0 else 'NG')

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(k, a, b):
    return "OK" if ((a // k != b // k) or (a % k == 0)) else "NG"

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

Submission status: Accepted

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

for i in range(1000):
    if K * i > B:
        break
    if K * i >= A and K *i <= B:
        flag = True

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

Submission status: Accepted

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

Submission status: Accepted

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

res = [i for i in range(A,B+1) if i%K==0]

if res == []:
  print('NG')
else:
  print('OK')

Submission status: Accepted

Solution code:
import numpy as np
import math
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())
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 A // K != B // K or A % K == 0 else "NG")

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

res = [i for i in range(A,B+1) if i%K==0]

if res == []:
  print('NG')
else:
  print('OK')

Submission status: Accepted

Solution code:
import sys

k, a, b = map(int, sys.stdin.read().split())

def main():
    ans = 'OK' if (a + k - 1) // k  * k <= b else 'NG'
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys
input = sys.stdin.readline

k = int(input())

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

s = a // k 

if s * k == a:
    print('OK')

elif (s+1) * k <= b:
    print('OK')

else:
    print('NG')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

aa=a-a%k
ans=False
while aa<=b:
    if a<=aa<=b:
        ans=True
        break
    aa+=k
if ans:print("OK")
else:print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

is_ok = False
# A以上B以下の要素xについて
for x in range(A, B + 1):
    # x が K の倍数であれば is_ok = True
    if x % K == 0:
        is_ok = True

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

Submission status: Accepted

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

A_bai = int(A/K)
B_bai = int(B/K)

if A_bai != B_bai:
  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())
if (B-A) >=(B%K):
    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())

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

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:
#abc165a
k=int(input())
a,b=map(int,input().split())
for i in range(1,1001):
 if a<=i*k<=b:
  print('OK')
  exit()
print('NG')

Submission status: Accepted

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

print('OK' if B-B%K>=A else 'NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
k = int(input()) 
a, b = map(int,input().split())
low = a/k
high = b//k
if k == 1:
    print("OK")
elif k*high >= a:
    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

print('OK' if flag 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(0)
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 * K
if x >= A:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
data = input().split()
a = int(data[0])
b = int(data[1])
 
ans = False
 
if abs(a - b) > k:
  ans = True
else:
  for i in range(a, b + 1):
    if i % k == 0:
      ans = True
      break
print("OK" if ans 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(0)
print('NG')

Submission status: Accepted

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


def main() -> None:
    """Entry point
    """
    # 求解処理
    # A以上の最小のKの倍数とBを比較
    min_multiple = K * ((A // K) + (A % K != 0))
    result = ""
    if min_multiple <= B:
        result = "OK"
    else:
        result = "NG"

    # 結果出力
    print(result)


if __name__ == "__main__":
    main()