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())
n = (a + k - 1) // k

if k * n > b:
    print('NG')
else:
    print('OK')

# for i in range(n + 1):
#     if a <= i * k <= b:
#         print('OK')

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
N = int(input())
 
input_line = input()
Line = input_line.split()
Line = [int(s) for s in Line]

for i in range(Line[0],Line[1]+1):
    # print(i)
    if i % N == 0:
        print("OK")
        sys.exit()
print("NG")

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
i=1
num=0
while num<=b:
    num=k*i
    if a<=num<=b:
        print("OK")
        exit()
    i+=1
print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

b = B // K
a = b * K

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = (int(x) for x in input().split())
aq, amod = divmod(A, K)
bq, bmod = divmod(B, K)
if amod == 0:
    print('OK')
elif bmod == 0:
    print('OK')
elif aq < bq:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

x=0
y=0

for i in range(B+1):
  if K*i<=B:
    y+=1

for i in range(y):
  if A<=K*i<=B:
    x+=1
if x>=1:
  print("OK")
else:
  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 or b%k == 0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
k = int(input())
a ,b = map(int,input().split())
l = [num for num in range(a, b+1)]

flag = True
for n in l:
    if n % 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:
I = [input() for i in range(2)]
K = int(I[0])
S = I[1].split()
A = int(S[0])
B = int(S[1])

na = A//K
nb = B//K

la = A%K
lb = B%K

#print(na)
#print(nb)

if na < nb or la == 0 or lb == 0 :
    ans = 'OK'
else:
    ans = 'NG'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
N = int(input())
mi,ma = map(int,input().split())

flag = 0
for i in range(mi,ma+1):
  if(i % N == 0):
    flag = 1
    break
if(flag == 1):
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:
from math import ceil
K = int(input())
A, B = map(int, input().split())
upper = B//K
lower = ceil(A/K)
if upper>=lower:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
mod = A % K
dif = B - A
if mod + dif >= K or mod==0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

tmp = 0
num = 0
res = False
while(tmp < b):
    num += 1
    tmp = k*num
    if tmp==a or tmp==b or a <= tmp <= b:
        res = True
        break

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
  k = int(input())
  a, b = map(int, input().split())
  
  i = 0
  res = 0
  while True:
    i += 1
    if res >= a:
      break
    res = k*i
  
  print("OK" if (res >= a and res <= b) or (a==b and a%k==0) else "NG")
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A , B = (map(int , input().split()))
kk = K
while True:
    if kk >= A and kk <= B:
        ans = 'OK'
        break
    elif  kk > B:
        ans = 'NG'
        break
    else:
        kk = kk+K
print(ans)

Submission status: Accepted

Solution code:
def inputOneLine():
	global S
	S=input()

def inputMaltiLine1():
	global S,N,lines
	N=int(input())
	for i in range(N):
		lines.append(input())

def inputMaltiLine2Numbers():
	global S,N,lines
	N=int(input())
	for i in range(N):
		lines.append(input())


##main#######################################

S=''
N=''
lines=[]

inputOneLine()
n=int(S)
line2=input()
line2s=line2.split(' ')
min=int(line2s[0])
max=int(line2s[1])

#get min
if not((min % n)==0):
	min= min + (n-(min % n))

#get max
if not((max % n)==0):
	max = max - (max % n)

#print(min)
#print(max)
if min <=max :
	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

print("OK" if flag==1 else "NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

lines = sys.stdin.readlines()
a = int(lines[0].strip())
b = lines[1].split()
c = int(b[0])
d = int(b[1])
if (int(d/a)-d/a)*(int(c/a)-c/a) == 0:
    print("OK")
else:
    if (int(d/a)-int(c/a))>=1.0:
        print("OK")
    else:
        print("NG")

Submission status: Accepted

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

flag=False
i=0
num=0
while num<=B:
	num=K*i
	if num>=A and num<=B:
		flag=True
		break
	else:
		i=i+1
      
if flag:
	print("OK")
else:
	print("NG")

Submission status: Accepted

Solution code:
K = int(input())
AB=input().split()
A = int(AB[0])
B=int(AB[1])
bb= int(B/K)
if bb * K >= A:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
list = []
n = range(A,B+1)
ind = range(B-A+1)
for i in n:
    list.append(i)
counter = 0

for i in ind:
    if list[i] % K == 0:
        counter += 1
    else:
        counter += 0
if counter >= 1:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
K = input()
K = int(K)
ab = list(map(int, input().split()))
S = 0

for i in range(1000):
    if ab[0] <= (i + 1) * K and (i + 1) * K <= ab[1]:
        print("OK")
        break
    S += 1
if S == 1000:

    print("NG")

Submission status: Accepted

Solution code:
def solve(n, x, y):
  for i in range(x, y+1):
    if i % n == 0:
      return "OK"

  return "NG"


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

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(k) for k in input().split()]
#template
K = int(input())
A,B = inputlist()
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==1:   
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import math
K = int(input())
A,B = list(map(int,input().split()))
num = 0
while num <=2000:
    num += K
    if num >1000:
        print("NG")
        break
    if num <= B and A <= num:
        print("OK")
        break
    else:
        continue

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    a,b = tuple([int(t)for t in input().split()])

    for i in range(1000):
        t = k*i
        if a<=t and t<=b:
            print("OK")
            return
    print("NG")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

    result = k
    count_bai = 1
    while result < b:
        result = k * count_bai
        if a <= result <= b:
            break
        count_bai += 1

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

