Problem:


Score: 100 points

Problem Statement

Takahashi the Jumbo will practice golf.

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

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

Constraints

All values in input are integers.

1 \leq A \leq B \leq 1000

1 \leq K \leq 1000

Input

Input is given from Standard Input in the following format:

K
A B

Output

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

Sample Input 1

7
500 600

Sample Output 1

OK

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

Sample Input 2

4
5 7

Sample Output 2

NG

No multiple of 4 lies between 5 and 7.

Sample Input 3

1
11 11

Sample Output 3

OK



Sample input:
7
500 600


Sample output:
OK

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

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


num = 0

ok = False

while num <= 1000:
    num += k

    if a <= num <= b:
        ok = True
        break

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

Submission status: Accepted

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

def input_one_number():
    return int(input())

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

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

K = input_one_number()
A,B = input_multiple_number()


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

Submission status: Accepted

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


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

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

Submission status: Accepted

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


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


def main():
    k = ii()
    a,b = mi()

    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:
N=int(input())
A,B=map(int,input().split())
K=B//N
if K*N<A:
  print("NG")
else:
  print("OK")

Submission status: Accepted

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    K=int(readline())
    A,B=map(int,readline().split())
    if A%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())



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

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

Submission status: Accepted

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

for i in range(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=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//k-b//k or a%k==0 else 'NG')

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    k = int(readline())
    a, b = map(int, readline().split())
    for i in range(100000):
        x = k*i
        if (a <= x) and (x<=b):
            print('OK')
            return 
    print('NG')
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mod = 10**9+7
import sys
from collections import Counter, defaultdict, deque
from itertools import product, permutations, combinations
from itertools import accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from math import ceil,floor
from copy import deepcopy
from heapq import heappop,heappush,heapify
import heapq


# l = ['a', 'a', 'a', 'a', 'b', 'c', 'c']
# c = Counter(l)

# d = defaultdict(int)

sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

# リストの要素を改行を挟んで表示する
p2D = lambda x: print(*x, sep="\n")
# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())

def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

# 入力全てを整数に変換したものの配列を受け取る
# def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LI(): return list(map(lambda x:int(x), sys.stdin.readline().split()))
def HI(): return list(map(lambda x:int(x)*(-1), sys.stdin.readline().split()))




k = II()
a,b = MI()
t=None
for i in range(a,min(b+1, a+k+1)):
	if i%k==0:
		t = 1
		print('OK')
		break
		sys.exit()
if t is None:
	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:
n = int(input())
a,b = map(int, input().split(' '))
for i in range(a,b+1):
    if i % n == 0:
        print('OK')
        break
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = [int(i) for i in input().split()]
n = B // K * K
if n >= A:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

if a %n == 0:
  print('OK')
else:
  rem = a % n
  if b >= a + n - rem:
      print('OK')
  else:
      print('NG')

Submission status: Accepted

Solution code:
input = raw_input

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

if b-a >= k:
    out = "OK"
else:
    ak = a % k
    bk = b % k
    if 0 in [ak, bk]:
        out = "OK"
    elif bk < ak:
        out = "OK"
    else:
        out = "NG"

print(out)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())

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

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy

# If you use recursive call, uncomment this code
#sys.setrecursionlimit(10**6)

def main():
    k = int(input())
    a,b = map(int, input().split())
    ans = k*(a//k + (a%k!=0))
    if ans <= b:
        print("OK")
    else:
        print("NG")
        

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
"""
Created on Sat May  2 20:56:46 2020
"""

import sys
#import numpy as np

sys.setrecursionlimit(10 ** 9)
#def input():
#    return sys.stdin.readline()[:-1]
mod = 10**9+7

K = int(input())
A, B = map(int,input().split())
#A = list(map(int,input().split()))
#graph = [[] for _ in range(N+1)]
#for _ in range(N-1):
#    a, b = map(lambda x : int(x)-1, input().split())
#    graph[a].append(b)
#    graph[b].append(a)


ans = 'NG'
if A % K == 0 or B % K == 0:
    ans ='OK'
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())
tmp=0
for i in range(B+1):
    if A<=tmp and tmp<=B:
        print("OK")
        exit()
    tmp+=K

print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
#create date: 2020-05-02 21:10

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    k = ni()
    a, b = na()
    c = a % k

    if a + (k - c) <= b or c == 0:
        print("OK")
    else:
        print("NG")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
ans=0
for i in range(b+1):
  if a<=i*k<=b:
    ans=1
    break
if ans==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()
    else:
        continue
    
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:
a=int(input())
s,e=map(int,input().split())
for i in range(s,e+1):
    if i%a==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:
K = int(input())

A, B = [int(i) for i in 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())

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

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

Submission status: Accepted

Solution code:
def main():
    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')
            break
    else:
        print('NG')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

