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:
def main():
    K = int(input())
    A, B = map(int, input().split())
    #import math
    #wari = math.floor(B/K)
    wari = int(B / K)
    if wari * K >= A:
        print("OK")
    else:
        print("NG")


main()

Submission status: Accepted

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


main()

Submission status: Accepted

Solution code:
k = int(input())
(start, end) = map(int, input().split())


for i in range(start, end+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())
buf = True
for i in range(A, B + 1):
  if(i % K == 0):
    print("OK")
    buf = False
    break
if buf:
  print("NG")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
x = int(input())
first, last = map(int, input().split())
i = first // x
while i <= last:
    if(i*x) <= last and (i*x)>=first and (i*x)%x == 0:
        print('OK')
        exit()
    i+=1

print('NG')

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

Submission status: Accepted

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

print("NG")

Submission status: Accepted

Solution code:
import math

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

largest = math.floor((b/k)) * k
if (a <= largest):
  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 = [int(x) for x in input().split()]

yes = False
if A % K == 0 or B % K == 0:
    print("OK")

elif A == B:
    print("NG")


else:

    if int(A/K) == int(B/K):
        print("NG")

    else:
        print("OK")

Submission status: Accepted

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

while N<= B:
    if N<=B and N>= A:
        print('OK')
        exit()
    N += K

print('NG')

Submission status: Accepted

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

wk = (b//k)
if wk*k >=a:
    print('OK')  
else:
    print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import time
startTimeProblem=time.time()

import fileinput, sys, itertools, functools
from math import *
from bisect import *
from heapq import *
from collections import *

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

class InputHelper:
    def __init__(self):
        self.myinput = fileinput.input()

    def isLocal(self):
        return not fileinput.isstdin()

    def int(self):
        return int(self.myinput.readline().rstrip())

    def ints(self):
        return [int(_) for _ in self.myinput.readline().rstrip().split()]

    def str(self):
        return self.myinput.readline().rstrip()

    def strs(self):
        return [_ for _ in self.myinput.readline().rstrip().split()]

class OutputHelper:
    def int(self, a):
        print(a)    

    def ints(self, a):  
        print(" ".join([str(_) for _ in a]))
    
    def intsNL(self, a):
        for _ in a:
            print(_)
    
    def str(self, s):
        print(s)

    def strs(self, s):
        print(" ".join([_ for _ in s]))

    def strsNL(self, s):
        for st in s:
            print(st)

class ListNode:
    def __init__(self, val):
        self.val = val
        self.next = None
        self.prev = None

In = InputHelper()
Out = OutputHelper()

######################################

K = In.int()
A, B = In.ints()

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

if found:
    Out.str("OK")
else:
    Out.str("NG")

        
######################################

if len(sys.argv)>2 and sys.argv[2]=="TIMEIT":
    fin = (time.time()-startTimeProblem)*1000
    print("{:.2f}".format(fin) + "ms")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

amari = b%k
p = b - amari
if a<=p:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
a = A // K
b = B // K
ans = b - a + (A%K == 0)
print(["NG","OK"][ans > 0])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
INF = 2**62-1


def read_int():
    return int(input())


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


def slv(K, A, B):
    for i in range(INF):
        if A <= i*K <= B:
            return 'OK'
        if i * K > B:
            break
    return 'NG'


def main():
    K = read_int()
    A, B = read_int_n()
    print(slv(K, A, B))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

x = a//k
y = b//k

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

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

Submission status: Accepted

Solution code:
import sys

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

if A % K:
    i = (A // K) + 1
    ans = A <= (i * K) <= B
else:
    ans = A <= B

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

Submission status: Accepted

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

ans = "NG"
a = A//K * K
while a <= B:
    if a >= A:
        ans = "OK"
    a += K
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=input().split()
c=int(b[0])
d=int(b[1])
if d-c>=a :
  print('OK')
else :
  for i in range(c,d+1) :
    flag=False
    if i%a==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())

ans = "NG"
a = K
while a <= B:
    if a >= A:
        ans = "OK"
    a += K
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")
        break
else:
    print("NG")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def run():
  N = int(input())
  A, B = map(int, input().split())
  
  if not B<N:
    for i in range(A, B+1):
      if i%N==0:
        print("OK")
        return
      else:
        pass
  print("NG")
  return
    
if __name__ == "__main__":
  run()

Submission status: Accepted

Solution code:
k,a,b=map(int,open(0).read().split())
print("ONKG"[a>b//k*k::2])

Submission status: Accepted

Solution code:
import sys,bisect,string,math,time,functools,random
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
def Golf():*a,=map(int,open(0))
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            a,b,c=(inp+[1])[:3]
            org_inp.append(inp)
        else:
            index=0
            a,b,c=(ls[i]+[1])[:3]
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1):
#h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0}) # sample usage
    mp=[boundary]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)];rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

