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: Runtime Error

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

Submission status: Runtime Error

Solution code:
k = int(input())
l = list(map(int, input.split()))
if l[1] - l[0] >= k:
  print("OK")
elif l[0] == l[1]:
  if l[0] % k == 0:
    print("OK")
  else:
    print("NG")
else:
    print("NG")

Submission status: Runtime Error

Solution code:
S = int(input())
A,B = map(int,input().split())
check = false
while S <= B:
  S *= S
  if A <= S and B >= S:
    check = true
    break
if check:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

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

b = x//a
c = y//a

if c-b <= 1:
    print('NG')
elif:
    print('OK')

Submission status: Runtime Error

Solution code:
kk = K
while True:
    if kk >= A and kk <= 600:
        ans = 'OK'
        break
    elif  kk > 600:
        ans = 'NG'
        break
    else:
        kk = kk+K
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

n=int(input())
m,t=map(int,input().split())
if n<=t-m:
  print('OK')
else:
  print('NG')
elif n==1:
  print('OK')

Submission status: Runtime Error

Solution code:
if A>K:
  print('NG')
  elif K>B:
    print('NG')
    else:
      print('OK')

Submission status: Runtime Error

Solution code:
n=int(input())
temp=list(map(int,input().rstrip().split()))
a=temp[0]
b=temp[2]
if (b-a)>n :
    print("Yes")
else :
    print("No")

Submission status: Runtime Error

Solution code:
K = int(input())
A, B = map(int, input())
c = 0

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

Submission status: Runtime Error

Solution code:
if a % k == 0 or b % k == 0:
    print('OK')
else:
    if k == 1:
        print('OK')
    elif a // k < b // k:
        print('OK')
    else:
        print('NG')

Submission status: Runtime Error

Solution code:
n=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
        break
if flag==0:
    print("NG")
else:
    print("OK")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define FOR(i,a,b) for (int i=(a),for_##i##_max=(b);i<=(for_##i##_max);++i)
#define RFOR(i,a,b) for (int i=(a),rfor_##i##_min=(b);i>=(rfor_##i##_min);--i)
#define REP(i,n) for (int i=0,rep_##i##_len=(n);i<(rep_##i##_len);++i)
#define RREP(i,n) for (int i=(n)-1;i>=0;--i)

namespace { // Basics

template<typename T>
void chmin(T &x, T y) {
  x = std::min(x, y);
}

template<typename T>
void chmax(T &x, T y) {
  x = std::max(x, y);
}

template<typename T>
__attribute__((unused))
const auto minimum = static_cast<T const &(*)(T const &, T const &)>(std::min);

template<typename T>
__attribute__((unused))
const auto maximum = static_cast<T const &(*)(T const &, T const &)>(std::max);

template<typename T>
int cmp3(T lhs, T rhs) { return (lhs == rhs) ? 0 : (lhs > rhs) ? 1 : -1; }

template<typename T>
__attribute__((unused))
T constexpr infty = std::numeric_limits<T>::max / 3;
template<>
__attribute__((unused))
auto constexpr infty<int> = 1'100'100'100;
template<>
__attribute__((unused))
auto constexpr infty<long long int> = 100'500'400'300'200'100LL;

using lli = long long int;
using ld = long double;

} // namespace

using namespace std;

int main() {
  // cout << fixed << setprecision(10);

  int K, A, B;
  cin >> K >> A >> B;
  int x = (A - 1) / K * K + K;
  cout << (x <= B ? "OK":"NG") << "\n";
  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

if b-a>=k-1:
  print('OK')
else:
  print('NG')

Submission status: Runtime Error

Solution code:
a=int(input())
b,c=map(int,input())
if c-b>=c%a:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

if l[1] - l[0] >= k:
  print("OK")
elif l[0] == l[1]:
  if l[0] % k == 0:
    print("OK")
  else:
    print("NG")
else:
    print("NG")

Submission status: Runtime Error

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

if math.abs(a-b)+1 >= k:
    print("OK")
else:
    print("NG")

Submission status: Runtime Error

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: Runtime Error

Solution code:
k = int(input())
a,b = map(int, input().split())
if i%k == 0:
    print("OK")
    exit()
print("NG")

Submission status: Runtime Error

Solution code:
K = input()
line = input().split(" ")
a = False
for i in range(int(line[0]), int(line[1])):
  if i%K==0:
    print("OK")
    a = True
  	break
if a == False:
  print("NG")

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
K = int(input())
A, B = map(int,input().split())
n_A = A//K
n_B = B//K
if n_B - b_A >= 1:
  print("Yes"):
else:
  print("No")

Submission status: Runtime Error

Solution code:
k = int(input())
a,b = map(int, input().split())
    if i%k == 0:
        print("OK")
        exit()
print("NG")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = 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: Runtime Error

Solution code:
a, b = [int(x) for x in input().split()]
k = int(input())
found = False
for i in range(a, b + 1):
    if i % k == 0:
        found = True
if found: 
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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