Problem:


Score: 100 points

Problem Statement

Takahashi the Jumbo will practice golf.

His objective is to get a carry distance that is a multiple of K, while he can only make a carry distance of between A and B (inclusive).

If he can achieve the objective, print OK; if he cannot, print NG.

Constraints

All values in input are integers.

1 \leq A \leq B \leq 1000

1 \leq K \leq 1000

Input

Input is given from Standard Input in the following format:

K
A B

Output

If he can achieve the objective, print OK; if he cannot, print NG.

Sample Input 1

7
500 600

Sample Output 1

OK

Among the multiples of 7, for example, 567 lies between 500 and 600.

Sample Input 2

4
5 7

Sample Output 2

NG

No multiple of 4 lies between 5 and 7.

Sample Input 3

1
11 11

Sample Output 3

OK



Sample input:
7
500 600


Sample output:
OK

Submission status: Accepted

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


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

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    K = int(input())
    A, B = map(int, input().split())
    ans = 'NG'
    for i in range(A,B+1):
        if i%K==0:
            ans  ='OK'
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(A, B+1):
    if i % N == 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
    elif i == b:
        print("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')
            exit()

    print('NG')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

ans = b//k - (a - 1)//k
print('OK' if ans > 0 else 'NG')

Submission status: Accepted

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


def solve(K: int, A: int, B: int):
    for i in range(A, B+1):
        if i % K == 0:
            print("OK")
            exit()
    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:
import sys
sys.setrecursionlimit(10000000)


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K=int(input())
A,B=[int(x) for x in input().rstrip().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())
ans=0
for i in range(a,b+1):
  if i%k==0:
    ans=1
  else:pass
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):
    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:
    continue
  else:
    ans = True
if ans:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

Solution code:

import heapq
from collections import defaultdict, deque
from math import ceil, factorial, gcd
from itertools import accumulate, permutations
import sys
import bisect

sys.setrecursionlimit(10 ** 7)
INF = float("inf")
MOD = 10 ** 9 + 7

si = lambda: input().strip()
ii = lambda: int(input())
mii = lambda: map(int, input().split())
msi = lambda: map(str, input().split())
lmii = lambda: list(map(int, input().split()))
lmsi = lambda: list(map(str, input().split()))
smii = lambda: sorted(map(int, input().split()))

# ----------

k = ii()
a, b = mii()

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

print('NG')

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def lcm(x, y) : return (x * y) // math.gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")
def YesNo(B) : print("Yes" if B else "No")
def YESNO(B) : print("YES" if B else "NO")

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
#import sympy as syp(素因数分解とか)
Mod = 1000000007
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)

def main():  #startline-------------------------------------------
    k = int(input())
    a, b = list(map(int, input().split()))
    ans = 0
    for i in range(a, b + 1):
        if i % k == 0:
            ans = 1
    print("OK" if ans else "NG")
if __name__ == "__main__":
    main() #endline===============================================

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


if __name__ == "__main__":
    resolve()

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:
## coding: UTF-8

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

ans = 'NG'
for i in range(A,B+1):
    #print(i)
    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')
        quit()

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

ok = False
for i in range(a, b+1, 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:
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:
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 K * (B // K) >= A:
    print('OK')
else:
    print('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
    else:
        print("NG")

if __name__=="__main__":
    main()

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 i % K == 0:
        ans = "OK"
        break
print(ans)

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

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.buffer.readline

from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict
from itertools import combinations, permutations
from itertools import accumulate
from math import ceil, sqrt, pi

MOD = 10 ** 9 + 7
INF = 10 ** 18

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# s = input()
k = int(input())
a,b = map(int, input().split())
# a = 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:
k = int(input())
a, b = list(map(int, input().split()))

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

Submission status: Accepted

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

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 = [int(i) for i in input().split()]
if A//K != B//K or A%K == 0 or B%K == 0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

num = A
while num <= B:
    if num % K == 0:
        print("OK")
        break
    num += 1
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:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
cond = 0
i = 0
while K * i <= B:
    if K * i >= A:
        cond = 1
        break
    i += 1

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

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

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

print('OK' if B//K > (A-1)//K else 'NG')

Submission status: Accepted

Solution code:
import sys
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")
        sys.exit()
print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

check(K, A, B)

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:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

if(B//K-(A-1)//K>0):
  print("OK")
else:
  print("NG")

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
ans = 0
for i in range(1000):
    ans += k
    if a<=ans<=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()
print('NG')

"""B問題"""

Submission status: Accepted

Solution code:
# coding:utf-8
k = int(input())
a, b = map(int, input().split())

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

print('NG')

Submission status: Accepted

Solution code:
k = int(input())
a, b =  list(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:
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
def resolve():
    K = ir()
    A, B = lr()
    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())
c=0
for i in range(a,b+1):
    if i%k==0:
        c=1
        break
print("OK" if c==1 else "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())
for i in range(A,B+1):
    if i%K == 0:
        print("OK")
        exit()
print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#MLE注意！0や1のケースに注意

def main():
    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
    import math
    from math import gcd

    #inf = 10**17
    #mod = 10**9 + 7

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

while a <= b:
    if a % k == 0:
        print("OK")
        exit(0)
    a += 1
print("NG")

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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


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:

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


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

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examA()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
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 sys
input = sys.stdin.readline
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:
#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 = [int(x) for x in input().split()]
print('OK' if any(x % k == 0 for x in range(a, b + 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:
        print("OK")
        exit()

print("NG")
exit()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)

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

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

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


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

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8
K = int(input())
A, B = map(int, input().split())
if (B // K) * K >= A:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print("NG")

Submission status: Accepted

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


main()

Submission status: Accepted

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