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 = list(map(int, input().split()))

i = 1
flag = False
while K * i <= B:
    if K * i >= A:
        flag = True
    i += 1

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

Submission status: Accepted

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

ans = 'NG'

for i in range(1000 // k + 1):
    if a <= i * k <= b:
        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(0)
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:
        print('OK')
        exit()
print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC165-A
K = int(input())
X = list(map(int,input().split()))
if (X[0] // K + 1) * K <=  X[1] or X[0] % K == 0:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    k = int(input())
    a, b = map(int, input().split())
    for i1 in range(a, b + 1):
        if i1 % k == 0:
            print('OK')
            sys.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:
K = int(input())
A, B = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# ABC165
# We Love Golf
K = int(input())
A, B = map(int, input().split())
for x in range(A,B+1):
    if x % K == 0:
        if x >= A:
            if x <= B:
                print('OK')
                exit()
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
if ans > 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
    elif i == b:
        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
print('OK') if flg 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:
        print("OK")
        break
    else:
        cnt += 1
        if cnt == b-a+1:
            print("NG")
            break

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=int(input())
A,B=map(int,input().split())
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()
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

answer = k - (score[0] % k)
if score[0]%k == 0:
    print('OK')
elif answer + score[0] <= score[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')
        break
    if i == b:
        print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
import itertools

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, a, b = map(int, open(0).read().split())
print("OK" if b // k * k >= a else "NG")

Submission status: Accepted

Solution code:
K=int(input())
ans = False
M,N = map(int,input().rstrip().split(" ")) 
#print(K,M,N)
for number in range(M,N+1):
    if number%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())
a=0
for i in range(A,B+1):
  if i%K==0:
    a=1
if a==1:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

flag = False

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

if K == 1:
    print('OK')
elif B - (B % 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(b-a+1):
    if (a+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:
k=int(input())
a,b=map(int,input().split())
print("OK" if (a-1)//k!=b//k else"NG")

Submission status: Accepted

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

if int((a-1)/k + 1)*k <= b:
    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, 1):
	if i % k == 0:
		flag = flag + 1
		break

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

K = int(input().rstrip())
distance_range = list(map(int,input().split()))
if (distance_range[1]//K)*K >= distance_range[0]:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

b=list[0]//a
c=list[1]//a

if list[0]%a==0:
	print("OK")

elif c-b>=1:
	print("OK")

else:
  print("NG")

Submission status: Accepted

Solution code:
k = int(input())

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

if a <= k <= b or k <= b/2:
    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//k,b//k+1):
  if a <= k * i <= b:
    ans = 1
if ans == 1:
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:
x = int(input())
a, b = map(int, input().split())
print((b // x) * x >= a and "OK" or "NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b,c=map(int,input().split())
x=(b//a)*a
if b<=x<=c:
  print("OK")
elif b<=x+a<=c:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

Solution code:
import sys

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

if K == 1:
    print('OK')
    sys.exit()

n = 1
while True:
    m = K * n
    if A <= m <= B:
        print('OK')
        sys.exit()

    if n == B:
        break

    n += 1

print('NG')

Submission status: Accepted

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

x = 1000//K

for n in range(x+1):
    if (n * K >= A) and (n * K <= B):
        print('OK')
        break
    if n == x:
        print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
a,b = map(int, input().split())
for n in range(a, b + 1):
  if n % 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())
tmp = input().split(" ")
A = int(tmp[0])
B = int(tmp[1])

if A + K - A % 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())

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

Submission status: Accepted

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

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

print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math 

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
k = int(input())
a, b = list(map(int, input().split()))
p = 0
while p <= 1000:
    if a <= p <= b:
        print("OK")
        exit()
    p += k
print("NG")

Submission status: Accepted

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

s = a//k
t = b//k
if s != t:
    ans = True
elif a % k == 0:
    ans = True
else:
    ans = False

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

Submission status: Accepted

Solution code:
n = int(input())
low, high = map(int,input().split())
for i in range(low, high + 1):
    if i % n == 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:
# -*- coding: utf-8 -*-

def main():

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

    numA = (A - 1) // K
    numB = B // K

    if numB - numA > 0:
        ans = 'OK'

    else:
        ans = 'NG'

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# abc165_a.py
# https://atcoder.jp/contests/abc165/tasks/abc165_a

# ★ WA:5
# sub1_02.txt
# sub1_03.txt
# sub1_05.txt
# sub1_06.txt
# sub1_07.txt

# A - We Love Golf /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点: 100点

# 問題文
# ジャンボ高橋君はゴルフの練習をすることにしました。
# ジャンボ高橋君の目標は飛距離を Kの倍数にすることですが、ジャンボ高橋君の出せる飛距離の範囲は A 以上 B以下です。
# 目標の達成が可能であれば OK と、不可能であれば NG と出力してください。

# 制約
#     入力はすべて整数
#     1≤A≤B≤1000
#     1≤K≤1000

# 入力
# 入力は以下の形式で標準入力から与えられる。
# K
# A B

# 出力
# 目標の達成が可能であれば OK と、不可能であれば NG と出力せよ。

# 入力例 1
# 7
# 500 600

# 出力例 1
# OK

# 7の倍数のうち、たとえば 567 が 500 以上 600以下の範囲にあります。

# 入力例 2
# 4
# 5 7

# 出力例 2
# NG

# どんな 4の倍数も、5 以上 7以下の範囲にはありません。

# 入力例 3
# 1
# 11 11

# 出力例 3
# OK


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    K = int(lines[0])
    A, B = list(map(int, lines[1].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    # if (B+1-A) < K:
    #     result = 'NG'
    # else:
    #     result = 'OK'
    result = 'NG'
    for i in range(A, B+1):
        if i % K == 0:
            result = 'OK'

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['7', '500 600']
        lines_export = ['OK']
    if pattern == 2:
        lines_input = ['4', '5 7']
        lines_export = ['NG']
    if pattern == 3:
        lines_input = ['1', '11 11']
        lines_export = ['OK']
    if pattern == -1:
        lines_input = ['1000', '1000 1000']
        lines_export = ['OK']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    if FLAG_LOG:
        log(f'lines_input=[{lines_input}]')
        log(f'lines_export=[{lines_export}]')
        log(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            log('OK')
        else:
            log('NG')
    finished = time.time()
    duration = finished - started
    log(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K=int(input())
A,B=map(int,input().split())
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())
print('OK' if b // k * k >= a else 'NG')

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)) else 'NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

largest = b // k * k

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

Submission status: Accepted

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

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())
q, mod = divmod(A, K)
if mod == 0:
    print("OK")
elif K*(q+1) <= B:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import sys
import itertools


def resolve(in_):
    k = int(next(in_))
    a, b = map(int, next(in_).split())
    for v in range(a, b + 1):
        if not v % k:
            return 'OK'
    
    return 'NG'


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

if not ( 1 <= K <= 1000 ): sys.exit()
if not ( 1 <= A <= 1000 and A <= B <= 1000 ): sys.exit()

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

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

print("NG")

Submission status: Accepted

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

ans = 1

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

if ans:
    print('NG')

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

import math

if math.floor(b/k)-math.ceil(a/k)>=0:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

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

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
    if i == B:
        print('NG')
        break

Submission status: Accepted

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

Submission status: Accepted

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

# K 
# A B
x = B-B%K
if x >= 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:
    if i == b:
      print('NG')
  else:
    print('OK')
    break

Submission status: Accepted

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

can_K_times = False
if (A % K) == 0 or (B % K) == 0:
    can_K_times = True
elif (A // K) != (B // K):
    can_K_times = True


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
count = 0
number = K
A, B = map(int, input().split())
while number < A:
    count += 1
    number = K * count

if number <= B:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

if K == 1:
    print("OK")
    exit()
if A%K==0:
    print("OK")
    exit()

x = math.floor(A/K)
y = math.floor(B/K)

if y-x > 0:
    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 = list(map(int, input().split()))

n = a//k
ans = n * k
while ans <= b:
  if a <= ans <= b:
    exit(print('OK'))
  else:
    n += 1
    ans = k * n

print('NG')

Submission status: Accepted

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

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

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

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

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

K = int(input())
A, B = (int(x) for x in input().split())
num=0
while B>=num:
  num+=K
  if A<=num and num<=B:
    print("OK")
    sys.exit(0)
print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

if (int(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(a,b+1):
  if i%k==0:
    ans='OK'
    break

print(ans)

Submission status: Accepted

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

for i in range(a,b+1,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:
# A We Love Golf

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

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

Submission status: Accepted

Solution code:
import sys
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(b-a+1):
    if (a+i) % k == 0:
        print('OK')
        break
    elif a+i == b:
        print('NG')

Submission status: Accepted

Solution code:
K = int(input())

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

check = A
#print(check%K)

while check <= B:
    if check%K == 0:
        print("OK")
        exit()
    else:
        check += 1

print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=int(input())
A,B=map(int,input().split())
C=int(B/K)
i=0
for a in range(C+1):
    i=i+K
    if i>=A and i<=B:
        print("OK")
        break
    if i>B:
        print("NG")

Submission status: Accepted

Solution code:
def main():
  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('OK')
  else:
      print('NG')

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
print("NOGK"[-(-A//K)*K <= B::2])

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 a%k==0:
    print("OK")
    exit()

if a+k-a%k<=b:
    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 (K, B+1, K):
  if A<= i <= B:
    res = "OK"
print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = "NG"

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

print(ans)

Submission status: Accepted

Solution code:
#import numpy as np
#import math
#from decimal import *
#from numba import njit

#@njit
def main():
    K = int(input())
    A,B = map(int, input().split())
    if A%K == 0 or A%K + (B-A) >= K:
        print('OK')
    else:
        print('NG')    

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())
flg = False
for i in range(A,B+1):
    if i%K == 0:
        flg = True
if flg == True:
    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):
#    print(i)
    if i % k == 0:
        print("OK")
        exit()

print("NG")

Submission status: Accepted

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

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