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

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

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
if s==B-A+1:
  print("NG")
else:
  print("OK")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

k = int(input())
n, m = map(int, input().split())

if n%k==0:
    print('OK')
    exit()

if m%k==0:
    print('OK')
    exit()

mm= m//k
nn= n//k

if mm>nn:
    print('OK')
else:
    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("OK")
else:
    print("NG")

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

"""
=int(input())
=map(int,input().split())
=list(map(int,input().split()))

# アレイ import numpy as np =np.array(list(map(float,input().split())))

# 文字列 =list(str(input()).split(" " or ","))

# 一文字＆連番(縦横可能) =map(int, open(0).read().split())

# 2-d list
lis=[[] for _ in range(M)]
for i in range(M):
    lis[i] = list(map(int,input().split()[0:]))

# Each list
N = int(input())
a = [0] * N
b = [0] * N
c = [0] * N
for i in range(N):
    a[i], b[i], c[i] = map(int, input().split())
"""

k=int(input())
a,b=map(int,input().split())
lis=list(range(a,b+1))
for i in range(len(lis)):
    if lis[i]/k==int(lis[i]/k):
        print('OK')
        break
else:
    print('NG')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a = int(input())
    b, c = map(int, input().split())
    i =0
    j = 0
    flag = 0
    while j <=c:
        i +=1
        j = a *i
        if j >=b and j<= c :
            flag = 1

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

Submission status: Accepted

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

# main
result = "NG"
for i in range(args[0], args[1] + 1):
    if i % a == 0:
        result = "OK"

# /main

print(result)

Submission status: Accepted

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

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:
k = int(input())
a, b = map(int, input().split())
l = []
for i in range(a, b+1):
    if i % k == 0:
        print('OK')
        break
    else:
        if i == b:
            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:
# -*- coding: utf-8 -*-
k = int(input())
a, b = map(int, input().split())

a_sho = a // k
b_sho = b // k
a_mod = a % k

if a_sho == b_sho and a_mod != 0:
    print("NG")
else:
    print('OK')

Submission status: Accepted

Solution code:
K=int(input())
A,B=map(int,input().split())
if A%K==0 or B%K==0:
    print("OK")
    exit(0)
if A//K-B//K==0:
    print("NG")
else:
    print("OK")

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:
import sys
K = int(input())
A, B = map(int, input().split())
i = 1
while K*i <= B:
    if A <= K*i <= B:
        print('OK')
        sys.exit()
    i += 1
print('NG')

Submission status: Accepted

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

if (A % K == 0) | (B % K == 0):
    print('OK')
elif (K - (A % K)) < (B - A):
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

from sys import stdin


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

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

Submission status: Accepted

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

if b // k != a // k:
    ans = 'OK'
else:
    if a % k == 0:
        ans = 'OK'
    elif b % k == 0:
        ans = 'OK'
    else:
        ans = 'NG'


print(ans)

Submission status: Accepted

Solution code:
#
import sys
import math
import numpy as np
import itertools

# ひとつ入力
n = int(input())