if A % K == 0 or (A <= (A // K + 1) * K <= B):
    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:
# /usr/bin/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2, log10, pi
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key


INF=1001001001
__MOD__=(10**9)+7
yn = 'YNeos'
judge = False
cnt = 0
ans = None


def lcm(a, b):
    return (a*b) // gcd(a,b)

def intinput():
    return int(input())

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

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __radd__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x + self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x + self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rsub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x - self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x - self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rmul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rtruediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __rpow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(other.__x, self.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(other.__x, self.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")

    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x
    def __str__(self):
        return str(self.__x)



if __name__ == '__main__':
    N = intinput()
    A, B, = mulinputs()

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

Submission status: Accepted

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

isOK = False

for n in range(A, B+1, 1):
    if n % K == 0:
        isOK = True

if isOK:
    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())

if a % k == 0 or b//k != a//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 i % N == 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()
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ret)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
import collections
from collections import deque
from functools import reduce
import heapq
k = int(input())
a, b = map(int, sys.stdin.readline().split())
#s = input()
#a = list(map(int, sys.stdin.readline().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 = 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 = map(int, input().split())
for i in range(1001):
    if a <= k * i <= b:
        print("OK")
        break
else:
    print("NG")

Submission status: Accepted

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

for i in range(A,B+1):
    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(0)
print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def S(): return sys.stdin.readline().rstrip()
def LS(): return sys.stdin.readline().split()
def LS2(N): return [sys.stdin.readline().split() for i in range(N)]
def FILL(i,h): return [i for j in range(h)]
def FILL2(i,h,w): return [FILL(i,w) for j in range(h)]
def FILL3(i,h,w,d): return [FILL2(i,w,d) for j in range(h)]
def FILL4(i,h,w,d,d2): return [FILL3(i,w,d,d2) for j in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)
#'0.01'や'1E1'などで指定、整数に戻すならintをかます
MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**5+10)
input = sys.stdin.readline

K = I()
A,B = MI()
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())  # x = 1, y = 2
s, w = map(int, input().split())  # x = 1, y = 2

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

print('NG')

Submission status: Accepted

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

import sys 

for i in range(1, 1001):
    tmp = i * K
    if A <= tmp <= B:
        print("OK")
        sys.exit(0)
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
if flag:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

if B // K - A // K + int(A % K == 0) > 0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

flag = False
for i in range(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())
S,E = list(map(int, input().split()))
answer = "NG"
for i in range(S, E+1):
    if i % K == 0:
        answer = "OK"
print(answer)

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
ok_flag = False
for i in range(A, B+1):
    if i % K == 0:
        ok_flag = True
        print("OK")
        break
if ok_flag == False:
    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:
from math import factorial as fact
import math
import sys
import itertools
import numpy as np
from collections import Counter
import datetime


#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(range(n),r))



def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets

#公約数の列挙
def ch(x1):
	cf=[]
	for i in range(2,math.sqrt(x1)+1):
		if x1 % i==0:
			cf.append(i)
	return cf

def CountOneRoots(x,y):
	#x:縦，y:横
	return fact(x+y)/fact(x)/fact(y)

# 素因数分解
def factorization(n):
	tmp=n
	count=0
	for i in range(2,int(n**0.5)+2):
		if tmp%i==0:
			cnt=0
			while tmp%i==0:
				cnt+=1
				tmp//=i
			count+=1
	if tmp!=1:
		count+=1

	return count
			




k = input1() 
a,b=input2()
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:
#import math
#def main(S, b):
if __name__ == '__main__':
    #a, b, c, d = map(int, input().split())

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

    # a = list(map(int, input().split()))

    # s = sum(a)

    flug = 1
    for i in range(1000):
        if (k * i >= a and k * i <= b):
            flug = 0
            break
    #print(n * 2 * pi)

    if (flug == 1):
        print("NG")
    else:
        print("OK")

Submission status: Accepted

Solution code:
from sys import exit

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:
#A
N = int(input())
A,B = map(int,input().split())
ans =0

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys
def input():
    return sys.stdin.readline().rstrip('\n')

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


K = int(input())
(A, B) = tuple([int(s) for s in input().split()])
print(calc(K, A, B))

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(1000):
    if (k * i >= a and k * i <= b):
        print("OK")
        sys.exit()
    else:
        pass
print("NG")

Submission status: Accepted

Solution code:
import sys
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
lrs = lambda: [_ for _ in rs().split()]
lri = lambda: [int(_) for _ in rs().split()]
lrf = lambda: [float(_) for _ in rs().split()]

K = ri()
A, B = lri()
ans = 'NG'
for i in range(1, 1000):
    if A <= i * K <= B:
        ans = 'OK'
print(ans)

Submission status: Accepted

Solution code:
# A - We Love Golf

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)