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:
def Int():
    return int(input())
def Ints():
    return map(int,input().split())
def IntList():
    return list(Ints())
def IntMat(N):
    return [IntList() for i in range(N)]
import sys

K = Int()
A,B = Ints()

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

if __name__ == '__main__':
    print(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:
def main():
    import sys
    sys.setrecursionlimit(10 ** 6)
    input = sys.stdin.readline
    K = int(input())
    A, B = [int(x) for x in input().strip().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())
can = False
for i in range(a, b+1):
    if i % k == 0:
        can = True
print("OK" if can else "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()
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:
def main() -> None:
    K = int(input())
    A, B = map(int, input().split())
    for i in range(A, B+1):
        if i % K == 0:
            print("OK")
            return
    print("NG")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop,heapify
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

k = int(input())
a, b = [int(x) for x in 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

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys

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

    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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())

flag = True

for i in range(a,b+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())


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

Submission status: Accepted

Solution code:
# coding: utf-8


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

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


print(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:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

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

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

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
## dp ##
def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)]
def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in range(d1)]
## math ##
def to_bin(x: int) -> str: return format(x, 'b') # rev => int(res, 2)
def to_oct(x: int) -> str: return format(x, 'o') # rev => int(res, 8)
def to_hex(x: int) -> str: return format(x, 'x') # rev => int(res, 16)
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]
## libs ##
from itertools import accumulate as acc
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left
#======================================================#

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000)

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

if __name__ == "__main__":
    K = int(input())
    A, B = tuple(map(int, input().split(" ")))

    print(solve(K, A, B))

Submission status: Accepted

Solution code:
k=int(input())

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

Submission status: Accepted

Solution code:
FAST_IO = 0
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()
    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())

####

def solve(K, A, B):
    q,r = divmod(A, K)
    q += r> 0
    q *= K
    return A <= q <= B

K = rri()
A, B = rrm()
ans = solve(K, A, B)
print "OK" if ans else "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')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
a,b = map(int,input().split())
flag = 0
for i in range(a,b+1):
    if i%K == 0:
        flag += 1
        print("OK")
        break
if flag == 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')
    break
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:
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:
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate, product
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


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


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def debug(table, *args):
    ret = []
    for name, val in table.items():
        if val in args:
            ret.append('{}: {}'.format(name, val))
    print(' | '.join(ret), file=sys.stderr)


yn = {False: 'No', True: 'Yes'}
YN = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


def main():
    K = I()
    A, B = MI()

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

    print('NG')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

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:
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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    k = I()
    a, b = LI()
    for p in range(a, b+1):
        if p % k == 0:
            print('OK')
            return
    print('NG')

main()

Submission status: Accepted

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

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

else:
  print('NG')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7 # 998244353
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    k = int(input())
    a, b = map(int,input().split())
    for i in range(0, b + 1, k):
        if i >= a:
            print("OK")
            return
    print("NG")
resolve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import collections as cc
I=lambda:list(map(int,input().split()))
k,=I()
n,m=I()
for i in range(n,m+1):
    if i%k==0:
        print('OK')
        sys.exit()
print('NG')

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

k=INT()
a,b=MAP()

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

K = INT()
A, B = MAP()

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

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
flag = 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:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.buffer.readline().split()]
def I(): return int(sys.stdin.buffer.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

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

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

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


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

print("NG")

Submission status: Accepted

Solution code:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    k = ni()
    a, b = nm()

    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 = list(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:
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)
k = int(stdin.readline().rstrip())
a,b = map(int,stdin.readline().rstrip().split())

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

Submission status: Accepted

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

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 i in range(a, b + 1):
    if i % k == 0:
        f = True

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print('NG')

Submission status: Accepted

Solution code:
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  k=I()
  a,b=LI()

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

# main()
print(main())

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

k = I()
a,b = LI()
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())

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

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

Submission status: Accepted

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

def main():
    K = int(readline())
    A, B = map(int, readline().rstrip().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:
from sys import stdin
from sys import setrecursionlimit
from collections import Counter, deque, defaultdict
from bisect import bisect_left
setrecursionlimit(1000000)

INF = int(1e10)
MOD = int(1e9 + 7)

def input():
    return stdin.readline()[:-1]


def main():
    from builtins import int, map
    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")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from functools import lru_cache, reduce
from math import gcd
from operator import add, itemgetter, mul, xor

import numpy as np

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

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


K = int(sys.stdin.buffer.readline())
A, B = list(map(int, sys.stdin.buffer.readline().split()))

ok=False
for a in range(A, B + 1):
    if  a %K== 0:
        ok=True
if ok:
    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:
"""
じょえチャンネルおもしろいよ～～～
https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
"""

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

Submission status: Runtime Error

Solution code:
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """
q=0


for i in range(1,1000):
    if A <= i*K & i*K <= B:
        print("OK")
        q=1
        break

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

Submission status: Runtime Error

Solution code:
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """
q=0


for i in range(1,1000):
    if A <= i*K & i*K <= B:
        print("OK")
        q=1
        break

if q == 1:
    print("NG")

Submission status: Runtime Error

Solution code:
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """


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

num=A
while num <= B:

    if num%K == 0:
        print("OK") 
        exit()
    if num==B:
        print("NG")
        exit()
    num += 1

Submission status: Runtime Error

Solution code:
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """


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

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

Submission status: Runtime Error

Solution code:
K = int(input())
A = int(input())
B = int(input())
""" K=7
A=500
B=600 """


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

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

Submission status: Runtime Error

Solution code:
K = int(input())
A = int(input())
B = int(input())
""" K=1
A=11
B=11  """


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

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

Submission status: Runtime Error

Solution code:
K = int(input())
A = int(input())
B = int(input())
""" K=7
A=500
B=600 """



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

Submission status: Runtime Error

Solution code:
a, b, n =  map(int, input().split())
p = 0
for i in range(1, n+1):
  if p < (a*i)//b - a*(i//b):
    p = (a*i)//b - a*(i//b)
print(p)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
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: Runtime Error

Solution code:
k = int(input)
a,b = [int(x) for x in input().split()]
ans = "NG"
for i in range(1000):
  if a <= i * k and i * k <= b:
    ans = "OK"
    break
print(ans)

Submission status: Runtime Error

Solution code:
ut())
a, b = map(int, input().split(" "))
ngflag = True
while(a <= b):
    if a % k == 0:
        print("OK")
        ngflag = False
        break
    a += 1
if ngflag:
    print("NG")

Submission status: Runtime Error

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

t = a<b

if (t % k !== 0):
	print("NG")
else :
	print("OK")

Submission status: Runtime Error

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

t = 0

a < t < b

if (t % k == 0):
	print("OK")
else :

Submission status: Runtime Error

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

a < t <b

if (t % k =0)
	print("OK")
else 
	print("NG")

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int,input().split())
C = A % K
if B - A >= K - 1:
  print('OK')
elif C == o:
  print('OK')
elif C + B - A >= K:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

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