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:
    a = True
    break
  else:
    a = False

if 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')
else:
  out = round(A/K+0.5)
  if A <= out*K <= B:
    print('OK')
  else:
    print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
low, high = map(int, input().split())

if (low % K == 0) or (high % K == 0):
  print("OK")
else:
  if ((low // K) + 1) * K <= high:
    print("OK")
  else:
    print("NG")

Submission status: Accepted

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

if b//k - a//k == 0 and a%k != 0:
  print('NG')
else:
  print('OK')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def i():
    return int(input())
def i2():
    return map(int,input().split())
def s():
    return str(input())
def l():
    return list(input())
def intl():
    return list(int(k) for k in input().split())

k=i()
a,b=i2()
for i in range(1000):
	if i*k>=a and i*k<=b:
		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:
k = int(input())
a, b = [int(e) for e in input().split()]
ans='NG'
for i in range(a,b+1):
    if i%k == 0:
        ans='OK'
        break
    else:
        pass
print(ans)

Submission status: Accepted

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

import numpy as np

ab = np.zeros((b-a)+1)

ab[:] = a

for i in range(b-a):
    ab[i+1:] +=1

if (ab % k == 0).sum() > 0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
import sys


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

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

    print('NG')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

import sys

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() )
#print( k, a, b )

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

Submission status: Accepted

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

ans = 'NG'

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def calc(K,a,b):
    # print(K,a,b)
    for i in range(a,b+1):
        # print(i)
        if i % K ==0:
            # res="ok"
            return "OK"
    return "NG"


print(calc(K,a,b))

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
 
s = (B // K) * K
if A <= s: #もし最大のKの倍数がA以上なら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: #Kで割り切れたら
        print("OK")
        break
else: #最後まで割り切れなかったら
    print("NG")

Submission status: Accepted

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

mod_a = A%K
mod_b = B%K
sub = B-A
sub_div = int(sub/K)

if((sub_div >= 1) or (mod_a == 0) or (mod_b == 0)) :
  print("OK")
else :
  if(mod_a > mod_b) :
    print("OK")
  else :
    print("NG")

Submission status: Accepted

Solution code:
from sys import stdin, stdout
rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()

def main():
	k = int(rl())
	a, b = (int(x) for x in rll())
	for x in range(a, b+1):
		if x % k == 0:
			stdout.write("OK");stdout.write("\n")
			return
	stdout.write("NG");stdout.write("\n")
	stdout.close()

if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys

K = int(input())
distance = list(map(int,input().split()))


for i in range(distance[1]-distance[0]+1):
    if (distance[0]+i) % K == 0:
        print("OK")
        sys.exit()

print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

r = False
for d in range(A, B+1):
    if d % K == 0:
        r = True

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
now = K
while now <= 1000:
  if now >= A and now <= B:
    print('OK')
    exit()
  now += K

print('NG')

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
n = 1
result = False
while n * K <= 1000:
 if A <= n * K and n * K <= B:
  result = True
  break

 n += 1

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

if i[0] % K == 0 or (int(i[0] / K) + 1) * K <= i[1]:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    # k,a,b:a以上b以下にkの倍数が含まれるか
    k = int(input())
    a,b = map(int, input().split())

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

main()

Submission status: Accepted

Solution code:
import math

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

if math.floor(b/k) - math.floor(a/k) >= 1 :
    print("OK")
elif a%k == 0 or b%k == 0 :
    print("OK")
elif a<=k and k<=b:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

if C >= 1 and D < 1:
    print("NG")

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

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

Submission status: Accepted

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


def solve(k, a, b):
    result = "NG"
    if a % k == 0 or (b // k > a // k):
        result = 'OK'
    return result


def main():
    k, a, b = input_from_console()
    print(solve(k, a, b))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  # Check if the python interpreter is in debug mode or not.
        check_cases()
    else:
        main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a)

Submission status: Accepted

Solution code:
K = int(input())
nums = [int(e) for e in input().split()]

L = nums[1]//K * K

if nums[0] <= L:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
K = int(input())
nums = [int(e) for e in input().split()]

if nums[0]%K == 0:
    l = nums[0]//K
    m = nums[1]//K
else:
    l = nums[0]//K + 1
    m = nums[1]//K

if l <= m:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
 
l = 0
ret = 'NG'
while l <= B:
  if l >= A:
    ret = 'OK'
  l += K
  
print(ret)

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

Submission status: Accepted

Solution code:
k = int(input())

da = input().split(' ')
ok = False

for i in range(int(da[0]),int(da[1]) + 1):

    if i % k == 0:

        ok = True


if ok:

    print('OK')

else:

    print('NG')

Submission status: Accepted

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

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

fly = K
result = False

while fly <= B:
    if A <= fly <= B:
        result = True
        break
    fly += K

if result is True:
    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:
k=int(input())
a,b=map(int,input().split())
c=int(b/k)
if c*k >= a:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

array = []

for i in range(2):
    val = input()
    array.append(val.split())

K = int(array[0][0])
A = int(array[1][0])
B = int(array[1][1])

compare = math.floor(B / K) * K

if compare >= A:
    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")
    exit()
print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
max = b + 1
n = 0

while a < max:
    if a % k == 0:
        n = 1
        break
    else:
        a += 1

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
import sys


def solve(K: int, A: int, B: int):
    for i in range(K, B + 1, K):
        if A <= i <= B:
            return True
    return False


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

    if solve(K, A, B):
        print('OK')
    else:
        print('NG')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

A = int(A)
B = int(B)

if A % K == 0 or B % K == 0:
	print('OK')
elif math.floor(B / K) - math.floor(A / K) >= 1:
	print('OK')
else:
	print('NG')

Submission status: Accepted

Solution code:
K = int(input())
A, B = list(map(int,input().split()))
ans = 'NG'
for i in range(1,1000):
    if i*K >= A and i*K <= B:
        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: Accepted

Solution code:
import sys


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

Submission status: Accepted

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import math

k = int(input())
a,b = map(int, input().split())
print("OK" if math.floor(b/k) * k >= a else "NG")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

K=int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Input => 7 500 600
# Output OK (or NG)

# K * n + r = A
# 7 * 71 + 3 = 500
# r == 0 or K * (n+1) <= B 

def resolve(K, A, B):
    n, r = divmod(A, K)
    if r == 0 or K * (n+1) <= B:
        return True
    return False

if __name__ == '__main__':

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

    result = resolve(K, A, B)

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

Submission status: Accepted

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

for i in range(b+1):
    if a <= k*i and k*i <=b:
        print("OK")
        sys.exit()
print("NG")

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

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

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

Submission status: Accepted

Solution code:
s_K = input()
s_AB = input().split()
str = "NG"

K = int(s_K)
A = int(s_AB[0])
B = int(s_AB[1])

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

print(str)

Submission status: Accepted

Solution code:
s_K = input()
s_AB = input().split()
str = "NG"

K = int(s_K)
A = int(s_AB[0])
B = int(s_AB[1])

for w in range(A, B+1):
  if(w%K==0):
    str = "OK"

print(str)

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:
x = int(input())
p, q = map(int, input().split())

ok = 0
for i in range(p, q+1):
    if i % x == 0:
        ok += 1
        break
if ok == 1:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

#k=4
#a , b = 5,7

if(a%k):
  x = int(a/k)*k+k
else:
  x = int(a/k)*k

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

Submission status: Accepted

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

result = []
for x in range(a,b+1):
    if x%k == 0:
        result.append(True)
    else:
        result.append(False)
if True in result:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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:
#
#at coder beginner contest165 a we love golf
#
import math

input1 = input()
kbai= int(input1)
 
input2=input().split(" ")
mins= int(input2[0])
maxs= int(input2[1])
flg=0
ans=0
tmp=0

tmp=math.floor(mins/kbai)
ans=tmp*kbai
#print(tmp)

while ans <= maxs:
  if ans >= mins and ans <= maxs:
    flg=1
  ans=ans+kbai

if flg ==1:
  print("OK")
  #print(ans,maxs,mins,flg)
else:
  print("NG")
  #print(ans,maxs,mins,flg)

Submission status: Accepted

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

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

Submission status: Accepted

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

flug = 0

A = list(range(a, b+1))

for number in A:
    if number % k == 0:
        flug = 1
        
    else:
        continue

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

Submission status: Accepted

Solution code:
K=int(input())

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

d = A // K
while 1:
    s = K * d
    if(s >= A and s <= B):
        print('OK')
        break
    elif(s > B):
        print('NG')
        break
    else:
        d += 1

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k,a,b = map(int,open(0).read().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:
#ABC165a
k = float(input())
a, b = map(float, input().split())

un = a/k
up = b/k


if un <= int(up):
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:

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

    if (a / k) <= int(b / k):
        print("OK")
    else:
        print("NG")

if __name__ == '__main__':
    q_a()

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

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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

Submission status: Accepted

Solution code:
K = int(input())
s = input()
A = int(s.split(" ")[0])
B = int(s.split(" ")[1])
i = 1
mul = 1
while mul <= B:
    mul = i * K
    if A <= mul <= B:
        print("OK")
        break
    i = i + 1
else :
    print("NG")

Submission status: Accepted

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

nK = K
n = 1
ans = "NG"
while(nK<=B):
  if nK >= A:
    ans = "OK"
    break
  n += 1
  nK = n * K
print(ans)

Submission status: Accepted

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

for dis in range(A,B+1):
  if dis%K == 0:
    print("OK")
    exit()
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:
import sys

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

for i in range(1, 1001):
    if a <= k*i and k*i <= b:
        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
    
if ans > 0:
  print('OK')
  
else:
  print('NG')

Submission status: Accepted

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

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: 
        print('OK')
        flag = True
        break

if not flag:
    print('NG')

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import math
import bisect
import queue

k = int(stdin.readline().strip())
a, b = map(int, stdin.readline().strip().split())

flag = 0

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

stdout.writelines('OK\n' if flag == 1 else 'NG\n')

Submission status: Accepted

Solution code:
k = int(input())
l, r = map(int, input().split())

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