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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
b, c = list(map(int, input().split()))
if int(c/a)>=int(b/a):
  print("OK")
else:
  print("NG")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
MOD = 10 ** 9 + 7
INF = 10 ** 11
import sys
sys.setrecursionlimit(100000000)

def main():
    k = int(input())
    a,b = map(int,input().split())
    if k == 1 or b//k - a//k >= 1:
        print('OK')
    else:
        print('NG')
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if B - A >= 7:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
K = int(input())
A, B = (int(_) for _ in input().split())
if B - A + 1 >= K:
  print('OK')
else:
  print('NG')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if abs(A-B)+1 >= K:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
a = int(input())
q, w = map(int, input().split())
ans = True

if w - q >= a:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
k=int(input())
a,b=map(int,input().split())
if b-a >=k:
  	print('OK')
else:
	print('NG')

Submission status: Wrong Answer

Solution code:
import math
def I():
  return input()
def II():
  return int(input())
def MII():
  return map(int, input().split())
def LMII():
  return list(map(int, input().split()))

n = II()
a, b = MII()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print("OK" if a<=k and k<=b else "NG")

Submission status: Wrong Answer

Solution code:
k = int(input())
a,b = map(int,input().split())
d = b-a
if(d>=k):
  print("OK")
else:
  print("NG")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

K = INT()
A, B = MAP()

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

print("NG")

Submission status: Wrong Answer

Solution code:
k=int(input())
a,b=map(int,input().split())
if abs(a-b)>=k:
  print('OK')
else:
  print('NG')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

if k == 1:
    print('OK')
elif b - a >= k:
    print('OK')
else:
    print('NG')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k=int(input())
a,b=map(int,input().split())
if b//k*k>=a:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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('YES')
else:print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))


N = ii()
A, B = mi()

for i in range(A, B+1):
    if not i % N:
        print('OK')
        exit()
print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#template
def inputlist(): return [int(k) for k in input().split()]
#template
K = int(input())
A,B = inputlist()
if B - A + 1 >= K:
    print("OK")
else:
    print("NG")

Submission status: Wrong Answer

Solution code:
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))
k = int(input())
a, b = map(int, input().split())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(A,B+1):
  if i%K==0:
    print("Yes")
    break
else:
  print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                res.append(i)
                if i != n // i:
                    res.append(n // i)
        return res

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


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


def main():
    # sys.stdin = open("sample.txt")
    solve()


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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('Yes')
		sys.exit()
print('No')

Submission status: Wrong Answer

Solution code:
from math import ceil


def main():
    k = int(input())
    a, b = map(int, input().split())
    print("OK" if ceil(a / k) * k <= b else "No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if b // k - a // k > 0:
    print('OK')
else:
    print("NG")

Submission status: Time Limit Exceeded

Solution code:
import math

input1 = input()
kbai= int(input1)
 
input2=input().split(" ")
mins= int(input2[0])
maxs= int(input2[1])
flg=0
ans=0
tmp=0

tmp=math.floor(mins/kbai)
ans=tmp*kbai
#print(tmp)

while flg == 0:
  ans=ans+kbai
  if ans > mins and ans <= maxs:
    flg=1

if flg ==1:
  print("OK")
  #print(ans,maxs,mins,flg)
else:
  print("NG")
  #print(ans,maxs,mins,flg)

Submission status: Time Limit Exceeded

Solution code:
input1 = input()
kbai= int(input1)
 
input2=input().split(" ")
mins= int(input2[0])
maxs= int(input2[1])
flg=0
ans=0
 
while flg == 0:
  ans=ans+kbai
  if ans > mins and ans <= maxs:
    flg=1

if flg ==1:
  print("OK")
  #print(ans,maxs,mins,flg)
else:
  print("NG")
  #print(ans,maxs,mins,flg)

Submission status: Time Limit Exceeded

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

while i < b:
    dis = i * k
    if dis >= a and dis <= b:
        flag = True
        break


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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

while k * i <= b:
    if a <= k * i <= b: ans = 'OK'

print(ans)

Submission status: Time Limit Exceeded

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

while k * i <= b:
    if a <= k * i <= b: ans = 'OK'

print(ans)

Submission status: Time Limit Exceeded

Solution code:
K = input()
li = input().split()
A = int(li[0])
B = int(li[1])

if B - A + 1 >= int(K):
  print('OK')
else:
  i = A
  while i < B + 1:
    if i % int(K) == 0:
      print('OK')

    else:
      i = i+1
  print('NG')

Submission status: Time Limit Exceeded

Solution code:
K = input()
li = input().split()
A = int(li[0])
B = int(li[1])

if B - A + 1 >= int(K):
  print('OK')
else:
  i = A
  while i < B + 1:
    if i % int(K) == 0:
      print('OK')
    else:
      i = i+1
  print('NG')

Submission status: Time Limit Exceeded

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

if int(B) - int(A) + 1 >= int(K):
  print('OK')
else:
  i = int(A)
  while i < int(B) + 1:
    if i % int(K) == 0:
      print('OK')
    else:
      i = i+1
  print('NG')

Submission status: Time Limit Exceeded

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

if a == b:
    if a % n == 0:
        print('OK')
    else:
        print('NG')
else:
    while a < b:
        if a % n ==0:
            print('OK')
        else:
            a += 1
            if a % n == 0:
                print('OK')
                break
            elif a == b:
                print("NG")

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
a = int(input())
b,c=map(int,input().split())
while(True):
    for i in range(a, b+1):
        if i//a == 0:
            print('True')
            break
    print('NG')
print('OK')

Submission status: Time Limit Exceeded

Solution code:
k = int(input())
a,b = map(int,input().split())
flag = False
list = [i for i in range(a,b)]
if k == 1 or k == a or k == b:
    flag = True
else:
    c = 1
    while k < b:
        if c * k in list:
            flag = True
            break
        else:
            c += 1

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

Submission status: Time Limit Exceeded

Solution code:
k = int(input())
a,b = map(int,input().split())
flag = False
list = [i for i in range(a,b)]
if k == 1 or k == a or k == b:
    flag = True
else:
    c = 1
    while True:
        if c * k in list:
            flag = True
            break
        else:
            c += 1

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

Submission status: Time Limit Exceeded

Solution code:
k = int(input())
a,b = map(int,input().split())
flag = False
list = [i for i in range(a,b)]
if k == 1 or k == a or k == b:
    flag = True
else:
    c = 1
    while True:
        if c * k in list:
            flag = True
        else:
            c += 1

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

Submission status: Time Limit Exceeded

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

a = int(i[0]);
b = int(i[1]) ;
flag = False;

while a <= b:
    if a % k == 0:
        flag = True;
        break;
    else:
        continue;
    a += 1;

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

Submission status: Time Limit Exceeded

Solution code:
k = int(input())
a, b = map(int, input().split())
l = 1
while a > l*k:
    l += 1
m = 1
while b < m*k:
    m += 1
    
if a <= l*k <= b or a <= m*k <= b:
    print("OK")
else:
    print("NG")

Submission status: Time Limit Exceeded

Solution code:
K = int(input())
A, B = map(int, input().split())
a = 0
K_sum = K
while K <= B:
    if A<=K and K<=B:
        a = 1
        break
    K_sum += K

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

Submission status: Time Limit Exceeded

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

kk = k

while(k <= 1000):
    kk = kk + k
    if(kk <= b and kk >= a):
        print("OK")
        exit()
    #print(kk)

    #j = j + 1

print("NG")

Submission status: Time Limit Exceeded

Solution code:
K=int(input())
A,B=list(map(int,input().split()))
c=K
while c<=B:
  if c>=A and c<=B:
    print("OK")
    break
else:
  print("NG")

Submission status: Time Limit Exceeded

Solution code:
k = input()
l = input().split()
A, B = l[0], l[1]

i = 0
while i * k <= B:
  if A<= i*k <= B:
    print('OK')

print('NG')

Submission status: Time Limit Exceeded

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

Submission status: Accepted

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

Submission status: Accepted

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

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=B//K-(A-1)//K
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")
        exit()
print("NG")

Submission status: Accepted

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

for i in range(1,1000):
  if a<=k*i and k*i<=b:
    print('OK')
    q=1
    break

if q==0:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
k=int(input())
[a,b]=list(map(int, input().split()))
A=math.floor(a/k)
B=math.floor(b/k)
if A!=B:
  print("OK")
elif k==1:
  print("OK")
elif a%k==0 or b%k==0:
  print("OK")
else:
  print("NG")

Submission status: Accepted

Solution code:
def N():
    return int(input())
def L():
    return list(map(int,input().split()))
def NL(n):
    return [list(map(int,input().split())) for i in range(n)]
mod = pow(10,9)+7
#import numpy
k = N()
a,b = L()
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())
valid = False
for i in range(A,B+1):
    if i % K == 0:
        valid = True
        break
if valid:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int,input().split())
list1 = []
x =(k+a-1)//k
y = b // k

