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:
import sys
sys.setrecursionlimit(10 ** 6)  # 再帰関数の再帰の深さを設定
to_index = lambda x: int(x) - 1  # 入力した数字に1を引いたものを返す
print_list_in_2D = lambda x: print(*x, sep="\n")  # リストの要素を改行を挟んで表示する関数

# 入力を整数に変換して受け取る
def input_int():
    return int(input())

def map_int_input():
    return map(int, input())

MII = map_int_input

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

def MII_to_index():
    return map(to_index, input())

def MII_split_to_index():
    return map(to_index, input().split())

# 入力全てを整数に変換したものの配列を受け取る
def list_int_inputs():
    return list(map(int, input()))

LII = list_int_inputs

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

# 2次元リスト化
def LII_2D(rows_number):
    return [LII() for _ in range(rows_number)]

def LII_split_2D(rows_number):
    return [LII_split() for _ in range(rows_number)]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if det == 1:
    print("OK")

else:
    print("NG")

Submission status: Accepted

Solution code:
n=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)]

m=0
for i in range(a,b+1):
    if i//n==i/n:
        m+=1
if m>0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

ans = "NG"

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n=int(input())
k=int(input())
a,b=map(int,input().split())
#a=list(map(int,input().split()))
#a=[int(input()) for i in range(n)]
#ab=[list(map(int,input().split())) for i in range(n)]
ans='NG'
for i in range(a,b+1):
  if i%k==0:
    ans='OK'
print(ans)

Submission status: Accepted

Solution code:
import sys

# print('input >>')
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')

# print('-----output-----')

Submission status: Accepted

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

ans = 'NG'

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline

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

