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

Submission status: Accepted

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()

a,b = FLI()

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

print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
left = (A + K - 1) // K
right = B // K
print("OK") if left <= right 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:
K = int(input())
A, B = map(lambda x: int(x), 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:
# coding: utf-8
K = int(input())
A, B = map(int, input().split())
lst = [i % K for i in range(A, B + 1)]
if 0 in lst:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC165 A

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

    res = False

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
k = int(input())
a, b = map(int, input().split())
ans = False
for i in range(a, b + 1):
    if i % k == 0:
        ans = True
print(["NG", "OK"][ans])

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

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

Submission status: Accepted

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

Submission status: Accepted

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

    possible = False

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

    if possible:
        print("OK")
    else:
        print("NG")
if __name__ == "__main__":
    main()

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:
    pass
if(count != 0):
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

ab = [int(x) for x in input().split()]

if ab[1]-(ab[1]%x) >= ab[0]:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

A()

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = "NG"

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
INFI = 10**10
#input = sys.stdin.readline
import math

import itertools
import heapq
#import bisect

import copy
from functools import lru_cache

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]

def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)


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




if __name__ == "__main__":

    main()

Submission status: Accepted

Solution code:

K = int(input())
[A,B] = list(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())
for i in range(A,B+1):
    if i%K==0:
        print("OK");exit()
print("NG")

Submission status: Accepted

Solution code:
# coding: utf-8

def run():
    K = int(input())
    A,B = map(int, input().split())
    if B // K - (A-1) // K >= 1:
        print('OK')
    else:
        print('NG')


if __name__ == "__main__":
    run()

Submission status: Accepted

Solution code:
n = int(input())
a,b = map(int, input().split())
x = a%n
if x == 0 or a+(n-x) <= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
k= int(input())
a, b = map(int, input().split())
p = 0
for i in range(a, b+1):
    if i % k == 0:
        print("OK")
        p = 1
        break
if p == 0:
    print("NG")

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 a//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
  if i==B:
    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:
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

k = ni()
a, b = na()

flag = False
i = a
while i <= b:
    if i % k == 0:
        flag = True
    i += 1

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

Submission status: Accepted

Solution code:
import math
a=int(input())
n,k=map(int,input().split())

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

#items=[int(i) for i in input().split()]

#items=[i for i in range(n+1)]

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:
k=int(input())
a,b=map(int,input().split())
if (a-1)//k<b//k:
  print("OK")
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
        print("OK")
        break
if a!=1:
    print("NG")

Submission status: Accepted

Solution code:
k = int(input())
hoge = input().split()
A,B = int(hoge[0]), int(hoge[1])

ans = 0
huga = 0
for i in range(B):
  ans += k
  if A<=ans and ans <= B:
    huga = 1
    break

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

Submission status: Accepted

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

fl = False

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

if fl:
    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)
        exit()
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if A % K == 0 or B % K == 0:
    print('OK')
elif A // K != B // K:
    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:
    print('OK')
    flag=True
    break
if not flag:
  print('NG')

Submission status: Accepted

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if c == True:
    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:
n = int(input())
a, b = map(int, input().split())

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = 'NG'
i = a
while i <= b:
    if i % k == 0:
        ans = 'OK'
        break
    i += 1


print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if A%N == 0 or B%N == 0 :
    print("OK")
else :
    if ((A//N)+1)*N <= B :
        print("OK")
    else :
        print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A,B = list(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())

count =0

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

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

Submission status: Accepted

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

# initialization
is_ok = False

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

# output
if is_ok:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

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:
n = int(input())
s = list(map(int,input().split()))
if s[0]<=n*int(s[1]/n):
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

print(solve())

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    k = int(input())
    a, b = input_to_int_map()

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

    return "NG"

if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

for n in range(1000):
    if A <= n*K <= B:
        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()
    else:
        i+=1
print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# sys.stdin.readline()
import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
# A - We Love Golf

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

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    a,b = readInts()
    if a % n == 0 or a//n + 1 <= a//n + 1 <= b//n:
        print('OK')
    else:
        print('NG')
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
  
res = "NG"
for i in range(1001):
	if a <= k * i <= b:
		res = "OK"

print(res)

Submission status: Accepted

Solution code:
from math import sqrt,ceil

# map(int,input().split())

n=int(input())

a,b=map(int,input().split())
x=ceil(a/n)*n
if(x<=b):
    print("OK")
else:
    print("NG")

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'
        break
print(answer)

Submission status: Accepted

Solution code:
import sys
from math import sqrt
from collections import Counter, defaultdict, deque

input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)


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


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


def LI():
    return list(MI())


def LIN(n: int):
    return [I() for _ in range(n)]


inf = float("inf")
mod = 10 ** 9 + 7


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

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

    print("NG")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

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

tmp1 = a // k
tmp2 = b // k
amari1 = a % k
amari2 = b % k

if amari1 == 0 or amari2 == 0:
    print('OK')
elif tmp1 != tmp2:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
t=input()
a,b=map(int,raw_input().split())
f=0
for i in range(a,b+1):
    if i%t==0:
        f=1
        break

if f==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())

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

print(flag)

Submission status: Accepted

Solution code:
n = int(input())
a, b = map(int, input().split())
c = list(range(a, b+1))
for i in range(len(c)):
  if c[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")
        exit()
print("NG")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

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

resolve()

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    K = int(input())
    A,B = map(int,input().split())
    l = A//K
    if K*l == A:
        print('OK')
    else:
        if K*(l+1)<=B:
            print('OK')
        else:
            print('NG')
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = list(map(int, input().strip().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:
        ans = "OK"
        break
else:
    ans = "NG"
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(i) for i in input().split()]

flg=True
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        flg=False
        break
if flg:
    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:
import sys,math,copy,queue,itertools,bisect,collections,heapq
sys.setrecursionlimit(10**7)
LI = lambda : [int(x) for x in sys.stdin.readline().split()]
NI = lambda : int(sys.stdin.readline())
INF = 10**18
MOD = 10**9 + 7
DD = ((1,0),(-1,0),(0,1),(0,-1))

K = NI()
A,B = LI()
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(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())

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

print('OK' if ans != 0 else 'NG')