# いくつか入力
a, b = (int(i) for i in input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

i = 1
flag = 0
while i <=1000:
    if int(A)<= K*i <= int(B):
        print("OK")
        flag = 1
        break
    
    i +=1
    

if flag != 1:
    print("NG")

Submission status: Accepted

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

Ans='NG'

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

Submission status: Accepted

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

Submission status: Accepted

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

judge = 0
for i in range(a, b+1):
    if i % k == 0:
        judge = 1
        break
    else:
        pass

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

if n * math.ceil(a/n)<= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
N = [int(e) for e in input().split()]
for i in range(N[0],N[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())

if b%k <= b-a:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

N = A %K
if N == 0:
    print('OK')
else:
    N = K-N
    N = A+N
    if N > B:
        print('NG')
    else:
        print('OK')

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
print('NOGK'[(a - 1) // k < b // k::2])

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

K = int(input())
A, B = LI()

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read


k,a,b = [int(i) for i in read().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(1, 1001):
    n = i * k
    if n > b:
        break
    if a <= n <= b:
        print("OK")
        quit()
print("NG")

Submission status: Accepted

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

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

     ans = k
     while(True):
          # print(ans)
          if ans >= a and ans <= b:
               print('OK')
               break
          elif ans > b:
               print('NG')
               break
          else:
               ans = ans + k

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

dist = A % K + B - A

if dist >= K :
  print("OK")
elif 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())

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = input().strip().split()
a,b = [int(a),int(b)]
counter = 0
for i in range(a,b+1):
    if i%k ==0:
        counter +=1
    else:
        continue
if counter >=1:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
cnt = 0
for ind in range(1000):
    if a <= cnt <= b:
        print("OK")
        exit()
    cnt += k
print("NG")

Submission status: Accepted

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

def main():
    K = int(input())
    A, B = map(int, input().split())
    for i in range(1001):
        if A <= (i*K) <= B:
            print('OK')
            return
    print('NG')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

i=0
while(True):
    i+=1
    if a<=i*k and i*k<=b:
        print('OK')
        break
    elif b<i*k:
        print('NG')
        break

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 and i // k >= 1:
            print("OK")
            break
    else:
        print('NG')


if __name__ == '__main__':
    main()

Submission status: Accepted

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


def solve(K: int, A: int, B: int):
    k = B // K
    if A <= k * K:
        print("OK")
    else:
        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
K = int(input())
A, B = map(int, input().split())

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

Submission status: Accepted

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

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

if len(l) > 0:
    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:
        print("OK")
        f+=1
        break
if f==0:
    print("NG")

Submission status: Accepted

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

while True:
    if A <= K*i <= B:
        print("OK")
        break
    elif K*i > B:
        print("NG")
        break
    else:
        i += 1

Submission status: Accepted

Solution code:
K = int(input())
A, B = (int(x) for x in input().split())
c = 0
for i in range(0, int(B/K)+1):
    if K * i >= A and K * i <= B:
        c += 1
if c > 0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
a=int(input())

b,c=list(map(int,input().split()))

k=b//a
s=b%a

if s==0:
  print("OK")
else:
  if (k+1)*a <= c:
    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
input = sys.stdin.readline

# -*- coding: utf-8 -*-
A = int(input())

#intの場合
X,Y = map(int,input().split())

if  X % A == 0 or Y % A == 0 :
  print('OK')
elif  X // A != Y // A :
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

judge= [i for i in range(A, B+1) if i % K == 0]

if len(judge) >= 1:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

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

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

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

Submission status: Accepted

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

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="NG"
for i in range(1,1001):
  if a<=k*i<=b:
    ans="OK"
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

if N//K < M//K:
    print('OK')
elif N%K == 0 or M%K == 0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
def abc165_a():
  k = int(input())
  a, b = map(int, input().split())
  for i in range(1, 1001):
    if a <= i * k and i * k <= b:
      print('OK')
      return
  print('NG')

abc165_a()

Submission status: Accepted

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

target = a
res = 'NG'
while target <= b:
    if target % k == 0:
        res = 'OK'
    target += 1
print(res)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	A
# CreatedDate:  2020-05-02 20:52:56 +0900
# LastModified: 2020-05-02 21:14:49 +0900
#


import os
import sys


def main():
    k=int(input())
    a,b=map(int,input().split())
    amari=a%k
    shou=a//k
    if amari==0:
        print("OK")
        return
    if (shou+1)*k <= b:
        print("OK")
        return
    print("NG")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

    print("NG")


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

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(lambda x:int(x),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())
a = A//K
b= B//K
if A%K == 0 or B %K == 0:
  print('OK')
elif b-a > 0:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int, input().split())
i = 0
ans = "NG"
while(K*i < B):
  i += 1
  if(A <= K*i and K*i <= B):
    ans = "OK"
    

print(ans)

Submission status: Accepted

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

flag = False

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

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

Submission status: Accepted

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

Submission status: Accepted

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

c = b - b%k

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(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())
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())
i=0
import sys

while K*i<=B:



    if A<=K*i and K*i<=B:

        print("OK")

        sys.exit()
    else:
        i+=1

print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import gcd
from functools import reduce
from itertools import product

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

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

if __name__ == "__main__":
  resolve()

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(A,B+1):
  if i % K == 0:
    ans = 'OK'
    break

print(ans)

Submission status: Accepted

Solution code:
k = int(input())
x,y = map(int,input().split())	

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

Submission status: Accepted

Solution code:
k=int(input())
lit=str(input()).split(" ")
a=int(lit[0])
b=int(lit[1])

if k == 1:
    print("OK")
    exit()

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

if b % k == 0:
    print("OK")
    exit()

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

Submission status: Accepted

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

while A <= B:
    if A%K ==0:
        yesno = 'OK'
        break
    else:
        A+=1
        yesno = 'NG'
print(yesno)

Submission status: Accepted

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

Submission status: Accepted

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

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

print('NG')
exit()

Submission status: Accepted

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

flag = False
for num in range(a, b+1):
    if num % 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
if Flag:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
inpl = lambda: list(map(int,input().split()))
K = int(input())
A, B = inpl()
if (A-1)//K == B//K:
    print('NG')
else:
    print('OK')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def input_number():
    return int(input())

def input_1line_list(number_of_input):
    return [input() for i in range(number_of_input)]

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

# def print_unique_length(input_list):
#     print(len(set(input_list)))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

if (A // K) != (B // K):
  print('OK')
elif (A % K) == 0:
  print('OK')
elif (B % K) == 0:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

max = int(b/k)

for i in range(1,max+1):
    tmp = k * i
    if a <= tmp and b >= tmp:
        print('OK')
        exit()

print('NG')

Submission status: Accepted

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

s = 0
i = 0
while True:
    if s >= a:
        break
    s = k * i
    i += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

f = False
for i in range(b//k+1):
  if k*i >= a:
    f = True

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

Submission status: Accepted

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

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

print(x)

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

print("NG")

Submission status: Accepted

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

for i in range(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()))

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 = input().split()
a = int(a)
b = int(b)
ok = False
for i in range(a,b+1):

    if i%k == 0:
        print("OK")
        ok = True
        break
if ok == False:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
k=int(input())
a,b=map(int,input().split())
print('OK' if math.floor(b/k)-math.ceil(a/k)>=0 else 'NG')

Submission status: Accepted

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

Submission status: Accepted

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


def readstr():
    return input().strip()


def readint():
    return int(input())


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


def readstrs():
    return input().split()


K = readint()
A, B = readnums()

for i in range(A, B + 1):
    if not i % K:
        print('OK')
        sys.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")
    return


if __name__ == "__main__":
    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")
        quit()

print("NG")

Submission status: Accepted

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

Submission status: Accepted

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