Problem:


Score: 100 points

Problem Statement

Takahashi the Jumbo will practice golf.

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

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

Constraints

All values in input are integers.

1 \leq A \leq B \leq 1000

1 \leq K \leq 1000

Input

Input is given from Standard Input in the following format:

K
A B

Output

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

Sample Input 1

7
500 600

Sample Output 1

OK

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

Sample Input 2

4
5 7

Sample Output 2

NG

No multiple of 4 lies between 5 and 7.

Sample Input 3

1
11 11

Sample Output 3

OK



Sample input:
7
500 600


Sample output:
OK

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
f = False
A, B = map(int, input().split())
for i in range(1000):
    if A<= K*i <= B:
        f = True
if f:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################
 
K=II()
A,B=MI()

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

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache

import heapq


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

K = inputI()
A,B = inputIL()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
k, a, b = map(int, open(0).read().split())
cant = True
for i in range(a, b+1):
    if i%k==0: cant = False
print("ONKG"[cant::2])

Submission status: Accepted

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


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

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
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
    print(solve(K, A, B))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
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:
import math

def readInt():
	return int(input())
 
def readInts():
	return list(map(int, input().split()))
 
def readChars():
	return input().split()

k = readInt()
a,b = readInts()

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")
        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 b//k*k >= a else "NG")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    K=int(input())
    A,B=map(int,input().split())
    f=False
    for i in range(1000):
        if A<=i*K<=B:
            f=True
    if f:
        print('OK')
    else:
        print('NG')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

num = 1
while K * num < A:
    num += 1

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

Submission status: Accepted

Solution code:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import permutations,combinations
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
# from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint

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

def mylistinput(n):
    return [ list(myinput()) for _ in range(n) ]

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

k = int(input())
a,b = myinput()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a,b = map(int,input().split())
    for i in range(a,b+1):
        if i%n == 0:
            print('OK')
            return 0
    print('NG')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print ('NG')

Submission status: Accepted

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

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())
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(x) for x in input().split()]
A, B = [int(x) for x in 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())
ans = "NG"
for i in range(A, B+1):
  if i % K == 0:
    ans = "OK"
print(ans)

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
k=int(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())
f=0
for i in range(A,B+1):
    if i%K==0:
        f=1
print(['NG','OK'][f])

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(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 = [int(i) for i in input().split()]

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

Submission status: Accepted

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


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


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

if b//k - (a-1)//k >= 1:
    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):
    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 :
        print("OK")
        flag = True
        break

if flag == False :
    print("NG")

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    from sys import stdin
    # from collections import defaultdict
    input = stdin.readline

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

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

print(ans)

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
#from fractions import gcd
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 1, 0, -1, 1, -1, -1, 1]
dy = [1, 0, -1, 0, 1, -1, 1, -1]
debugmode = True

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

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    k = inp()
    a,b = inpm()
    if (b//k)*k >= a:
        print('OK')
    else:
        print('NG')
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

found = False

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

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

Submission status: Accepted

Solution code:
import sys
K = int(input())

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

for i in range(100000):

    if A <= K * i <= B:
        print ("OK")
        sys.exit()

print ("NG")

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

# import sys
# input = sys.stdin.readline
# 
# sys.setrecursionlimit(10 ** 7)
# 
# (int(x)-1 for x in input().split())
# rstrip()
#
# def binary_search(*, ok, ng, func):
#     while abs(ok - ng) > 1:
#         mid = (ok + ng) // 2
#         if func(mid):
#             ok = mid
#         else:
#             ng = mid
#     return ok

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

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
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: 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
import math  # noqa
import bisect  # noqa
import queue  # noqa


def input():
    return sys.stdin.readline().rstrip()


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

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    K = int( input())
    A, B = map( int, input().split())
    if B//K - (A-1)//K > 0:
        print("OK")
    else:
        print("NG")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
#     combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def readInt():
    return list(map(int,input().split()))

def main():
    k = int(input())
    a,b = readInt()
    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:
def main():
    K = int(input())
    A, B = map(int, input().split())
    for i in range(A, B + 1):
        if i % K == 0:
            print('OK')
            exit()

    print('NG')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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