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:
#!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase


def main():
    k=int(input())
    l,r=map(int,input().split())
    l=(l-1)//k+1
    print("OK" if l*k<=r else "NG")

# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
ans = 0
for i in range(1000):
    if a<=k*i<=b:
        ans = 1
if ans == 1:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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**6)
input = sys.stdin.buffer.readline
# arr = [[int(el) for el in input().split()] for i in range(n)]

def cal(a, b, k):
    for i in range(a, b + 1):
        if i % k == 0:
            return True
    return False

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

if cal(a, b, k):
    print ('OK')
else:
    print ('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(K, A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print("NG")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()
k=I()
a,b=MI()
for i in range(a,b+1):
    if i%k==0:
        print("OK")
        sys.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")


if __name__ == "__main__":
    k = int(input())
    a, b = map(int, input().split())

    main(k, a, b)

Submission status: Accepted

Solution code:

K = int(input())

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

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

Submission status: Accepted

Solution code:
from __future__ import print_function

import sys
sys.setrecursionlimit(500000)

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction

import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

# from fractions import gcd
# from math import gcd

# def lcm(n, m):
#     return int(n * m / gcd(n, m))


# def coprimize(p, q):
#     common = gcd(p, q)
#     return (p // common, q // common)


# def find_gcd(list_l):
#     x = reduce(gcd, list_l)
#     return x


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


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

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:
import sys
import math


def main():
    input = sys.stdin.readline
    k = int(input())
    a, b = (int(i) for i in input().split())
    res = False
    for i in range(a, b + 1):
        if i % k == 0:
            res = True

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


main()

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

Solution code:

k = int(input()) 
a,b = [int(s) for s in input().split()]
if a%k==0 or b%k==0 or (b//k)-(a//k)>0:
    print("OK")
else:
    print('NG')

Submission status: Accepted

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

print(m())

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp():
    '''
    一つの整数
    '''
    return int(input())
def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


k = inp()
a, b = inpl()
if a%k==0 or b // k > a // k:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

ans = "NG"

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

print(ans)

Submission status: Accepted

Solution code:
k = int(input())
a, b = [int(x) for x 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:
def main():

    from bisect import bisect_left as bl, bisect_right as br, insort
    import sys,heapq,math
    from collections import defaultdict as dd, deque
    def data(): return sys.stdin.readline().strip()
    def mdata(): return list(map(int, data().split()))
    out = sys.stdout.write
    # sys.setrecursionlimit(100000)
    INF = int(1e9)
    mod = int(1e9)+7

    k=int(data())
    a,b=mdata()
    if k*(b//k)>=a:
        print('OK')
    else:
        print("NG")



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
k = int(input())
a,b= map(int,input().split())
p = 1
for i in range(10000):
    if a <= k * i <= b:
        p = 0
        print('OK')
        break
if p == 1:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = "NG"
K = k
while 1:
    if K >= a and K <= b:
        ans = "OK"
        break
    if K > b:
        break
    K += k
print(ans)

Submission status: Accepted

Solution code:
if __name__ == "__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')

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:
import sys


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

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

    print('NG')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    a, b = map(int, input().split())
    ans = solve(k, a, b)
    print('OK' if ans else 'NG')


def solve(k, a, b):
    for i in range(a, b + 1):
        if not i% k:
            return True
    return False


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

Submission status: Accepted

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

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

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:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

K = int(readline().rstrip())
A, B = map(int, readline().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 = map(int, input().split())

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

    print('NG')
    
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
x=a//k
if a%k==0 or b%k==0:
  print('OK')
elif k*(x+1)>=a and k*(x+1)<=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:
import sys
K = int(input())
a, b = map(int,input().split())

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

print("NG")

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

y = x 
while y <= b:
	if y >= a:
		print("OK")
		exit()

	y += x

print("NG")

Submission status: Accepted

Solution code:
import math

i = int(input())
n, m = map(int, input().split(" "))

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

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
        break

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
m = A//K if A%K!=0 else A//K-1
x = (m+1)*K
if A%K==0:
  print('OK')
elif x<=B:
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:
import sys
K = int(sys.stdin.readline())
A, B = map(int, sys.stdin.readline().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()))

a = A//K
if A%K!=0:
    a+=1
if a*K>=A and a*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')
        break
else: print('NG')

Submission status: Accepted

Solution code:
# coding: utf-8
import re
import math
from collections import defaultdict
import itertools
from copy import deepcopy
import random
from heapq import heappop,heappush
import time
import os
import queue
import sys
import datetime
from functools import lru_cache
#@lru_cache(maxsize=None)
readline=sys.stdin.readline
sys.setrecursionlimit(2000)
#import numpy as np
alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def is_power(a,b):#aはbの累乗数か
    now=b
    while now<a:
        now*=b
    if now==a:return True
    else:return False
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def get_facs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(a,b,c):
    if a:return b
    else:return  c
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n,type_="dict"):
    b = 2
    list_ = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            list_.append(b)
        b+=1
    if n > 1:list_.append(n)
    if type_=="dict":
        dic={}
        for a in list_:
            if a in dic:
                dic[a]+=1
            else:
                dic[a]=1
        return dic
    elif type_=="list":
        return list_
    else:
        return None
def floor_(n,x=1):
    return x*(n//x)
def ceil_(n,x=1):
    return x*((n+x-1)//x)
def hani(x,min_,max_):
    ret=x
    if x<min_:ret=min_
    if x>max_:ret=max_
    return ret
def seifu(x):
    return x//abs(x)
###################################################
def main():
    K=int(input())
    A,B=map(int,input().split())
    #A=list(map(int,input().split()))
    for a in range(A,B+1):
        if a%K==0:
            print("OK")
            return
    print("NG")
main()

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
        break
print('OK' if flg else 'NG')

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# import re
# from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000)
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import networkx as nx
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix
# from scipy.special import comb

# slist = "abcdefghijklmnopqrstuvwxyz"
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")
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))

Submission status: Accepted

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

def solve():
    for i in (range(10000)):
        tmp = k * i
        if (a <= tmp and tmp <= b):
            return True

    return False

if solve():
    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())
flag = 0
for i in range(a, b+1):
    if i % k== 0:
        flag = 1
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 numpy as np
import sys
import math

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 itertools
import math
import string
import collections
from collections import Counter
from collections import deque
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
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())
for a in range(A, B+1):
    if a % K == 0:
        print("OK")
        exit()
    
print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)


