Problem:


Score: 100 points

Problem Statement

Takahashi the Jumbo will practice golf.

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

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

Constraints

All values in input are integers.

1 \leq A \leq B \leq 1000

1 \leq K \leq 1000

Input

Input is given from Standard Input in the following format:

K
A B

Output

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

Sample Input 1

7
500 600

Sample Output 1

OK

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

Sample Input 2

4
5 7

Sample Output 2

NG

No multiple of 4 lies between 5 and 7.

Sample Input 3

1
11 11

Sample Output 3

OK



Sample input:
7
500 600


Sample output:
OK

Submission status: Accepted

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

from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

K = int(input())
A, B = [int(_) for _ in 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 = list(map(int,input().strip().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())

if B // K * K >= A:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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

count = 0

for i in range(1001):
    if((A <= (K*i)) & ((K*i) <= B)):
        count = 1


if(count == 0):
    print("NG")
if(count == 1):
    print("OK")

Submission status: Accepted

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

Submission status: Accepted

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

t = K
while t <= B:
  if A <= t:
    print('OK')
    exit()
  t += K
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
if f:
  print("OK")
else:
  print("NG")

Submission status: Accepted

Solution code:
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

INF = 10 ** 10

K = int(stdin.readline().rstrip())
A, B = [int(x) for x in stdin.readline().rstrip().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())
s=input().split()
a=int(s[0])
b=int(s[1])
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())
m=b//k*k
if a<=m:
    print("OK")
else:
    print("NG")

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

for x in range(a, b + 1):
  if x % 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:
import math

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

n = math.floor(b/k)

if n*k >= a and n*k <= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if (a//k < b//k) or (k==1) or (not(a%k) or not(b%k)):
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
get = int(input())
ints = list(map(int, input().split(' ')))
count=0
while count<=ints[1]:
  count+=get
if count-get>=ints[0] and count-get<=ints[1]:
  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
print('OK' if flag else 'NG')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


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

Submission status: Accepted

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


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

    i += 1


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

Submission status: Accepted

Solution code:
#  =========     /\       /|    |====/|
#      |        /  \       |    |   / |
#      |       /____\      |    |  /  |
#      |      /      \     |    | /   |
#  ========= /        \  =====  |/====|  
#  code

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

a=True
for i in range(1000):
    if int(A)<=i*int(K)<=int(B):
        print("OK")
        a=False
        break
if a==True:
    print("NG")

Submission status: Accepted

Solution code:
k = int(input())
a,b = [int(i) for i in input().split()]
print('OK' if a%k == 0 or b%k == 0 or a//k < b//k else 'NG')

Submission status: Accepted

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

print("OK" if len([q for q in range(A, B + 1) if not q % K]) else "NG")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/abc165/tasks/abc165_a

import sys

input_k = input()
input_a_b = input()

k = int(input_k)
input_a, input_b = input_a_b.split()
a = int(input_a)
b = int(input_b)

xd = a // k # Divine
xm = a % k  # Amari

if xm == 0:
    print('OK')
    sys.exit(0)

if b >= k * (xd+1):
    print('OK')
    sys.exit(0)

print('NG')
sys.exit(0)

Submission status: Accepted

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

S = B//K
T = B%K
U = B-A

if S >= 1:
  if T <= U:
    print("OK")
  else:
    print("NG")
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())
can = False
for i in range(a, b+1):
    if i % k == 0:
        can = True
if can:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline

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

    x = A//K

    y = B//K

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

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

Submission status: Accepted

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

flag = False

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

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

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

if A==B:
    if A%K==0:
        print("OK")
        sys.exit()
else:
    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())
han = False
for i in range(a,b+1):
    if i%k == 0:
        han = True
if han == True:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
k_under, k_over = map(int,input().split())

if (k_under // k + ((k_under % k != 0) * 1)) * k > k_over:
    print('NG')
else:
    print('OK')

Submission status: Accepted

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


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


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    main()

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
    else:
        count += 0

        
        
if count >= 1:
    print("OK")
elif count == 0:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def hoge(K, A, B):
    ans = 0
    for n in range(A, B+1):
        if n%K == 0:
            ans = 1
            return ans
    return ans

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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())
if b // k * k >= a:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
k = int(input())

data = input().split()
a = int(data[0])
b = int(data[1])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
judge = False;
count = 1
num = K * count
while num <= B:
  if A <= num and num <= B:
    judge = True
    break
  count += 1
  num = K * count
if judge:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

if A<=K*(B//K)<=B:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 'NG'
for i in range(A, B+1):
    if i % N == 0:
        ans = 'OK'
print(ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')

def solve():
    k = II()
    a, b = MI()

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


if __name__ == '__main__':
    solve()

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

tmp = B//K * K

if A <= tmp:
    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:
import math
k = int(input())
a,b = map(int,input().split())
if math.ceil(a/k)*k<=b:
    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')
    break
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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:
from math import floor, ceil

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

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

Submission status: Accepted

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

result="NG"

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat May  2 14:48:19 2020

@author: ab
"""
# import math
import sys
# import os

def isDivisible(num1,num2):
    return num1%num2 == 0

def search(n,m,k):
    if isDivisible(n,k) | isDivisible(m,k):
        return True
    elif abs(n-m) <=1:
        return False
    for i in range(n,m):
        if isDivisible(i, k):
            return True
    return False
    
def solution(k,n,m):
    if k == 1:
        return True
    elif isDivisible(n,k) | isDivisible(m,k):
        return True
    elif abs(n-m) <=1:
        return False
    elif k>m:
        return False
    else:
        return search(n,m,k)



input = sys.stdin
output = sys.stdout
while True:
    lineElements = input.readline().rstrip("/n").split(" ")
    if(lineElements[0] == ''):
        break;
    if len(lineElements) == 1:
        k = int(lineElements[0])
    else:
        n,m = lineElements
        n,m = int(n),int(m)
        if solution(k,n,m) == True:
            print("OK\n")
        else:
            print("NG\n")
# output.flush()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input().strip())
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:
k = int(input())
a,b = map(int, input().split()) 
i = 0
while(1):
    i=i+1
    if i*k >= a and i*k <= b:
        print("OK")
        break
    elif i*k > b:
        print("NG")
        break

Submission status: Accepted

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


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:
a=int(input())
L,R = map(int,input().split())
b=L%a
if b==0:
  print('OK')
else:
  if L-b+a<=R:
    print('OK')
  else:
    print('NG')

Submission status: Accepted

Solution code:
from sys import exit

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

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

Submission status: Accepted

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

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

    # print("NG")

    if A % K == 0:
        print("OK")
        exit()
    
    if B // K > A // K:
        print("OK")
    else:
        print("NG")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import exit

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 A % K == 0:
        print("OK")
        exit()
    
    if B // K > A // K:
        print("OK")
    else:
        print("NG")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import exit

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:
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=input()
A, B=input().split()


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

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
nextk = a-a%k+k

if nextk <= b or a%k == 0 or k == 1:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=int(input())
f=input().split()
A=int(f[0])
B=int(f[1])
a="NG"
for i in range(int(B/K)+1):
  if A<=K*i<=B:
    a="OK"
print(a)

Submission status: Accepted

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

x = B // K * K

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

Submission status: Accepted

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

x = ( B // K ) * K
if x >= A:
    print("OK")
else:
    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:
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 resolve():
    K = int(input())
    A, B = map(int, input().split())
    for i in range(A, B + 1):
        if i % K == 0:
            print("OK")
            return
    print("NG")


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

if can == True:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
import sys
input = sys.stdin.readline


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K = int(input())
A, B = list(map(int, input().split()))
t = A // K
if K * t == A:
  print("OK")
elif K * (t+1) <= B:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
s = list(map(int, input().split()))
a = s[0]
b = s[1]

flg = 0

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

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

Submission status: Accepted

Solution code:
from sys import stdin

K = int(stdin.readline().rstrip())
[A, B] = [int(x) for x in input().rstrip().split()]


flag=0
K_temp=K
while(True):
    if(K_temp>B):
        break
    if(K_temp>=A and K_temp<=B):
        flag=1
        break
    else:
        K_temp+=K

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

Submission status: Accepted

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

Submission status: Accepted

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

takahashikun = [i for i in range(A, B+1)]
for i in takahashikun:
    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())

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

Submission status: Accepted

Solution code:
from math import sqrt,ceil,floor
def mi():return map(int,input().split())
def li():return list(mi())
def ii():return int(input())

k=ii()
a=li()
a1=ceil(a[0]/k)*k
if(a1<=a[1]):
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
from math import sqrt,ceil,floor
def mi():return map(int,input().split())
def li():return list(mi())
def ii():return int(input())

k=ii()
a,b=mi()
a1=ceil(a/k)*k
if(a1<=b):
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

for i in range(y-x+1):
        if (x+i)%k==0:
                print("OK")
                exit()
        
print("NG")

Submission status: Accepted

Solution code:
K = int(input())
A,B = map(int,input().split())
T = 0
c = K
while c <= B:
  if A <= c:
    T = 1
    break
  else:
    c +=K

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

Submission status: Accepted

Solution code:
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    k = ii()
    a,b = mi()
    tmp = 0
    while tmp < b+1:
        if tmp>=a:
            print('OK')
            exit()
        tmp+=k

    print('NG')




main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
l=[]
for x in range(a,b+1):
    if x%k==0:
        l.append(x)
if len(l)!=0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

x = b // k - (a-1) // k

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

Submission status: Accepted

Solution code:
K = int(input())

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

flag = False
for x in range(A, B+1):
  if x % 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())

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

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

Submission status: Accepted

Solution code:
from math import ceil
from math import floor
k=int(input())
a,b=map(int,input().split())
l=ceil(a/k)
r=floor(b/k)
if l<=r:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
temp=list(map(int,input().rstrip().split()))
a=temp[0]
b=temp[1]
rem=(a%n)
left=n-rem
if b>=(left+a) :
    print("OK")
elif a%n ==0 or b%n==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
else:
    print('NG')