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

MaxKx = B//K*K

if MaxKx >= A :
    print('OK')
else :
    print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

main()

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:
n = int(input())
a, b = map(int, input().split())
i = 0
ans = "NG"
while i <= b:
    if i >= a and i % n == 0:
        ans = "OK"
    i += n

print(ans)

Submission status: Accepted

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

for i in range(1000):
  if a <= k*i <= b:
    print("OK")
    exit()
  elif b < k*i:
    print("NG")
    exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
K = int(input())
A,B = [int(i) for i in input().split()]
hi = range(A,B+1)
for i in hi:
  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(1000):
    C = K * i
    if A <= C and C <= B:
        print('OK')
        exit()
    
print('NG')

Submission status: Accepted

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


def solve(K: int, A: int, B: int):
    n = (A + K - 1) // K
    l = n * K
    if l <= B:
        return "OK"
    return "NG"


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    K = int(next(tokens))  # type: int
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    answer = solve(K, A, B)
    print(answer)


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

Submission status: Accepted

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

count = 0

for i in range(b-a+1):
    if (i+a)%k == 0:
        print("OK")
        count += 1
        break

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

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

Solution code:
k = int(input())
ab = input().split()
a = int(ab[0])
b = int(ab[1])
l = 0
ans = 0

while l < a:
    l += k

while l <= b:
    ans += 1
    l += k

if ans == 0:
    print("NG")
else:
    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'
        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()
print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    ab = [int(_x) for _x in input().split()]
    a = ab[0]
    b = ab[1]
    for i in range(a, b+1):
        if i % k == 0:
            print("OK")
            return
    print("NG")


main()

Submission status: Accepted

Solution code:
K = int(input())
A, B = [int(v) for v 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())
a, b = map(int, input().split(" "))
ngflag = True
while(a <= b):
    if a % k == 0:
        print("OK")
        ngflag = False
        break
    a += 1
if ngflag:
    print("NG")

Submission status: 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())

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

if x :
  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:
  print('OK')
elif a - a % k + k <= b:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

x = (b // k) * k

if a <= x <= 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 b-a >= k:
		print("OK")
		break
	elif i % k == 0:
		print("OK")
		break
	elif (i % k != 0) and (i == b):
		print("NG")
		break

Submission status: Accepted

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

Submission status: Accepted

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

check = False
for i in range(A, B+1):
  if i % K == 0:
    check = True
    
print("OK" if check else "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())
x = 0

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

a, mod_a = divmod(A, K)
b, mod_b = divmod(B, K)

if mod_a == 0 or mod_b == 0:
    print('OK')
    exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

amari =int(B/K)
if A<=K*amari and K*amari<=B:
  print('OK')
else :
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

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
if cnt==0:
  print('NG')
else:
  print('OK')

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#A
K=int(input())
A, B=map(int,input().split())
Ans_list=[]
for i in range(A,B+1):
    if i%K==0:
        Ans_list.append(i)
if len(Ans_list)>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==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'

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

Submission status: Accepted

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

    if B // K * K >= A:
        ans = "OK"
    else:
        ans = "NG"

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=0
K=int(input())
A,B=map(int,input().split())
for i in range(1,1001):
    if A<=K*i<=B:
        a=1
        break
if a==0:
    print('NG')
else:
    print('OK')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b,c=input().split()
b=int(b)
c=int(c)
if b%a==0 or c%a==0:
  print("OK")
else:
  if int(b/a)==int(c/a):
    print("NG")
  else:
    print("OK")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
k = int(input())
a, b = list(map(int, input().split()))
mul = math.floor(b/k) * k

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())
ch=0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
S = input().split()
A = int(S[0])
B = int(S[1])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    K=ii()
    A,B=mi()

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

    print("NG")





if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print('OK' if A<=(B-B%k) else 'NG')

Submission status: Accepted

Solution code:
from sys import stdin
rs = stdin.readline
ri = lambda : int(rs())
ril = lambda : list(map(int, rs().split()))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(int, input().split()))
if b[1]//a - (b[0]-1)//a >= 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')
        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())

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

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

i = 1
ans = "NG"
while k*i <= b:
    if a <= k*i:
        ans = "OK"
        break
    i += 1
print(ans)

Submission status: Accepted

Solution code:
# We Love Golf

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

c = int(b/k) - int((a-1)/k)

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

Submission status: Accepted

Solution code:
n=int(input())
x,y=map(int,input().split())
for i in range(x,y+1):
    if(i%n==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
    break
    
if flag:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

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

if __name__ == '__main__':
    Qa()

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())
flag=0
for i in range(1001):
    if a<=k*i<=b:
        print("OK")
        flag+=1
        break

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

Submission status: Accepted

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

if k == 1:
    print("OK")
else:
    if a % k == 0 or b % k == 0:
        print("OK")

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

        else:
            print("NG")

Submission status: Accepted

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

ans='OK'
if (A-0.1)//K == B//K :
    ans='NG'
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

i = A
while (i % K != 0) and (i <= B):
    i += 1

if i == B+1:
    print("NG")
else:
    print("OK")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x=int(input())
y=input()
z=y.split(" ")
a=int(z[0])
b=int(z[1])
over=0
multiples=[x*d for d in range(1000)]
for c in multiples:
    if(over==0):
        if(c>=a and c<=b):
            print('OK')
            over+=1
if(over==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'

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 = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

    for i in range(1, 1001):
        if A <= K*i <= B:
            print("OK")
            return
    print("NG")

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

if (A-1)//K == B//K:
  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')
  break
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    K = int(input())
    A,B = [int(i) for i in input().split()]
    qA,rA = divmod(A, K)
    qB,rB = divmod(B, K)
    if rA == 0 or rB == 0:
        print("OK")
    elif qB - qA > 0:
        print("OK")
    else:
        print("NG")

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    s = list(map(int,input().strip().split()))

    if s[0] % n == 0 or s[1] % n == 0:
        print("OK")
        return 

    for nn in range(s[0], s[1]):
        if nn % n == 0:
            print("OK")
            return 
    print("NG")
    return

main()

Submission status: Accepted

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

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

if j == 0:
    print("NG")
else:
    print("OK")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A,B = list(map(int,input().split()))
if A <= B - (B % K):
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

#maincode-------------------------------------------------
k = ini()
a,b = inm()
ans = 'NG'
for i in range(1000):
    if a <= i * k <= b:
        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")
    break
else:
  print("NG")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
k = int(input())
a,b = map(int, input().split())
r='NG'
for i in range(a,b+1):
  if i % k == 0:
    r = 'OK'
print(r)

Submission status: Accepted

Solution code:
k = int(input())
a, b = (int(i) for i in 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())
flag = 0
#flagはフラグ関数(Kの倍数が存在したかどうか)
for i in range(A,B+1):
#(A,B)だとA以上B-1以下までを調べてしまうので注意！！
  if i%K == 0:
    flag += 1
    print("OK")
    break
if flag == 0:
  print("NG")

Submission status: Accepted

Solution code:
# We Love Golf
K = int(input())
A, B = map(int, input().split())
if K == 1:
    print('OK')
else:
    print(['NG', 'OK'][(B % K) <= (B - A)])

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

Submission status: Accepted

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

ans="NG"
for i in range(1001):
    if a<=(i*k)<=b :
        ans = "OK"
print(ans)

Submission status: Accepted

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

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

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