YN=['YES','NO'];Yn=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
input=lambda: sys.stdin.readline().rstrip()

class Comb:
    def __init__(self,n,mo=10**9+7):
        self.fac=[0]*(n+1)
        self.inv=[1]*(n+1)
        self.fac[0]=1
        self.fact(n)
        for i in range(1,n+1):
            self.fac[i]=i*self.fac[i-1]%mo
            self.inv[n]*=i
            self.inv[n]%=mo
        self.inv[n]=pow(self.inv[n],mo-2,mo)
        for i in range(1,n):
            self.inv[n-i]=self.inv[n-i+1]*(n-i+1)%mo
        return
    
    def fact(self,n):
        return self.fac[n]
        
    def invf(self,n):
        return self.inv[n]

    def comb(self,x,y):
        if y<0 or y>x:
            return 0
        return self.fac[x]*self.inv[x-y]*self.inv[y]%mo

class Tree:
    def __init__(self,inp_size=None,init=True):
        if init:
            self.stdin(inp_size)
        return

    def stdin(self,inp_size=None):
        if inp_size==None:
            self.size=int(input())
        else:
            self.size=inp_size
        self.edges,_=GI(self.size,self.size-1)
        return
    
    def listin(self,ls):
        self.size=len(ls)+1
        self.edges,_=GI(self.size,self.size-1,ls)
        return

    def __str__(self):
        return  str(self.edges)

    def dfs(self,x,func=lambda prv,nx,dist:prv+dist,root_v=0):
        q=deque()
        q.append(x)
        v=[-1]*self.size
        v[x]=root_v
        while q:
            c=q.pop()
            for nb,d in self.edges[c]:
                if v[nb]==-1:
                    q.append(nb)
                    v[nb]=func(v[c],nb,d)
        return v

    def EulerTour(self,x,func=lambda prv,nx,dist:prv+dist,root_v=0):
        q=deque()
        q.append((-1,x))
        v=[None]*self.size
        v[x]=root_v
        et=[]
        while q:
            cb,ce=q.pop()
            et.append(ce)
            for nb,d in self.edges[ce]:
                if v[nb]==None:
                    q.append((nb,ce))
                    q.append((ce,nb))
                    v[nb]=func(v[ce],nb,d)
        vid=[[-1,-1]for i in range(self.size)]
        for i,j in enumerate(et):
            if vid[j][0]==-1:
                vid[j][0]=i
            else:
                vid[j][1]=i
        return v,et,vid
    
    def LCA_init(self,depth,et):
        self.st=SegTree(self.size*2-1,func=min,ide=inf)
        for i,j in enumerate(et):
            self.st.update(i,j)
        self.LCA_init_stat==True
        return
    
    def LCA(self,root,x,y):
        if self.LCA_init_stat==False:
            depth,et,vid=self.EulerTour(root)
            self.LCA_init(depth,et)
        return self.st.query(x,y+1)

show_flg=False
show_flg=True

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

Submission status: Accepted

Solution code:
target = int(input())
range_d = [int(i) for i in input().split()]
min_d = range_d[0]
max_d = range_d[1]

flag = False
if max_d < target:
  print("NG")
else:
  for i in range(min_d,max_d+1):
    if i%target == 0:
      flag = True
      break
  print('OK') if flag else print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

print solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
sh, lg = map(int, input().split())
ans = 'NG'
for i in range(sh, lg+1):
    if i % N == 0:
        ans = 'OK'
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a, b = list(map(int, input().split()))
x = 0
f = False
while x <= b:
    if a <= x <= b:
        f = True
        break
    else:
        x += k