for i in range(x,y+1):
  list1.append(i)
if list1 == []:
  print('NG')
else:
  print('OK')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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())
ans=0
i=1
while K*i<=1000:
    if A<=K*i and K*i<=B:
        ans=1
        break
    i+=1
if ans==1:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if b // k > (a-1) // k:
	print("OK")
else:
	print("NG")

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

ans = False
count = K
while count <= B:
    if A <= count and count <= B:
        ans = True
    count += K

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

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
li = []
for i in range(A,B+1):
    li.append(i)
ans = False
for j in li:
    if j%K == 0:
        ans = True
        break
    else:
        ans = False
if ans == True:print("OK")
else:print("NG")

Submission status: Accepted

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

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

main()

Submission status: Accepted

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

for i in range(B//K+1):
    if A<=K*i and K*i<=B:
        cnt+=1
print('OK' if cnt>0 else 'NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    k = int(readline())
    a, b = list(map(int, readline().split()))
    for i in range(a, b + 1):
        if i % k == 0:
            print("OK")
            exit()
    print("NG")


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
K=int(input())
A,B=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:
K = int(input())
A, B = map(int, input().split())
ans = 'OK' if B//K-(A-1)//K > 0 else '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'
		break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

b_largest = (b // target) * target

print('OK' if b_largest >= a else '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 >= 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):
  ans = 'NG'
  if i%k == 0:
    ans = 'OK'
    break
    
print(ans)

Submission status: Accepted

Solution code:
K = int(input())
AB = input().split()
A = int(AB[0])
B = int(AB[1])

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
if b//k > a//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())
for i in range(1000):
    if a <= k*i <= b:
        print("OK")
        break
else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 165 A
K = int(input())
A,B = list(map(int, input().split()))
m = B%K
print('OK') if B-m >= A 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
    print("OK")
    break
if flag == 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')
        exit()

print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A,B=map(int,input().split())
Na = N
while N <= 1000:
    if A <= N and N <= B:
        print("OK")
        break
    N = N+Na
if N>1000:
    print("NG")

Submission status: Accepted

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

if (A-1)//K < B//K:
    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:
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 resolve():
    k = int(input())
    a, b = list(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())

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

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

ans = False
tmp = k

while tmp <= b:
    if (tmp >= a) and (tmp <= b):
        ans = True
        break
    else:
        tmp += k

if ans:
    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())
import sys
a,b=map(int,input().split())
for i in range(a,b+1):
    if i%k==0:
        print('OK')
        sys.exit()

print('NG')