resolve()

Submission status: Accepted

Solution code:
k=int(input())
inp=[int(x) for x in input().split()]
a,b=inp[0],inp[1]
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())
ans = "NG"

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

Submission status: Accepted

Solution code:
k = int(input())
[a, b] = [int(i) for i in input().split()]
sum = 0
while sum < b:
    sum += k
    if sum >= a and sum <= b:
        print("OK")
        break
else:
    print("NG")

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

    return print('NG')
    
mun7()

Submission status: Accepted

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

Submission status: Accepted

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

from pprint import pprint as pp
from pprint import pformat as pf

def solve():
    k = int(input())
    a, b = map(int, input().split())
    v = k
    while not (v > b):
        if a <= v <= b:
            print("OK")
            return 0
        v += k
    print("NG")
    return 0


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
k=int(input())
flag=0
ab=list(map(int, input().split()))
i=0
while ab[1]-ab[0]+1-i>0:
  if (ab[0]+i)%k==0:
    flag=1
    print("OK")
    break
  i=i+1
if flag==0:
  print("NG")

Submission status: Accepted

Solution code:
N = int(input())
A=input().split()

s=int(A[0])//N
if int(A[0])%N==0:
    print('OK')
else:
    if (s+1)*N>int(A[1]):
        print('NG')
    else:
        print('OK')

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
i = k
count = 0
while k <= 1000:
    if (k >= a) and (k <= b):
        count += 1
        print('OK')
        exit()
    k += i
if count == 0:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

k = int(input())


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

if k==1:
    print("OK")
elif a%k == 0:
    print("OK")
elif abs(a-b) + a%k >= k:
    print("OK")
# elif a//k != b//k:
#     print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import math

k = int(input())
a, b = (int(x) for x in input().split())
outa = math.floor(a / k)
outb = math.floor(b / k)
if outb == 0:
    print("NG")
elif outa == outb and a != b and outa != a / k:
    print("NG") 
else:
    print("OK")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K=int(input())
A,B=map(int,input().split())
x=A
while x<=B:
  if x%K==0:
    print('OK')
    break
  else:
    x+=1
if x==B+1:
  print('NG')

Submission status: Accepted

Solution code:
check = False
n = int(input())
num = list(map(int, input().split()))
while num[0] <= num[1] and check != True :
    if(num[0]%n==0):
        check=True;
    num[0] += 1
if(check):
    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"
print(ans)

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

Solution code:
K = int(input())
A, B = (int(x) for x in input().split())
if A == B:
  if A%K == 0:
    print("OK")
  else:
    print("NG")
else:
  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())

sa = B - A 
flag = 0

for i in range(sa+1):
	if (A+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())

flg = 0
ans = A

while ans <= B:
    if ans % K ==0:
        flg = 1
        break
    ans = ans +1


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

Submission status: Accepted

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

print(
    "OK" if any([ x % K == 0 for x in range(A, B + 1) ])
    else "NG"
)

Submission status: Accepted

Solution code:
import math

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

flg = False
for i in range(1000):
    x = i * K
    if A <= x and x <= B:
        flg = True

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

Submission status: Accepted

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

k = int(K)
a = int(A)
b = int(B)

p = "NG"
for i in range(1000):
    kk = k * i
    if (kk >= a and kk <= b) or k == 1:
        p = "OK"



print(p)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(1000):
    t = k * i
    if t >= a and b >= t:
        print("OK")
        break
    elif b < t:
        print("NG")
        break
    else:
        pass

Submission status: Accepted

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

boolean = False

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

if(not boolean):
  print("NG")

Submission status: Accepted

Solution code:
import sys

K = int(sys.stdin.readline().strip())
A, B = map(int, sys.stdin.readline().strip().split())
for n in range(A, B+1):
    if n % K == 0:
        print("OK")
        sys.exit()
