TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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`.

Submission attempts (in order):
k = int(input())
a, b = map(int, input().split())
i = 1
flag = False

while i < b:
    dis = i * k
    if dis >= a and dis <= b:
        flag = True
        break


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


k = int(input())
a, b = map(int, input().split())
i = 1
flag = False


while i < b:
    if k == 1:
        flag = True
        break
    dis = i * k
    if dis >= a and dis <= b:
        flag = True
        break

    i += 1


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


Verdicts: Time Limit Exceeded

Accepted
Problem: 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`.

Submission attempts (in order):
import sys
A, B, N = map(int, input().split())

if N < B :
  print(int(N * A // B) - A * int(N // B))
  sys.exit()
else :
  print(((B-1) * A // B) - A * ((B-1) // B))


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

dist = A % K + B - A

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

Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
K = int(input())
A, B = map(int, input().split())

nK = K
n = 1
ans = "NG"
while(nK=<B):
  if nK >= A:
    ans = "OK"
    break
  n += 1
  nK = n * K
print(ans)

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

nK = K
n = 1
ans = "NG"
while(nK<=B):
  if nK >= A:
    ans = "OK"
    break
  n += 1
  nK = n * K
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
K = int(input())
A,B = map(int, input().split())

res = [i for i in range(A,B+1) if i%K==0]

if res == []:
  print('NG')
else:
  print('YES')

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

res = [i for i in range(A,B+1) if i%K==0]
print(res)

if res == []:
  print('NG')
else:
  print('OK')

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')
    break

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

res = [i for i in range(A,B+1) if i%K==0]

if res == []:
  print('NG')
else:
  print('OK')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
k=int(input())
a,b=map(int,input().split())

ans='NO'
for i in range(a,b+1):
  if i%k==0:
    ans='YES'

print(ans)

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)

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
A = int(input())
B, C = map(int,input().split())

for i in range(B, C):
  if i % A ==0:
    print("OK")
    break

print("NG")


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

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

print("NG")


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

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

print("NG")

A = int(input())
B, C = map(int,input().split())
flag = 1

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

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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
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)
    
  

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

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)
    
  

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
N = input()
A=input().split()

s=int(A[0])//int(N)
if (s+1)*N>A[1]:
    print('NG')
else:
    print('OK')

N = input()
A=input().split()

s=int(A[0])/int(N)
if (s+1)*N>A[1]:
    print('NG')
else:
    print('OK')

import math
N = int(input())

y<math.log(1.01, N/100)
print(y)

N = input()
A=input().split()

s=int(A[0])//int(N)
if int(A[0])%int(N)==0:
    print('OK')
else:
    if (s+1)*N>A[1]:
        print('NG')
    else:
        print('OK')


N = int(input())
A=input().split()

s=int(A[0])//N
if int(A[0])%N==0:
    print('OK')
else:
    if (s+1)*N>=A[1]:
        print('NG')
    else:
        print('OK')


N = input()
A=input().split()

s=int(A[0])//int(N)
if int(A[0])%int(N)==0:
    print('OK')
else:
    if (s+1)*N>=A[1]:
        print('NG')
    else:
        print('OK')


N = input()
A=input().split()

s=int(A[0])//int(N)
if int(A[0])%int(N)==0:
    print('OK')
else:
    if (s+1)*N=>A[1]:
        print('NG')
    else:
        print('OK')


N = int(input())
A=input().split()

s=int(A[0])//N
if int(A[0])%N==0:
    print('OK')
else:
    if (s+1)*N>int(A[1]):
        print('NG')
    else:
        print('OK')


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
import sys

def main():
    k = int(input())
    a,b = map(int, input().split())
    n = "OK"
    for ai in range(a,b+1):
        if ai%k==0:
            break
            sys.exit()
        else:
            n="NG"
    print(n)
    
if __name__ == "__main__":
    main()


def main():
    k = int(input())
    a,b = map(int, input().split())
    cnt = 0
    for ai in range(a,b+1):
        if ai%k==0:
            print("OK")
            break
        else:
            print("NG")
            break

if __name__ == "__main__":
    main()


import sys

def main():
    k = int(input())
    a,b = map(int, input().split())
    n = "OK"
    for ai in range(a,b+1):
        if ai%k==0:
            n = "OK"
            break
            sys.exit()
        else:
            n="NG"
    print(n)
    
if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
K=int(input())
A,B=map(int,input().split())
 
for i in range(A,B+1):
  if(i>=K and i%K==0):
    print("OK")
  
else:
  print("NG")

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

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

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

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

for i in range(A, min(A+K,B)):
  if math.floor(B / K == 0):
    print("OK")
else
  print("NG")
               

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
import sys
k = int(input())
a, b = map(int, input().split())

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
if __name__ == '__main__':
    k = input()
    k = int(k)
    ab = input()
    ab = ab.split()
    a = int(ab[0])
    b = int(ab[1])
    print(a,b)
    flag = False
    sum = k
    while k<b:
        if a<=k and k<=b:
            flag = True
        k += sum
        print(k)
    if flag:
        print("OK")
    else:
        print("NG")


if __name__ == '__main__':
    k = input()
    k = int(k)
    ab = input()
    ab = ab.split()
    a = int(ab[0])
    b = int(ab[1])

    i = 1
    flag = False
    while k<b:
        k = k*i
        if a<=k and k<=b:
            flag = True
        i += 1
    if flag:
        print("OK")
    else:
        print("NG")


if __name__ == '__main__':
    k = input()
    k = int(k)
    ab = input()
    ab = ab.split()
    a = int(ab[0])
    b = int(ab[1])
    flag = False
    sum = k
    while k<=b:
        if a<=k and k<=b:
            flag = True
        k += sum
    if flag:
        print("OK")
    else:
        print("NG")


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
K=int(input())
A,B=map(int,input().split())
a=0
if i in range(A,B+1):
  if i%k==0:
    a+=1
if a==1:
  print("OK")
else:
  print("NG")

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
k=int(input())
a,b=map(int,input().split())

for i in range(1,1001):
  k*=i
  if a<=k<=b:
    print('Yes')
    exit()
  else:
    continue
print('No')




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

for i in range(1,1001):
  n==k*i
  if a<=n<=b:
    print('OK')
    exit()
  else:
    continue

print('NG')




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

for i in range(1,1001):
  k*=i
  if a<=k<=b:
    print('OK')
    exit()
  else:
    continue

print('NG')




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

for i in range(1,1001):
  k*=i
  if a<=k<=b:
    print('Yes')
    break
  else:
    print('No')




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

for i in range(1,1001):
  n=k*i
  if a<=n<=b:
    print('OK')
    exit()
  else:
    continue

print('NG')




Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
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")

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

k = int(input())
l = list(map(int, input().split()))
if (l[1] - l[0]) >= k or l[0] % k == 0 or l[1] % k == 0:
  print("OK")
else:
  while l[0] != l[1]:
    l[0] += 1
    if l[0] % k == 0:
      print("OK")
      exit()
  print("NG")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
k = int(input())
a, b = map(int, input().split())
chk = False
for i in range(a+1, b+1):
    if i%k == 0:
        chk = True
        break
    else:
        pass
if chk == True:
    print('Yes')
else:
    print('No')

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
k = int(input())
a, b = map(int, input().split(' '))

num = k
while num < b:
    if a < num:
        print("Yes")
        exit()
    num += k

print("No")

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

num = k
while num <= b:
    if a <= num:
        print("OK")
        exit()
    num += k

print("NG")

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
K=int(input())
A,B=map(int,input().split())

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


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

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


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
import math

a=int(input())
li = list(map(int,input().split()))
if li[1]>=math.floor(1+li[0]/a)*a:
    print("NG")
else:
    print("OK")

import math

a=int(input())
#li = list(map(int,input().split()))
print(math.ceil(li[0]/a)*a)
if li[1]<math.ceil(li[0]/a)*a:
    print("NG")
else:
    print("OK")

import math
 
a=int(input())
li = list(map(int,input().split()))

if li[1]<math.ceil(li[0]/a)*a:
    print("NG")
else:
    print("OK")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
K=int(input())
A,B=map(int,input().split(" "))
a=B//K*K
print("OK" if B//K>A else "NG")

K=int(input())
A,B=map(int,input().split(" "))
baisu=B//K*K
print("OK" if  A <= baisu and baisu <= B else "NG")

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
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')

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
import math
import itertools

N,M,Q = map(int,input().split())
a =[0] * Q
b =[0] * Q
c =[0] * Q
d =[0] * Q
for i in range(Q):
    a[i] , b[i] , c[i] , d[i] = map(int,input().split())





def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))