print('OK') if f else print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
# A - We Love Golf
def main():
    K, A, B = map(int, open(0).read().split())
    print("OK" if ((A + K - 1) // K) * K <= B else "NG")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ｋ = int(input())
a,b = map(int,input().split())
n=0
while True:
    n+=k
    if n>=a and n<=b:
        print('OK')
        break
    if n>b:
        print('NG')
        break

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
k=int(input())
a,b=map(int,input().split())
for i in range(1000):
  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())
a, b = A/K, B/K
if a == int(a) or b == int(b) or int(b)-int(a)>=1:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
a=list(map(int,input().split()))
b=k*(a[0]//k)
if b==a[0]:
    print('OK')
elif b+k<=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
        break
        
if flag:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor

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

# 解法1
# answer = 'NG'
# for number in range(A, B + 1):
#     if number % K ==0:
#         answer = 'OK'
#         break

# 解法2
greatest_multiple = floor(B / K) * K
answer = 'OK' if A <= greatest_multiple else 'NG'

print(answer)

Submission status: Accepted

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

for i in range(a, b+1):
    if i % k == 0:
        f = True
if f:
    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:
K = int(input())
A, B = map(int, input().split())

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

Submission status: Accepted

Solution code:
import math
k=int(input())
a,b = map(int, input().split())
ans="NG"

while a <= b:
	if a%k==0:
		ans ="OK"
		a=b+1
	else:
		a=a+1

print(ans)

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())
for i in range(1001):
  s=i*K
  if A<=s and s<=B:
    print("OK")
    break
  if 1000<s:
    print("NG")
    break

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
K=int(input())
A,B=map(int,input().split())
for i in range(1001):
  s=i*K
  if A<=s and s<=B:
    print("OK")
    break
  if 1000<s:
    print("NG")
    break

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

K = ir()
A, B = lr()
left = -(-A//K)
right = B // K
bl = left <= right
print('OK' if bl else 'NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

if ng_flag:
    print('NG')

Submission status: Accepted

Solution code:
k = int(input())

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

mal = 1

while mal*k <= b:
    if a <= mal*k <= b:
        print('OK')
        exit()
    mal+=1

print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

K = int(readline())
A,B = map(int, readline().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:
k = int(input())
a,b = map(int,input().split())
lis = (range(a,b+1))
 
if all(j % k != 0 for j in lis):
    print('NG')
else:
    print('OK')

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
lis = list(range(a,b+1))
 
if all(j % k != 0 for j in lis):
    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(' '))

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

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = list(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
input = sys.stdin.readline
def main():
    K = int(input())
    A, B = map(int, input().split())
    ans = "NG"
    for v in range(A, B+1):
        if v % K == 0:
            ans = "OK"
            break
    print(ans)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

if A >= K:
    tmp = A // K
    if A % K == 0 or B >= ( tmp + 1 ) * K:
        print('OK')
    else:
        print('NG')
else:
    if B // K > 0:
        print('OK')
    else:
        print('NG')

Submission status: Accepted

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

largest_k = k*(b//k)

if largest_k>=a:
	print('OK')
else:
  	print('NG')

Submission status: Accepted

Solution code:
def main():
    from math import floor

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

    multiple = floor(B / K) * K  # B以下の最大のKの倍数
    cond = (A <= multiple)  # A以上なら範囲内にある

    print('OK' if cond else 'NG')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#map(int, input().split())
k = int(input())
a,b = map(int, input().split())
f=0
for i in range(a, b+1):
    if i % k == 0:
        f = 1
        break
if f:
    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:
import sys
K = int(input())
A, B = map(int, input().split())

for i in range(1000):
    s = K * i
    if A <= s <= B:
        print("OK")
        sys.exit()
print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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


if __name__ == "__main__":
    resolve()

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 = [int(i) for i in input().split(' ')]
print('OK') if (a <= b//k*k) else print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
a, b = list(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())
# ans = K
# i = 1

# while True:
#     if(ans >=A and ans<=B): # もし飛距離(Kの倍数)が範囲の中に入っていたら、OK
#         print("OK")
#         break
#     if(ans > B): # 飛距離が上限より大きくなったら、NG
#         print("NG")
#         break
#     ans = K *i
#     i += 1

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
largest = int(B/K) * K
if largest >= A:
  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,a,b=map(int,open(0).read().split());print('ONKG'[b<b%k+a::2])

Submission status: Accepted

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

ans = 'NG'

if a <= int(b/k)*k:
    ans = 'OK'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

lar = B//K * K
if lar >= A:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

cur = a // k * k

def solve():
	global cur
	while cur <= b:
		if cur >= a:
			print("OK")
			return
		cur += k
	print("NG")

solve()

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())
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())
i = (B//K)
if (i*K) < A:
  print("NG")
else:
  print("OK")

Submission status: Accepted

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

if a <= int(b / k) * k: 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:
  ans ='OK'
elif K==1:
  ans = 'OK'
elif a%K==0:
  ans = 'OK'
else:
  ans = 'NG'
print(ans)

Submission status: Accepted

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

largest = (b // k) * k

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

Submission status: Accepted

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

x = 0

while True:
    x += k

    if a <= x <= b:
        print("OK")
        break

    if x > b:
        print("NG")
        break

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

k, a, b = map(int, read().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(). strip())
a, b = map(int,input().split())

if k == 1:
  print('OK')
  exit( )
else:
  pass
  
num = a
for num in range(a,b+1):
    if num % k != 0:
        num += 1
    else:
        print('OK')
        break
else:
	print('NG')