def main():
    K = int(input())
    A, B = map(int, input().split())
    if A % K == 0:
        print("OK")
    elif B // K == A // K:
        print("NG")
    else:
        print("OK")


if __name__ == "__main__":
    main()

Submission status: Accepted

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


if __name__ == "__main__":
    k = int(input())
    a, b = map(int, input().split())
    print("OK" if solve(k, a, b) else "NG")

Submission status: Accepted

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

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

MOD = 10**9+7

k= int(input())
a,b = get_nums_l()

print("OK" if a%k==0 or b-a+1 > k or a%k>b%k else "NG")

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

for i in range(min(A,B),max(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()))
M = B//K
print('OK' if K*M >= A else 'NG')

Submission status: Accepted

Solution code:
# coding: utf-8

k = int(input())
a, b = map(int,input().split())
flg = False
for i in range(1001):
    if a<=k*i<=b:
        flg = True
    
if flg:
    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:
k = int(input())
a,b = map(int,input().split())
flag = True
for i in range(a,b+1):
    if i%k == 0:
        flag = False
        break
if flag == True:
    print("NG")
else:
    print("OK")

Submission status: Accepted

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

c = k
while c <= b:
    if a <= c:
        print('OK')
        exit(0)
    c += k
print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


try:
    sys.stdin = open(sys.path[0] + '\\input.txt', 'r')
    sys.stdout = open(sys.path[0] + '\\output.txt', 'w')
except FileNotFoundError:
    pass


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

lower = k * int(a // k)
if lower < a:
    lower += k

if lower <= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

a = A//K
b = B//K
c = A%K
d = B%K

if a == b:
    if c == 0 or d == 0:
        print('OK')
    else:
        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'
print(ans)

Submission status: Accepted

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

ok = 0
while A <= B:
    if A % K == 0:
        print("OK")
        ok = 1
        break
    A += 1

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

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    K = int(input())
    A, B = [int(item) for item in input().split()]

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
from heapq import heappush, heappop
from itertools import permutations, accumulate, combinations
from math import ceil, floor
import numpy as np
from collections import defaultdict, deque,Counter
from operator import itemgetter
from bisect import bisect_left, bisect_right, insort_left, insort_right
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10 ** 6)
# MOD = 10 ** 9 + 7
# INF = float("inf")


def main():
    k = int(input())
    a, b = map(int, input().split())
    flag = False
    for i in range(1000):
        if a <= k * i <= b:
            flag = True
    if flag:
        print("OK")
    else:
        print("NG")


if __name__ == '__main__':
    main()

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

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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())
end=(b//k)+1
flag=0
for i in range(end):
    if (a<=k*i<=b):
        flag=1
print("OK" if (flag==1) 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:
    ans="OK"
    break
else:
  ans="NG"
  
print(ans)

Submission status: Accepted

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

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