All =[0] * M
for i in range(M):
    All[i] = i+1














ans = 0
#for A in itertools.combinations(All, N):
for A in itertools.product(All, repeat=N):
    
    
    
    #print(A)
    wa = 0
    for i in range(Q):
        #print(wa) 
        kari = A[b[i]-1] - A[a[i]-1]
        if kari == c[i]:
            wa = wa + d[i] 
    if ans < wa:
        ans = wa
    #print(ans) 
    #print(wa) 


print(ans)



























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

Awari = A // K
Bwari = -(-A // K)



if Awari == (Bwari-1):
    print("NG")
else:
    print("OK")


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







Awari = -(-A // K)



if B >= Awari*K:
    print("OK")
else:
    print("NG")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
def f(n):
    a=0
    b=100
    while True:
        a+=1
        b*=(100+a)/100
        b=int(b)
        if b>=n:
            break
    return a
  
print(f(n))

n=int((input())
def f(n):
    a=0
    b=100
    while True:
        a+=1
        b*=(100+a)/100
        b=int(b)
        if b>=n:
            break
    return a
print(f(n))

n=int(input())
a,b=map(int,input().split())
if a==b and if a%n==0:
    print("OK")
else:
     print("NG")
if (b-a+1)/n>=1:
  print("OK")
else:
    print("NG")

n=int(input())
def f(n):
    a=0
    b=100
    while True:
        a+=1
        b*=(100+a)/100
        if b>=n:
            break
    return a
  
print(f(n))

n=int(input())
a,b=map(int,input().split())
l=[abb for abb in range(a, b+1)]
kl=[]
for am in l:
    if am%n==0:
        kl.append(am)
if len(kl)>0:
    print("OK")
else:
    print("NG")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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`.

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

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

Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
k=int(input())
a,b=map(int, input().split())

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

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


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
k = int(input())
a, b = map(int, input().split())

v = 0
for i in range(1000):
    if a <= v <= b:
        print('YES')
        exit()
    v += k

print('NG')


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


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a = int(input())
b, c = map(int, input().split())
for i in range(b, c + 1):
  if i % a == 0:
    print("OK")
    break
  else: 
    print("NG")
    break

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
from itertools import combinations_with_replacement

def main():
    N, M, Q = map(int, input().split())
    qs = [list(map(int,input().split())) for _ in range(Q)]
    seq = [i for i in range(1,M+1)]
    C = combinations_with_replacement(seq, N)
    max_score = 0

    for A in C:
        A = sorted(A)
        score = 0
        for q in qs:
            if A[q[1]-1] - A[q[0]-1] == q[2]:
                score += q[3]
        max_score = max(score, max_score)
    print(max_score)

if __name__ == '__main__':
    main()

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

while True:
    if A <= K*i <=B:
        print('OK')
        break
    elif B < K*i:
        print('NG')
        break
    else:
        i += 1

Verdicts: Runtime Error

Accepted
Problem: 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`.

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


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


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
import math
A,B,N=map(int,input().split())
x=min(B-1,N)
ans=math.floor(A*x/B)-A*math.floor(x/B)
print(int(ans))



N,M,Q=map(int,input().split())
a=[]
b=[]
c=[]
d=[]
for i in range(Q):
  ta,tb,tc,td=map(int,input().split())
  a+=[ta]
  b+=[tb]
  c+=[tc]
  d+=[td]
maxs=0

def suuretu(n,m):
  if n>1:
    A=[]
    for i in range(1,9):
      for j in suuretu(n-1,i):
        A+=[10*i+j]
    return A
  else:
    A=[i for i in range(m,10)]
    return A
B=suuretu(N,1)
answer=0
for i in B:
  ans=0
  s=str(i)
  tmpl=[int(s[j]) for j in range(N)]  
  for k in range(Q):
    if tmpl[a[k]-1]-tmpl[b[k]-1]==c[k]:
      ans+=d[i]
  answer=max(answer,ans)
print(answer)

 


import math
A,B,N=map(int,input().split())
x=min(B-1,N)
ans=math.ceil(A*x/B)-A*math.ceil(x/B)
print(int(ans))



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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
k = int(input())
a, b=map(int,input().split())

fly=0
l=[]
while fly<b:
    fly += k
    l.append(fly)

print(l)
if l[-1]>=a and l[-1]<=b:
    print('OK')
else:
    print('NG')

    

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

fly=0
l=[]
while fly<b:
    fly += k
    l.append(fly)

if l[-1]>=a and l[-1]<=b:
    print('OK')
else:
    print('NG')

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

fly=0
l=[]
while fly<b:
    fly += k
    l.append(fly)
    
if len(l)==1:
    if k>=a and k<=b:
        print('OK')
    else:
        print('NG')
else:
    if l[-1]>=a and l[-1]<=b:
        print('OK')
    elif l[-2]>=a and l[-2]<=b:
        print('OK')
    else:
        print('NG')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

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


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


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
K = int(input())
A, B = map(int, input().split())

flag = False
for i in range(1000):
    if A <= i*K and i*K <= B:
        flag = True

if flag:
    print("Yes")
else:
    print("No")

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

flag = False
for i in range(1000):
    if A <= i*K and i*K <= B:
        flag = True

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
k = int(input());
i= list(map(int,input().split()));

a = int(i[0]);
b = int(i[1]) ;
flag = False;

while a <= b:
    if a % k == 0:
        flag = True;
        break;
    else:
        continue;
    a += 1;

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



k = int(input());
i= list(map(int,input().split()));

a = int(i[0]);
b = int(i[1]) ;
flag = False;


while(a <= b):
    if a % k == 0:
        flag = True;
        break;
    else:
        a += 1;

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



Verdicts: Time Limit Exceeded

Accepted
Problem: 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`.

Submission attempts (in order):
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


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
    elif b < k:
        print("NG")
        break


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


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
A, B, N = map(int,input().split())
ans = []

if N >= 100000:
    for i in range(N-200,N+1): 
        k = (A*i)//B - A*(i//B)
        ans.append(k)
        i = i + 1
    
else:
    for i in range(N//2,N+1):
        k = (A*i)//B - A*(i//B)
        ans.append(k)
        i = i + 1
    
print(max(ans))

A, B, N = map(int,input().split())
ans = []
for i in range(N//2,N+1):
    k = (A*i)//B - A*(i//B)
    ans.append(k)
    i = i + 1
    
print(max(ans))

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")
    else:
        i = i + 1

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
A, B, N = list(map(int,input().split()))
MAX = float('inf')*(-1)
a = int(A/B)
b = B
if N < B:
    MAX = (A * N // B) - A * (N // B)
else:
    MAX = (A * (B-1) // B) - A * ((B-1) // B)
print(MAX)

K = int(input())
A,B = list(map(int,input().split()))
a = A // K
b = B // K
flag = 0
for i in range(a,b+1):
    if A <= K * i and K * i <= B:
        flag += 1
if flag != 0:
    print('OK')
else:
    print('NG')

Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
K = input()
A,B = input().split()

k = int(K)
a = int(A)
b = int(B)

x = a // k
z = b // k

for i in range(z-x + 1):
  if a <= k*(x+i) and k*i <= b:
        print("OK")
        exit()
  print("NO")

K = input()
A,B = input().split()5

k = int(K)
a = int(A)
b = int(B)

x = a // k
z = b // k

for i in range(z-x + 1):
  if a <= k*i and k*i <= b:
    print("OK")
    exit()

K = input()
A,B = input()

k = int(K)
a = int(A)
b = int(B)

x = a // k
z = b // k

for i in range(z-x + 1):
  if a <= k*i and k*i <= b:
    print("OK")
    exit()

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

k = int(K)
a = int(A)
b = int(B)

x = a // k
z = b // k

for i in range(z-x + 1):
  if a <= k*i and k*i <= b:
    print("OK")
    exit()

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

k = int(K)
a = int(A)
b = int(B)

x = a // k
z = b // k

# print(x,z)
for i in range(z-x + 1):
#   print("fof---", k*(x+i))
  if a <= k*(x+i) and k*(x+i) <= b:
        print("OK")
        exit()
print("NG")

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
x=int(input())
m=100
cnt=0
while m<x:
  m+=m//100
  cnt+=1

print(cnt)


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


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
a = int(input())
b, c = map(int, input().split())

if a != 1:
    d = c - b
    if b <= d:
        print("OK")
    else:
        print("NG")
else:
    print("OK")

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

ans = int(c/a) * a

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
K=int(input())
A,B=map(int,input().split())
for i in range(1000):
    if (i+1)%K==0 and A <= (i+1):
        print('Yes')
        exit()
print('No')

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
k=int(input())
a,b=map(int,input().split())
if ((b-a)>=k):
  print('Yes')
elif (a%k==0) or (b%k==0):
  print('Yes')
else:
  print('No')

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

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


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

from math import floor
A, B , N = map(int, input().split())

Answer = floor((A*N)/B) - (A*floor(N/B))

print(Answer)

from math import floor
A, B , N = map(int, input().split())
List = []
for x in range(N+1):
    Answer = floor((A*x)/B) - (A*floor(x/B))
    List.append(Answer)
# print(List)
print(max(List))

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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
import itertools
N, M, Q = map(int, input().split())
m = list()
res = -100
for i in range(Q):
    n = list(map(int, input().split()))
    m.append(n)
l = [x for x in range(1, M + 1)]
p = itertools.combinations_with_replacement(l, N)
for p in p:
    total = 0
    for i in range(Q):
        num = 0
        a = m[i][0]
        b = m[i][1]
        A = p[a - 1]
        B = p[b - 1]
        C = B - A
        if m[i][2] == C:
            num = num + m[i][3]
            total = total + num
    if res < total:
        res = total
print(res)

import itertools
N, M, Q = map(int, input().split())
m = list()
res = -100
for i in range(Q):
    n = list(map(int, input().split()))
    m.append(n)
l = [x for x in range(1, M + 1)]
p = itertools.combinations_with_replacement(l, N)
for p in p:
    total = 0
    for i in range(Q):
        num = 0
        a = m[i][0]
        b = m[i][1]
        A = p[a - 1]
        B = p[b - 1]
        C = B - A
        if m[i][2] == C:
            num = num + m[i][3]
            total = total + num
    if res < total:
        res = total
print(res)

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

res = False
for i in range(1000):
    k = i * K
    if k >= A and k <= B:
        res = True

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
K = int(input())
A, B = list(map(int, input().split()))

ans = 'No'
for i in range(A, B+1):
    if not i % K: 
        ans = 'Yes'
        break
    
print(ans)

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
x=int(input())
a=100
for i in range(1,10000000000):
  a=int(a*1.01)
  if a>=x:
    print(i)
    break

a=int(input())
L,R = map(int,input().split())
b=L%a
if b==0:
  print('OK')
else:
  if L-b+a<=R:
    print('OK')
  else:
    print('NG')
  

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
K = int(input("K"))
A, B = [int(i) for i in input("A, B").split()]
C = B//K
if C*K >= A:
    print("OK")
else:
    print("NG")

K = int(input())
A, B = [int(i) for i in input().split()]
C = B//K
if C*K >= A:
    print("OK")
else:
    print("NG")

Verdicts: Wrong Answer

Accepted
Problem: 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`.

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

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

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

Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
k = int(input())
a,b = map(int,input().split())

flag = False

for i in range(b+1):
    if k * i >= a and k * i <= b:
        flag = True
if flag == True:
    print("Yes")
else:
    print("No")
    

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

flag = False

for i in range(b+1):
    if k * i >= a and k * i <= b:
        flag = True
if flag == True:
    print("OK")
else:
    print("NG")
    

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
k = int(input())
a,b = map(int,input().split())
if    a<=b and b<=1000 and k<=1000   :
  for i in range(a,b+1):
      if i % k == 0:
      	print('OK')
else :
  print('NG')


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

k = int(input())
a,b = map(int,input().split())
if  k>=a and k<=b and (b-a) >= k:
  print('OK')
else :
  print('NG')

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
k = int(input())
a, b = map(int, input().split())
if k < a:
    print("NG")
else:
    print("OK")

k = int(input())
a, b = map(int, input().split())
count = 0
for i in range(a, b+1):
    if i % k == 0:
        count += 1
    else:
        continue
if count != 0:
    print("OK")
else:
    print("NG")


Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
K = int(input())
A,B = map(int,input().split())
c = 0

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
from sys import stdin

def main():

    input = stdin.readline

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

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

    
if __name__ == "__main__":
    main()

from sys import stdin

def main():

    input = stdin.readline

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

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

    
if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
N,M=list(map(int, input().split()))
src=[i+1 for i in range(M*2+1)]
if N%2==0:
  for m in range(M//2):
    a=src[m]
    b=src[M-m]
    print('{} {}'.format(a,b))
  for m in range(M//2):
    a=src[M+1+m]
    b=src[-(m+1)]
    print('{} {}'.format(a,b))
else:
  for m in range(M//2):
    a=src[m]
    b=src[M-1-m]
    print('{} {}'.format(a,b))
  for m in range(M-(M//2)):
    a=src[M+m]
    b=src[-(m+1)]
    print('{} {}'.format(a,b))

N,M=list(map(int, input().split()))
src=[i+1 for i in range(M*2+1)]
if N%2==0:
  for m in range(M//2):
    a=src[m]
    b=src[M-m]
    print('{} {}'.format(a,b))
  for m in range(M//2):
    a=src[M+1+m]
    b=src[-(m+1)]
    print('{} {}'.format(a,b))
else:
  for m in range(M//2):
    a=src[m]
    b=src[M-1-m]
    print('{} {}'.format(a,b))
  for m in range(M-(M//2)):
    a=src[M+m]
    b=src[-(m+1)]
    print('{} {}'.format(a,b))

K = int(input())
a,b = list(map(int, input().split()))
n = 0
while True:
  n += 1
  if a <= n*K and n*K <= b:
    print('OK')
    break
  if b < n*K:
    print('NG')
    break

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
k = int(input())
line = input().split()

for i in range(int(line[0])+1,int(line[1])):
  if i%k ==0:
    print("OK")
    break
    
  else:
    print("NG")

k = int(input())
line = input().split()

for i in range(int(line[0]),int(line[1])+1):
  if i%k ==0:
    print("OK")
    break
    
  else:
    print("NG")

k = int(input())
line = input().split()
ans = "NG"
for i in range(int(line[0]),int(line[1])+1):
  if i%k ==0:
    ans = "OK"
    break
    
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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`.

Submission attempts (in order):
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")

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

Verdicts: Runtime Error

Accepted
Problem: 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`.

Submission attempts (in order):
K = int(input())
A, B = map(int,input().split())
n_A = A//K
n_B = B//K
if n_B - n_A >= 1:
  print("Yes")
else:
  print("No")
print(n_A, n_B)

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


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

K = int(input())
A, B = map(int,input().split())
n = 1
m = 1
for i in range(1100):
  if A <= K * i:
    n = i
for i in range(n, 1100):
  if B >= K * i:
    m = i - 1
if m - n >= 0:
  print("OK")
else:
  print("NG")

K = int(input())
A, B = map(int,input().split())
m = B // K
if m*K >= A:
  print("OK")
else:
  print("NG")


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted