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:
'''
.append(要素) リストに要素を追加
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前

sort()
sorted(reverse=true)

配列の初期化
配列名=[a]*n+[b]*m

Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
from functools import reduce
from operator import mul
from collections import Counter
import itertools
import fractions

k = int(stdin.readline().rstrip())
t = stdin.readline().rstrip().split()
a = int(t[0])
b = int(t[1])
tes = False

for el in range(a, b+1):
    if el % k == 0:
        tes = True
        print('OK')
        break
if not tes:
    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 numpy as np
import math
import scipy as sp
import queue
import collections

MOD = 10 ** 9 + 7
INF = 10 ** 9

def main(kwargs):
    k = kwargs["k"]
    a = kwargs["a"]
    b = kwargs["b"]
    res = 'NG'

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

    return res

if __name__ == "__main__":
    kwargs = {}

    cin = input().split()
    #kwargs["n"] = cin[0]
    #kwargs["n"], kwargs["k"] = cin
    kwargs["k"] = [int(i) for i in cin][0]
    #kwargs["n"], kwargs["k"] = [int(i) for i in cin]

    cin = input().split()
    #kwargs["n"] = cin[0]
    #kwargs["n"], kwargs["k"] = cin
    #kwargs["k"] = [int(i) for i in cin][0]
    kwargs["a"], kwargs["b"] = [int(i) for i in cin]

    cout = main(kwargs)
    print(cout)

Submission status: Accepted

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

Submission status: Accepted

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

kk = [K*i for i in range(1000)]

for k in kk:
    if k >= A and k <=B:
        print("OK")
        break
else:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
flag = 0
for i in range(a,b+1,1):
  if i % k ==0 and flag ==0:
    print('OK')
    flag = 1
if flag ==0:
  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:
from math import ceil
k = int(input())
a,b = map(int,input().split())
if ceil(a/k)*k <= b:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    a, b = map(int, input().split())
    flg = 0
    for i in range(a, b + 1):
        if i % k == 0:
            flg += 1

    if flg > 0:
        print('OK')
    else:
        print('NG')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
if A // K < B // K or A % K == 0  or B % K == 0:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

for i in range(a, b+1):
    num.append(i%k == 0)


if any(num):
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

K =int(sys.stdin.readline())
A, B = map(int, sys.stdin.readline().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print("NG")

Submission status: Accepted

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

flag = 0

while 1:
    if A > B:
        flag = 1
        break
    if A%K == 0:
        print('OK')
        break
    A += 1

if flag:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print("OK" if fg else "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:
data = input()
data2 = input().split()
k = int(data)
a = int(data2[0])
b = int(data2[1])

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

    if b-a > k:
        print('OK')
        return

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

        print('NG')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

k = int(input())
a, b = [int(i) for i in input().split()]
print(golf(k, a, b))

Submission status: Accepted

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

Submission status: Accepted

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


def solve(K: int, A: int, B: int):
    if A % K == 0: return 'OK'
    if B % K == 0: return 'OK'
    if A % K > B % K: return 'OK'
    if B - A >= K: return 'OK'
    return 'NG'


# 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
    print(solve(K, A, B))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

flag = 0
while(True):
  if b % a == 0:
    flag=1
    break
  if b == c:
    break
  b += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def main():
    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')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    n, m = map(int, input().split())
    a = m // k
    if n <= a * k:
        print('OK')
    else:
        print('NG')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
a,b=map(int,input().split())
import numpy as np
for ii in np.arange(a,b+1):
  if ii%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")
    break
  else:
    if i == b:
      print("NG")

Submission status: Accepted

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

Submission status: Accepted

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


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

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip() # ignore trailing spaces
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))


def main():
    k = ni()
    a,b = na()
    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())

cnt = 0

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
jdg = False
for i in range(A, B+1):
    if i % K == 0:
        jdg = True
        break
print('OK' if jdg else '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())
if a % k == 0 or b % k == 0:
    ans = 'OK'
else:
    a //= k
    b //= k
    if a == b:
        ans = "NG"
    else:
        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:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

K = ir()
A, B = lr()
left = -(-A//K)
right = B // K
bl = left <= right
if A % K == 0 or B % K == 0:
    bl = True
print('OK' if bl else 'NG')

Submission status: Accepted

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

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

print('NG')

Submission status: Accepted

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

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

Submission status: Accepted

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


k = int(input())
a,b = (int(x) for x in 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:
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 main():
    k = int(input())
    a, b = [int(e) for e in input().split()]

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

    print('NG')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K = int(input())
AB = [int(i) for i in input().split(" ")]
flag = 0
for i in range(AB[0],AB[1]+1):
    if i%K == 0:
        flag = 1
        break

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

Submission status: Accepted

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

if x >= 1:
  print("OK")
else:
  print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2020-05-02
a = int(input())
b, c = map(int, input().split())
ans = 0
for i in range(b, c + 1):
    if i % a == 0:
        ans += 1
if ans >= 1:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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()))
v1 = (a+k-1)//k
v2 = (b)//k
# print(v1,v2)
if(v1<=v2):
  print("OK")
else:
  print("NG")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(2 * 10**6)


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


def main():
    K = int(input())
    A, B = inpl()

    print("OK" if K * ((A + K - 1) // K) <= B else "NG")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a, b = map(int, input().split())
if (a <= b//n*n)and(b//n*n <= 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):
    #print(i)
    if i%k==0:
        print("OK")
        break
else:
    print("NG")

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    k=II()
    a,b=MI()
    for x in range(a,b+1):
        if x%k==0:
            print("OK")
            exit()
    print("NG")

main()

Submission status: Accepted

Solution code:
K = int(input())
A, B = map(int, input().split())
x = A // K
y = B // K
p = A % K
q = B % K
ans = "NG"
if (p * q == 0):
  ans = "OK"
elif ((y - x) > 0) :
  ans = "OK"
print(ans)

Submission status: Accepted

Solution code:
from math import ceil

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

inputLine=input()
K=int(inputLine)

inputLine=input()
A=int(inputLine.split(" ")[0])
B=int(inputLine.split(" ")[1])

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

print("NG")

Submission status: Accepted

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


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


func(n, a, b)

Submission status: Accepted

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

cnt = 1
while(1):
    l = k * cnt
    if(a <= l and l <= b):
        print("OK")
        break
    elif(b < l):
        print("NG")
        break
    cnt+=1

Submission status: Accepted

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


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


print('NG')

Submission status: Accepted

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

def main():
    K, A, B = map(int, read().split())
    for i in range(A, B +1):
        if i % K == 0:
            print('OK')
            break
    else:
        print('NG')
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

k= int(input())
a,b = [int(_) for _ 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:
n = int(input())
m,l = map(int,input().split())

f = False

for i in range(m,l+1):
    if i % n == 0:
        f = True
        break

if f == False:
    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 n in range(A, B+1):
        if n % 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:
k =int(input())
a,b=map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
A = [int(x) for x in input().split()]
ans=0
for i in range(A[0],A[1]+1):
  if i%n==0:
    ans=1
    
if ans==1:
  print("OK")
else:
  print("NG")

Submission status: Accepted

Solution code:
from collections import defaultdict
from math import gcd
import time
import sys
from collections import Counter
import itertools
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
start = time.time()
# N = list(map(int, input()))[::-1]
N = int(input())
A, B = map(int, input().split())

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

Submission status: Accepted

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

for i in range(1000):
    if a <= k*i <= b:
        print("OK")
        exit()

print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


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

    t = k
    while t <= 1000:
        if t >= a and t <= b:
            print('OK')
            return
        t += k
    print('NG')


main()

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:
        print("OK")
        f = True
        break

if not f:
    print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k,a,b=map(int,open(0).read().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 = 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:
# -*- coding: utf-8 -*-
"""
Created on Sat May  2 20:55:33 2020

@author: Kanaru Sato
"""

k = int(input())
a,b = list(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:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

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

ans = "NG"

if a//k != b // k:
    ans = "OK"
elif a % k == 0:
    ans = "OK"

print(ans)

Submission status: Accepted

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

count = 0
for i in range (1000):
    K_big = K*i
    if (K_big<=B) & (A<=K_big):
        count +=1
        
        
if count >=1:
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

import math
a = math.ceil(A/K)
b = math.floor(B/K)

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

Submission status: Accepted

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

print(['NG','OK'][b//K-(a-1)//K>0])
#print(b//K-(a-1)//K)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def input_int_list():
    return [int(thing) for thing in input().split(" ")]

def int_input():
    return int(input())


def print_ans(string):
    print(string)
    exit()

def yes():
    print("Yes")
    exit()

def no():
    print("No")
    exit()



K=int_input()
A,B=input_int_list()

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

print_ans("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 = list(map(int,input().split()))
judge = False
# print(k,a,b)
for i in range(a,b+1):
    # print(i%k)
    if i % k == 0:
        judge = True
if judge:
    print('OK')
else:
    print('NG')

Submission status: Accepted

Solution code:
#author: raghav_0901
from math import *

mod = (10**9) + 7


def _in():
    return [int(x) for x in input().split(' ')]


if __name__ == "__main__":
    k = int(input())
    a, b = _in()
    fl = False
    for i in range(a, b + 1):
        if(i % k == 0):
            print("OK")
            fl = True
            break
    if(not fl):
        print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k=int(input())

a,b=input().split()
a=int(a)
b=int(b)
x=b//k
if x*k>=a:
    print("OK")
else:
    print("NG")

Submission status: Accepted

Solution code:
import math
import collections

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

    count = K
    while True:
        if (count >= A) and (count <= B):
            print("OK")
            break
        elif count > B:
            print("NG")
            break
        count += K

    return 0

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a, b = map(int, input().split())
c = int(a / n) if a % n == 0 else int(a / n) + 1

if a <= c * n <= b:
    print("OK")
else:
    print("NG")

Submission status: Accepted

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

print(judge(k,a,b))