if (A // K + 1) * K <= B or A % K == 0:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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:
#!/usr/bin/env python3

from pprint import pprint
from collections import deque, defaultdict
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.buffer.readline
INF = float("inf")

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

res = 0
flag = False
while res <= b:
    res += k
    if a <= res <= b:
        flag = True

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

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

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

Submission status: Accepted

Solution code:
inf = 10**15
mod = 10**9+7
k = int(input())
a,b = map(int, input().split())
tmp = a//k
if tmp*k == a:
    print('OK')
elif (tmp+1)*k <= b:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import 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 fractions import gcd
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
if __name__ == "__main__":
    # 入力パターン．
    # 要素の数がわかっているパターン
    ### a b
    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(10000):
	if K*i>=A and K*i<=B:
		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
print('OK' if flag 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')
        exit()
print('NG')

Submission status: Accepted

Solution code:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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



K=one_int()
A,B=many_int()

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

Submission status: Accepted

Solution code:
import sys

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")
        sys.exit()

print("NG")

Submission status: Accepted

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

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:
import itertools
import math
import numpy as np
import fractions
from collections import deque
from itertools import combinations
from functools import reduce
from functools import lru_cache
import bisect
import sys
sys.setrecursionlimit(10**9)

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

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


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





if __name__ == "__main__":
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
c = []
for i in range(1200):
    c.append(k*i)
    
import sys
    
for i in c:
    if a <= i and i <= b:
        print("OK")
        sys.exit()
        
print("NG")

Submission status: Accepted

Solution code:
import math

flag = 1

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

if flag:
    print("NG")

Submission status: Accepted

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

x = b//k

print('OK' if x*k >= a else 'NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a,b=map(int, input().split())
c=b//k
d = k*c
if a <= d:
    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 and i % K == 0:
        ans = "OK"
        break

print(ans)

Submission status: Accepted

Solution code:
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	K = int(input())
	A, B = getlist()
	for i in range(1001):
		if A <= K * i and K * i <= B:
			print("OK")
			return

	print("NG")
	


if __name__ == '__main__':
	main()

Submission status: Accepted

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


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

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

print('NG')

Submission status: Accepted

Solution code:
K=int(input())
A,B=map(int,input().split())
flg=0
for i in range(10000):
    if A<=K*i<=B:
        flg=1
        break
print("OK" if flg else "NG")

Submission status: Accepted

Solution code:
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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

K = int(input())
A, B = map(int, input().split())
n = 1
while n * K <= B:
    if A <= n * K <= B:
        print("OK")
        exit()

    n += 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')
        quit()

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:
            ans = 'OK'
            break
    else:
        ans = 'NG'

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

for i in range(1000):
    tmp = K * i
    if A <= tmp <= B:
        print('OK')
        exit()

print('NG')

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
print("OK" if b//k > (a-1)//k 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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from math import factorial
from collections import Counter
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
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()))
MOD = 10**9 + 7

K = INT()
A, B = MAP()
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())

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

print(ans)

Submission status: Accepted

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

import sys

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

Submission status: Accepted

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


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

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

import sys


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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
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:
# abc165

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

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

Submission status: Accepted

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

# input
K = int(input())
A, B = list(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())
n, m = map(int, input().split())
cnt = 0
for i in range(n, m+1):
    if i % k == 0:
        cnt += 1

print('OK' if cnt > 0 else 'NG')

Submission status: Accepted

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

def s_in():
    return input()

def n_in():
    return int(input())

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

def print_l(l):
    print(' '.join(map(str, l)))

class Interval():
    def __init__(self, li):
        self.li = li
        self.n = len(li)
        self.sum_li = [li[0]]
        for i in range(1, self.n):
            self.sum_li.append(self.sum_li[i-1] + li[i])

    def sum(self, a, b=None):
        if b is None:
            return self.sum(0, a)

        res = self.sum_li[min(self.n-1, b-1)]
        if a > 0:
            res -= self.sum_li[a-1]
        return res

k=n_in()
a,b=l_in()

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

Submission status: Accepted

Solution code:
K = int(input())

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

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

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

Submission status: Accepted

Solution code:
K=int(input())
A,B=map(int,input().split())
c=B//K
if K*c>=A and K*c<=B:
    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:
n = int(input())
l = [int(x) for x in input().split(" ")]
b = False
for i in range(l[0],l[1]+1):
  if i%n == 0:
    b = True
if b == True:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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


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


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:
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(x) for x in 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')
            break
    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:
import sys
from io import StringIO
import unittest

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

    ans = False

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

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

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """7
500 600"""
        output = """OK"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """4
5 7"""
        output = """NG"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """1
11 11"""
        output = """OK"""
        self.assertIO(input, output)

if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

Solution code:
import sys

def get_ints(): return map(int, sys.stdin.readline().strip().split())
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def input(): return sys.stdin.readline().strip()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
M,N = map(int,input().rstrip().split(" "))
ans = False
for i in range(M,N + 1):
    if i % K == 0:
        ans = True
if(ans):
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    K=int(input())
    A,B=map(int,input().split())
    
    for i in range(1,1001):
        if A<=K*i and K*i<=B:
            print("OK")
            exit()
    
    print("NG")
    exit()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/bin/bash
''':'
docker run --rm -it -v $(cd $(dirname $0) && pwd):/vo:ro pypy:3-2.4.0 \
   /bin/bash -c "pypy3 /vo/$(basename $0) < /vo/input.txt"
exit $?
'''
import sys


def _i(): return int(sys.stdin.readline().strip())
def _ia(): return map(int, sys.stdin.readline().strip().split())


def main():
    k = _i()
    a, b = _ia()
    for i in range(a, b+1):
        if i % k ==0:
            return "OK"
    return "NG"

if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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:
#A
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())
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 sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    # 10**6
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     # 10**6
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp

#

class UnionFindEx:
    def __init__(self, size):
        #正なら根の番号、負ならグループサイズ
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   #負なら根
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    #サイズ更新
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'


def main():
    K=ii()
    A,B=mis()
    for i in range(A, B+1):
        if i%K == 0:
            print('OK')
            return
    print('NG')

main()

Submission status: Accepted

Solution code:
import sys
k = int(sys.stdin.readline())
a, b = map(int, sys.stdin.readline().split())
flag = False
while a <= b:
  if a % k == 0:
    flag = True
    break
  a += 1
if flag:
  print('OK')
else:
  print('NG')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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
    else:
        print("NG")
    return
main()

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
flag = 0
for i in range(a, b+1):
    if i % k == 0:
        flag = 1
if flag:
    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:
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 = [int(v) for v in input().split()]

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