print("NG")

Submission status: Accepted

Solution code:
k = int(input())
#print(k)
i = list(map(int, input().split()))
#print(i[0])
#print(i[1])
x = 0
for n in range(i[0], i[1]+1):
  if n % k == 0:
    print("OK")
    x = 1
    break
if x == 0:    
  print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())

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

num = b // k

n = num * k
if ((a <= n) and  (k <= n)):
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0

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

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

Submission status: Accepted

Solution code:
tmp = input().split()
K = int(tmp[0])

tmp = input().split()
A = int(tmp[0])
B = int(tmp[1])
flag = 0

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

Submission status: Accepted

Solution code:
# ABC165a


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    # 再帰関数を使わない限りPypyで出すこと

    def dump(*args):
        sys.stderr.write(str(args))

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

K = int(input())

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

L = A // K
M = B // K

if L * K == A or M * K == B :  
    print("OK")

elif A <= (L+1)*K and (L+1) * K <= B:
    print("OK")

else:
    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:
row1 = input()
row2 = input()
k = int(row1)
a = int(row2.split(' ')[0])
b = int(row2.split(' ')[1])
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=0

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

if a>0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 1
while cnt <= 1000:
    if K * cnt >= A and K * cnt <= B:
        print('OK')
        exit()
    cnt += 1
print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

vala = A//N
valb = B//N
if vala != valb or A%N == 0 or B%N == 0:
    print('OK')
elif A == B and N == 1:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

if b % k <= b-a:
    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:
        print('OK')
        cnt += 1
        break

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

Submission status: Accepted

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

c = b // k
d = k*c

if a <= d and d <= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
aim = int(input())
min, max = map(int, input().split(' '))
if (max // aim) - (min // aim) >= 1:
    print('OK')
elif min % aim == 0 or max % aim == 0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
success = False
for i in range(A,B+1):
   if i%K==0:
      success = True
      break

if success:
   print("OK")
else:
   print("NG")

Submission status: Accepted

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


for i in range(1000):
    if B >= i * K >= A:
        print("OK")
        break
    elif i*K > B:
        print("NG")
        break

Submission status: Accepted

Solution code:
import sys
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:
X = int(input())
A,B = map(int, input().split())
F = 0

for i in range(A, B+1, 1):
  if i % X == 0:
    print("OK")
    F =+ 1
    break
if F == 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:
        count += 1
    else:
        continue
if count != 0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = B // K 
ans1 = ans * K

if (ans1 >= A and ans1 <= B):
  print('OK')
else:
  print('NG')

Submission status: Accepted

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


if __name__ == '__main__':
    q1()

Submission status: Accepted

Solution code:
import math
k = int(input())
s, t = [int(i)/k for i in input().split()]

if math.ceil(s) <= math.floor(t):
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


def solve(K: int, A: int, B: int):

    if A % K == 0:
        print("OK")
        return

    a = A // K

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

Submission status: Accepted

Solution code:
def solve(k, a, b):
    for x in range(a, b+1):
        if x % k == 0:
            return "OK"

    return "NG"


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

Submission status: Accepted

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

i = b//a
ans = "NG"
n = a*i
while n <= c:
    if n >= b:
        ans = "OK"
        break
    i +=1
    n = a*i
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin


def get_result(data):
    K = data[0][0]
    A, B = data[1]
    if A % K == 0 or B % K == 0:
        return 'OK'
    else:
        if (A // K) == (B // K):
            return 'NG'
        else:
            return 'OK'


if __name__ == '__main__':
    raw_data = [val.rstrip() for val in stdin.readlines()]
    data = [list(map(int, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)

Submission status: Accepted

Solution code:
import math 
k = int(input())
l = list(map (int, input().strip().split()))
a = l[0]
b = l[1]
if ((b//k) > (a//k)) or (b%k==0 or a%k==0):
    print('OK')
else:
    print("NG")

Submission status: Accepted

Solution code:
N=int(input())
A,B=input().split(' ')
A=int(A)
B=int(B)
for i in range(1000):
  if A<=i*N and i*N<=B:
    print('OK')
    exit(0)
print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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


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

Submission status: Accepted

Solution code:
K = int(input())
i = list(map(int, input().split()))
count =i[0]
for num in range(i[0],i[1]+1):
  if num % K == 0:
    print('OK')
    break;
  else:
    count += 1    
if count > i[1]:
  print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split( ))
Res = int(A)
M = 0
while Res <= B:
    if Res % K == 0:
        print("OK")
        M = 1

        break
    Res += 1

if M == 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
  if i == b:
    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 = c+1
if c >= 1:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

else:
    print("NG")