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

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:
import sys
input = sys.stdin.readline

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:


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

    if a % k == 0:
        print('OK')
        return
    elif b % k == 0:
        print('OK')
        return

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

submit()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

def solve():
    K = int(input())
    A, B = map(int,input().split())
    if B//K - (A-1)//K >= 1:
        return 'OK'
    else:
        return 'NG'



if __name__ == '__main__':
    print(solve())

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())
print('OK' if (B // K) * K >= A 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'
    break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import math
    k = int(input())
    a,b = map(int,input().split())
    c = math.ceil(a/k)
    if c*k<=b:
        print('OK')
    else:
        print('NG')

if __name__ == "__main__":
    main()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print('OK' if ans 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:
K = int(input())
A, B = map(int,input().split())

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

Submission status: Accepted

Solution code:
K = int(input())
A, B = input().split()
A = int(A)
B = int(B)
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 = [int(n) for n in input().split()]

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

print(ans)

Submission status: Accepted

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

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

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

print("NG")

Submission status: Accepted

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

import sys
sys.setrecursionlimit(300000)


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

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:
import sys
def input(): return sys.stdin.readline().strip()


def main():
    K = int(input())
    a, b = map(int, input().split())
    if a % K == 0 or b % K == 0:
        print("OK")
    elif a // K != b // K:
        print("OK")
    else:
        print("NG")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

#print(K, A, B)

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(100000000)




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

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


main()

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
a,b = [int(x) for x in stdin.readline().rstrip().split()]
k = 0
while a <= b:
    if a % n == 0:
        k = 1
    a += 1
if k == 1:
    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:
K = int(input())
A, B = map(int, input().split())

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

else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

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:
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 golf(k, a, b):
  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(golf(k, a, b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    k = int(input())
    a,b = map(int,input().split())
    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:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

K = INT()
a, b = MAP()

x = ceil(a, K)
y = b // K
if x > y:
    print('NG')
else:
    print('OK')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K=int(input())
A,B=map(int,input().split())
smaller = A//K * K
bigger = smaller + K
if smaller >= A or bigger <= 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

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:
    ans = 'OK'
elif a % k == 0:
    ans = 'OK'
elif (b // k) - (a // k) > 0:
    ans = 'OK'
else:
    ans = 'NG'

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def input():
    return stdin.readline().strip()


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
K=input()
A,B=map(int, raw_input().split())
b=B/K
a=(A-1)/K
if 1<=b-a:
    print "OK"
else:
    print "NG"

Submission status: Accepted

Solution code:
import numpy as np

K=int(input())
AB=np.array(input().split(" "),dtype=np.int32)
A=AB[0]
B=AB[1]

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


if hantei ==0:
    print("NG")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
a,b=[int(x) for x in input().split()]
if a%k==0 or b%k==0:
    print("OK")
else:
    n1=a//k
    n2=b//k
    if n1!=n2:
        print("OK")
    else:
        print("NG")

Submission status: Accepted

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

if b//k-a//k > 0 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())

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

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(b + 1):
    if a <= k * i <= b:
        print("OK")
        break
else:
    print("NG")

Submission status: Accepted

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

flag = False
for i in range(1,1001):
    if a<=n*i<=b:
        flag=True
        break

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

Submission status: Accepted

Solution code:
def main(k,a,b):
    x = a // k
    y = b // k
    if x != y or a%k == 0 or b%k == 0:
        return "OK"
    return "NG"

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

Submission status: Accepted

Solution code:
K=int(input())
A,B=map(int, input().split())
for i in range(1,1001):
    if i%K==0 and A<=i and i<=B:
        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:
import sys
import itertools
if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
    
cnt=0    
k=int(input())
a,b=map(int,input().split())    
for i in range(a,b+1):
	if i%k==0:
		cnt+=1
		
if cnt > 0:
	print("OK")
else:
	print("NG")

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = "NG"
i = a
while i <= b:
  if i % k == 0:
    ans = "OK"
    break
  i += 1

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

Submission status: Accepted

Solution code:
def main():
    K = int(input())
    A, B = map(int, input().split())
    if B % K== 0 or A % K == 0:
        return True
    if (B//K) - (A //K) > 0:
        return True
    return False
if main():
    print('OK')
else:
    print('NG')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
a, b = map(int, input().split())
ans = False
for i in range(a, b + 1):
    if i % k is 0:
        ans = True

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

Submission status: Accepted

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

# A=list(map(int,input().split()))
#p=10**9+7
ma=[]
for i in range(A,B+1):
    if i%K==0:
        print("OK")
        exit()
print("NG")

Submission status: Accepted

Solution code:
#abc165_a.py
K = int(input())
I = input().split()
A = int(I[0])
B = int(I[1])
if(A//K == B//K and A % K != 0 and B % K != 0):
    print("NG")
else:
    print("OK")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
k = int(input())
a, b = map(int, input().split())
i = a // k
while k * i <= b:
    if k * i >= a:
        print('OK')
        sys.exit()
    i += 1
print('NG')

Submission status: Accepted

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

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

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(1000):
    if A <= K*i <= B:
        print("OK")
        exit()
print("NG")

Submission status: Accepted

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

Submission status: Accepted

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


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

    ok = "NG"

    for i in range(A, B+1):
        if i % N == 0:
            ok = "OK"
    
    print(ok)


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

Submission status: Accepted

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

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

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

    print(ret)

if __name__ == '__main__':
    main()

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
import math
import fractions
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**7)

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


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

Submission status: Accepted

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

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

print("OK" if out else "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
    if i == B:
        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


def solve(K: int, A: int, B: int):
    i = 0
    while True:
        if A <= K * i and K * i <=B:
            print('OK')
            return
        if K*i>1000:
            break
        i+=1
    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 = list(map(int, input().split()))

flag = False
for i in range(1, 1001):
    if a <= k * i and k * i <= b:
        flag = True
        break
        
print("OK" if flag else "NG")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def check():
    for i in range(1, 1001):
        if A <= K*i <= B:
            return True
    return False

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

Submission status: Accepted

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


def main():
    K = int(input().rstrip())
    a, b = map(int, input().split())
    f = 0
    for i in range(a, b+1):
        if i % K == 0:
            f = 1
            break

    print(['NG', 'OK'][f])

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

Submission status: Accepted

Solution code:
n = int(input())
x,y = map(int,input().split())
flg = "NG"
for i in range(x,y+1):
	if i%n==0:
		flg = "OK"
		break
	else:
		pass
print(flg)

Submission status: Accepted

Solution code:
s=int(input())
t=list(map(int,input().split()))
a=0
for i in range(t[0],t[1]+1):
  if i%s==0:
    a=1
if a==1:
  print('OK')
else:
  print('NG')

Submission status: Accepted

Solution code:
k = int(input())
a,b = map(int,input().split())
if a % k == 0 or b % k == 0 or k * (a//k + 1) <= b:
    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:
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:
#!/usr/bin/env python3
import sys


def solve(K: int, A: int, B: int):
    i = 1
    while K * i <= B:
        if K * i >= A:
            print("OK")
            return
        i += 1
    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(1001):
    if i % k == 0 and a <= i and i <= b:
        print('OK')
        exit()
print('NG')

Submission status: Accepted

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

print('NG')

Submission status: Accepted

Solution code:
K = int(input())
flag = 0
A, B = map(int, input().split())
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 = map(int,input().split())
ans = 'NG'
for i in range(1000):
  if a <= i*k <= b:
    ans = 'OK'
print(ans)

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

flag = 0

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
import math

def solve(K: int, A: int, B: int):
    a = math.ceil(A / K)
    b = math.floor(B / K)

    if b >= a:
        print("OK")
    else:
        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:
import sys
input = sys.stdin.readline

def main():
    n = int(input())
    a, b = map(int, input().split())
    flag = False
    for i in range(a,b+1):
        if i % n == 0:
            flag = True
            break

    if flag:
        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())
    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:
#!/usr/bin/env python3
import bisect
import heapq
import itertools
import math
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from math import gcd
from operator import add, itemgetter, mul, xor
def cmb(n,r,mod):
  bunshi=1
  bunbo=1
  for i in range(r):
    bunbo = bunbo*(i+1)%mod
    bunshi = bunshi*(n-i)%mod
  return (bunshi*pow(bunbo,mod-2,mod))%mod
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def I(): return int(input())
def LI(): return list(map(int,input().split()))
def MI(): return map(int,input().split())
def LLI(n): return  [list(map(int, input().split())) for _ in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    K = int(input())  # 文字列または整数(一変数)
    A, B = map(int, input().split())

    for i in range(1,1001):
        num = K*i
        if num >= A and num <= B:
            print("OK")
            return
        if num > B:
            print("NG")
            return

    print("NG")
    return

if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))


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

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