TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
import sys
cakes = 4
donuts = 7
amount = int(input())
i = 0

while amount >= i * donuts:
    i += 1
    x = 0

    if amount == i * donuts:
        print('yes')
        sys.exit()

    while amount - ( i * donuts ) >= x * cakes:
        if amount - ( i * donuts ) == x * cakes:
            print('yes')
            sys.exit()

print('No')

import sys
cakes = 4
donuts = 7
amount = int(input())

if amount < 4 :
    print('No')
    sys.exit()

for i in range( int( amount / 4 ) +1 ):
    if amount == i * cakes:
        print('Yes')
        sys.exit()

    for x in range( int( amount / 7 ) +1 ):
        if amount - (i * cakes ) == x * donuts:
            print('Yes')
            sys.exit()

print('No')

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
import sys
N = int(input())
for i in range(int(N/4) + 1):
    amount = i * 4
    for j in range(int(N/7) + 1):
        amount += 7
        if(amount == 100):
            print('Yes')
            sys.exit()
print('No')


import sys
N = int(input())
for i in range(int(N/4)):
    amount = (i + 1) * 4
    for j in range(int(N/7)):
        amount += 7
        if(amount == 100):
            print('Yes')
            sys.exit()
print('No')


import sys
N = int(input())
for i in range(int(N/4) + 1):
    amount = (i + 1) * 4
    for j in range(int(N/7) + 1):
        amount += 7
        if(amount == 100):
            print('Yes')
            sys.exit()
print('No')


import sys
N = int(input())
for i in range(int(N/4)):
    amount = i * 4
    for j in range(int(N/7)):
        if(j == 0):
            pass
        else:
            amount += 7
        if(amount == N):
            print('Yes')
            sys.exit()
print('No')


import sys
N = int(input())
for i in range(int(N/4) + 1):
    amount = i * 4
    for j in range(int(N/7) + 1):
        if(j == 0):
            pass
        else:
            amount += 7
        if(amount == N):
            print('Yes')
            sys.exit()
print('No')


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())
donuts = 7
cakes = 4
answer = 0
def calc1():
  for a in range(0,26):
    for b in range(0,26):
      if donuts * a + cakes * b == N:
        return 'Yes'
      elif donuts * a + cakes * b  > N:
        break
  return 'No'

calc1()

N = int(input())
donuts = 7
cakes = 4
answer = 0
def calc1():
  for a in range(0,26):
    for b in range(0,26):
      if donuts * a + cakes * b == N:
        return 'Yes'
      elif donuts * a + cakes * b  > N:
        break
  return 'No'

print(calc1())

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
if n > 4:
	if n % 4 == 0 or n % 7 == 0 or n % 28 == 0 or n % 11 == 0:
  		print("Yes")
    else:
      print("No")
else:
	print("No")

def ans():
  n = int(input())
  for a in range(n // 4 + 1):
    for b in range(n // 7+ 1):
      if 4 * a + 7 * b == n:
        print("Yes")
        return
  print("No")

ans()

Verdicts: Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N=int(input())
for i in range(N//4):
  for j in range(N//7):
    if 4*i+7*j==N :
      print("Yes")
      exit()
print("No")

N=int(input())
for i in range(N//4+1):
  for j in range(N//7+1):
    if 4*i+7*j==N :
      print("Yes")
      exit()
print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
def fits(N):
    answer = 'No'
    for cake in range(0,100,4):
        for donut in range(0,100,7):
            if cake + donut is N:
                answer = 'yYs'
    return answer
if __name__ == '__main__':
    N = int(input())
    print(fits(N))

#!/usr/bin/env python3
def fits(N):
    if N < 4:
        return 'no'
    else:
        for cake in range(0,100,4):
            for donut in range(0,100,7):
                if cake + donut is N:
                    return 'yes'
if __name__ == '__main__':
    N = int(input())
    print(fits(int(N)))

def fits(N):
    answer = 'no'
    for cake in range(0,100,4):
        for donut in range(0,100,7):
            if cake + donut is N:
                answer = 'yes'
    return answer
if __name__ == '__main__':
    N = int(input())
    print(fits(N))

def fits(N):
    if N < 4:
        return 'no'
    else:
        for cake in range(0,100,4):
            for donut in range(0,100,7):
                if cake + donut is N:
                    return 'yes'

if __name__ == '__main__':
    print(fits(int(N)))

def fits(N):
    answer = 'No'
    for cake in range(0,100,4):
        for donut in range(0,100,7):
            if cake + donut is N:
                answer = 'Yes'
    return answer
if __name__ == '__main__':
    N = int(input())
    print(fits(N))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())

amount = 0
j      = False

for i in range(1, 101) :
    for j in range(1, 101) :
        amount = 4 * i + 7 * j

        if amount == N:
            j = True
            break


if j == True :
    print('Yes')
else :
    print('No')
    

N = int(input())

amount = 0
result = False

i_max = int(N/4) + 1
y_max = int(N/7) + 1


for i in range(0, i_max) :
    for j in range(0, y_max) :
        cake   = 4 * i
        donuts = 7 * j
        amount = cake + donuts

        if amount == N:
            result = True
            break

    else:
        continue
    break

    
if result == True :
    print('Yes')
else :
    print('No')
    
    

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
x = 1+n//4
q = ['No','Yes']
s = 0
for a in range(x):
	if (n-a*4)%7==0:
    	s = 1
        
print(q[s])

n = int(input())
x = 1+n//4
q = ['No','Yes']
s = 0
for a in range(x):
  if (n-a*4)%7==0:
    s += 1
    break
        
print(q[s])

Verdicts: Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
num = int(input())
for i in range(11):
    if num - (4*i +7*(10-i)) == 0:
        print("Yes")
        exit()
else:
    print("No")

num = int(input())
lis = []
for i in range(26):
    for m in range(15):
        lis.append((4*i)+(7*m))
print("Yes" if num in lis else "No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = list(map(int, input().split()))
S = N%4

if S == 0 or S == 3:
    print("Yes")
else:
    print("No")

N = list(map(int, input().split()))
S = N%4

if S == 0:
    print("Yes")
elif S == 3::
    print("Yes")
else:
    print("No")

N = input()

if N%4 == 0:
    print("Yes")
    exit()

if N%7 == 0:
    print("Yes")
    exit()

S = N%7
K = (S%4)%2

if K == 0:
    print("Yes")
else:
    print("No")


N = int(input())

if N%4 == 0:
    print("Yes")

if N%7 == 0:
    print("Yes")

if N%4 == 1:
    if N < 29:
        print("No")
    else:
        print("Yes")

if N%4 == 2:
    if N < 11:
        print("No")
    elif N < 15:
        print("No")
    else:
        print("Yes")

    
if N%4 == 3:
    if N > 10:
        print("Yes")
    else:
        print("N

N = list(map(int, input().split()))

if N%4 == 0:
    print("Yes")
    exit()

if N%7 == 0:
    print("Yes")
    exit()

S = N%7
K = (S%4)%2

if K == 0:
    print("Yes")
else:
    print("No")


N = list(map(int, input().split()))
S = N%4

if S == 0:
    print("Yes")
elif S == 3:
    print("Yes")
else:
    print("No")

N = int(input())

if N%4 == 0:
    print("Yes")

if N%4 == 1:
    if N < 21:
        print("No")
    else:
        print("Yes")

if N%4 == 2:
    if N < 14:
        print("No")
    else:
        print("Yes")


if N%4 == 3:
    if N < 7:
        print("No")
    else:
        print("Yes")


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())
maxcake = N // 4
maxdonut = N //7
for i in range(maxcake):
    for j in range(maxdonut):
        if i*4 + j*7 == N:
            print("Yes")
            exit()
print("No")

N = int(input())
maxcake = N // 4 +1
maxdonut = N //7 +1
for i in range(maxcake):
    for j in range(maxdonut):
        if i*4 + j*7 == N:
            print("Yes")
            exit()
print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())
flg = 0

for i in range(N//7):
  for j in range(N//4):
    money = 7*i + 4*j
    if money == N:
      flg = 1
      break
      
if flg == 1:
  print('Yes')
else:
  print('No')

N = int(input())
flg = 0

for i in range(N//7+1):
    for j in range(N//4+1):
        money = 7*i + 4*j
        print(money)
        if money == N:
            flg = 1
            break
      
if flg == 1:
  print('Yes')
else:
  print('No')


N = int(input())
flg = 0

for i in range(N//7+1):
    for j in range(N//4+1):
        money = 7*i + 4*j
        if money == N:
            flg = 1
            break
      
if flg == 1:
  print('Yes')
else:
  print('No')


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())
l = []

for i in range(int(N/4)):
    for j in range(int(N/7)):
        if i * 4 + j * 7 <= 100:
            l.append(i * 4 + j * 7)

if N in l:
    print("Yes")
else:
    print("No")

N = int(input())
l = []


for i in range(int(N/4 + 1)):
    for j in range(int(N/7 + 1)):
        if i * 4 + j * 7 <= 100:
            l.append(i * 4 + j * 7)

if N in l:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
import sys

N=int(input())

for i range(101):
  for j in range(101):
    if 4*i + 7*j == N:
      print('Yes')
      sys.exit()
else:
  print('No')

import sys
 
N=int(input())
 
for i in range(101):
  for j in range(101):
    if 4*i + 7*j == N:
      print('Yes')
      sys.exit()
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
# ABC105B - Cakes and Donuts
def main():
    N = int(input())
    flg = N % 4 == 0 or N % 7 == 0
    if flg:
        print("Yes")
    elif N < 4:
        print("No")
    else:
        while N > 7:
            N -= 4
            if flg:
                print("Yes")
                return
        print("No")


if __name__ == "__main__":
    main()

# ABC105B - Cakes and Donuts
def main():
    N = int(input())
    if N % 4 == 0 or N % 7 == 0:
        print("Yes")
    elif N < 4:
        print("No")
    else:
        while N > 7:
            N -= 4
            if N % 4 == 0 or N % 7 == 0:
                print("Yes")
                return
        print("No")


if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
for a in range(n//4):
  for b in range(n//7):
    if n == 4*a+7*b:
      print('Yes')
      break
print('No')
    

n = int(input())
for a in range(n//4+1):
  for b in range(n//7+1):
    if n == 4*a+7*b:
      print('Yes')
      exit()
print('No')
    

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N=int(input())

for i in range(N//4+1):
  for j in range(N//7+1):
    if 4*i+7*j==N:
      print("Yes")
      break
else:
  print("No")

N=int(input())

for i in range(N//4+1):
  for i in range(N//7+1):
    if 4*i+7*j==N:
      print("Yes")
      break
else:
  print("No")

N=int(input())
flag=False

for i in range(N//4+1):
  if flag==False:
    for j in range(N//7+1):
      if 4*i+7*j==N:
        print("Yes")
        flag=True
        break


if flag==False:
  print("No")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())

torf = False

for i in range(0, n//4 + 1):
    print(n-i*4)
    if (n - i * 4) % 7 == 0:
        torf = True
        break
        
if torf:
    print("Yes")
else :
    print("No")



n = int(input())

torf = False

for i in range(0, n//4 + 1):
    if (n - i * 4) % 7 == 0:
        torf = True
        break
        
if torf:
    print("Yes")
else :
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
def cal_ans(num):
    for num1 in range(25):
        for num2 in range(15):
            if num1 * 4 + num2 * 7 == num:
                return "yes"
    return "no"


if __name__ == '__main__':
    N = int(input())
    print(cal_ans(N))


def cal_ans(_N):
    for num1 in range(25):
        for num2 in range(15):
            if num1 * 4 + num2 * 7 == _N:
                return "yes"
    return "no"


if __name__ == '__main__':
    array = list(map(int, input().split()))
    N = array[0]
    print(cal_ans(N))


def cal_ans(num):
    for num1 in range(25):
        for num2 in range(15):
            if num1 * 4 + num2 * 7 == num:
                return "Yes"
    return "No"


if __name__ == '__main__':
    N = int(input())
    print(cal_ans(N))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
#Cakes and Donuts
n = int(input())
print('Yes' if[1 for a in range(n//7+1) for b in range(n//4+1) if a*7+b*4=n] else 'No')

n = int(input())
print("Yes" if [1 for a in range(n//7+1) for b in range(n//4+1) if a*7+b*4 == n] else "No")

Verdicts: Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())
key = 0
for i in range(int(N / 4)):
    if (N - 4 * N) % 7 == 0:
        key = 1
        break
if key == 1:
    print("Yes")
else:
    print("No")


N = int(input())
key = 0
for i in range(int(N / 4) + 1):
    if (N - 4 * i) % 7 == 0:
        key = 1
        break
if key == 1:
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
ans = "No"
for i in range(n // 7 + 1):
  if (n - i*7) % 4 == 0:
    ans == "Yes"
    break
print(ans)


n = int(input())
ans = "No"
for i in range(n // 7 + 1):
  print(n - i*7)
  if (n - i*7) % 4 == 0:
    ans = "Yes"
print(ans)


n = int(input())
ans = "No"
for i in range(n // 7):
  if (n - (i+1)*7) % 4 == 0:
    ans == "Yes"
print(ans)

n = int(input())
ans = "No"
for i in range(n // 7 + 1):
  if (n - i*7) % 4 == 0:
    ans = "Yes"
    break
print(ans)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
ans = 0
for i in range(30):
    for j in range(20):
        if 4*i + 7*j == n :
            ans +=1 
print(ans)

n = int(input())
ans = 0
for i in range(30):
    for j in range(20):
        if 4*i + 7*j == n :
            ans +=1 
if ans:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
import sys

N = int(input())

for i in range((N+1)//4):
    for j in range((N+1)//7):
        if N == 4*i+7*j:
            print ("Yes")
            sys.exit()
    
print("N0")

import sys

N = int(input())

for i in range(N+1):
    for j in range(N+1):
        if N == 4*i+7*j:
            print ("Yes")
            sys.exit()
    
print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
if n==0:
    print(0)
    exit()
x = n
ans = []
while x!=1:
    if x%2==0:
        ans.append("0")
    else:
        ans.append("1")
        x -= 1
    x = x//(-2)
ans.append("1")
print("".join(ans[::-1]))

n = int(input())
i = 0
while n-4*i>=0:
    if (n-4*i)%7==0:
        print("Yes")
        exit()
    else:
        i+=1
print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n= int(input())
a=4
b=7
d= n//a
if n % b ==0 or n % a ==0:
    print("Yes")
elif n < a:
    print("No")
else:
    for x in range(d+1):
        for y in range(d+1):
            nn= a*int(x) + b*int(y)
            if nn == n:
                print("Yes")
                break
            else:
                continue

            if nn > n:
                print("No")
                break
            else:
                continue

        if nn == n:
            break
        elif nn > n:
            print("No")
            break
        else:
            continue

n=int(input())

p=0
for y in range(n//7+1):
  x=n/4 - 7*y/4
  if x.is_integer() == True and x>-1:
    p += 1
    break
  else:
    continue
if p == 1:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n=int(input())
i=0
while True:
    j=0
    while True:
        if i*4+j*7==n:
            print("Yes")
            exit()
        j+=1
        if i*4+j*7>n:
            break
    i+=1
    if i*4+j*7>n:
        break
print("No")


n=int(input())
i=0
while True:
    j=0
    if i*4+j*7>n:
        break
    while True:
        if i*4+j*7==n:
            print("Yes")
            exit()
        j+=1
        if i*4+j*7>n:
            break
    i+=1

print("No")


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
c = 4 * 7
n = int(input()) % c
i = n
while 0 < i:
    j = i
    while 0 < j:
        print(i, j)
        j -= 7
        if j == 0:
            print("Yes")
            exit()
    i -= 4
    if i == 0:
        print("Yes")
        exit()
print("No")


c = 4 * 7
n = int(input())
if n == c:
    print("Yes")
    exit()
m = n % c
i = n
while 0 < i:
    j = i
    while 0 < j:
        j -= 7
        if j == 0:
            print("Yes")
            exit()
    i -= 4
    if i == 0:
        print("Yes")
        exit()
print("No")


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())

isExist = False
for i in range(int(n / 7)):
  for j in range(int(n / 4)):
    if (7 * i + 4 * j == n):
      isExist = True
      break
if isExist:
  print("Yes")
else:
  print("No")

n = int(input())
if (n % 11 % 4 % 7):
  print("Yes")
else:
  print("No")

n = int(input())
 
isExist = False

for i in range(int(n / 7) + 1):
  for j in range(int(n / 4) + 1):
    if (7 * i + 4 * j == n):
      isExist = True
      break

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
flag = False
for x in range(100):
    for y in range(100):
        flag = (4*x+7*y==n)
if flag:
    print("Yes")
else
    print("No")

n = int(input())
flag = False
for x in range(100):
    for y in range(100):
        if 4*x+7*y==n:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
for q in range(0, n, 7):
    if q == 0:
        continue
    if q % 4 == 0:
        print("Yes")
        exit(0)
print("No" if (n % 4 != 0) and (n % 7 != 0) else "Yes")

n = int(input())
for q in range(0, n, 7):
    if q == 0:
        continue
    if (n - q) % 4 == 0:
        print("Yes")
        exit(0)
print("No" if (n % 4 != 0) and (n % 7 != 0) else "Yes")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())
x = N//7
count = 0
for i in range(x+1):
  y = N - 7*i
  print(y)
  if y % 4 == 0:
    count += 1
if count != 0:
  print('Yes')
else:
  print('No')

N = int(input())
x = N//7
count = 0
for i in range(x+1):
  y = N - 7*i
  if y % 4 == 0:
    count += 1
if count != 0:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
import sys
N = int(input())
ans = 0
def dfs(n):
    print(n)
    if n == N:
        sys.exit()
    if n > N:
        return

    dfs(n+4)
    dfs(n+7)

dfs(0)
print('No')

import sys
N = int(input())
ans = 0
def dfs(n):
    if n == N:
        sys.exit()
    if n > N:
        return

    dfs(n+4)
    dfs(n+7)

dfs(0)
print('No')

import sys
N = int(input())
ans = 0
def dfs(n):
    if n == N:
        print('Yes')
        sys.exit()
    if n > N:
        return

    dfs(n+4)
    dfs(n+7)

dfs(0)
print('No')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline

N, = map(int, input().split())

for i in range(100):
    for j in range(100):
        if i == 0 and j == 0:
            continue
        if N == i * 4 + j * 7:
            print("YES")
            exit()

print("NO")

import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline

N, = map(int, input().split())

for i in range(100):
    for j in range(100):
        if N == i * 4 + j * 7:
            print("YES")
            exit()

print("NO")

import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline

N, = map(int, input().split())

for i in range(100):
    for j in range(100):
        if i == 0 and j == 0:
            continue
        if N == i * 4 + j * 7:
            print("Yes")
            exit()

print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())

if(N%4==0 or  N%7==0):
    print('Yes')
    exit(0)

n=N%7
while(n<N):
    if(n%4==0):
        print('YES')
        exit(0)
    else:
        n+=7

print('No')

N = int(input())

if(N%4==0 or  N%7==0):
    print('Yes')
    exit(0)

n=N%7
while(n<N):
    if(n%4==0):
        print('Yes')
        exit(0)
    else:
        n+=7

print('No')

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n=int(input())
if n % 4 == 0 or n % 7 == 0:
  print("Yes");
else:
  while n > 0:
    n -= 4
    if n % 7 == 0:
      print("Yes")
      return
  print("No")

n=int(input())
if n % 4 == 0 or n % 7 == 0:
  print("Yes");
else:
  while n > 0:
    n -= 4
    if n % 7 == 0:
      print("Yes");
      return
  print("No");
    


n=int(input())
if n % 4 == 0 or n % 7 == 0:
	print("Yes");
else:
	while n > 0:
		n -= 4
		if n % 7 == 0:
			print("Yes")
			exit()
	print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
array = []
for i in range(1, 101, 4):
    for j in range(1, 101, 7):
        array.append(i)
        array.append(j)
if n in array:
    print("Yes")
else:
    print("No")


n = int(input())
array = []
for i in range(0, 101, 4):
    for j in range(0, 101, 7):
        array.append(i)
        array.append(i+j)
if n in array:
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
#105_B
N=int(input())
flg=False
for i in range(0,N//7+1):
    x=N
    x=x-7*i
    if N%4==0:
        flg=True
        break
print('Yes' if flg else 'No')

#105_B
N=int(input())
flg=False
for i in range(0,N//7+1):
    x=N
    x=x-7*i
    if x%4==0:
        flg=True
        break
print('Yes' if flg else 'No')

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
is_equal = 'No'
for r_1 in range(n//4 + 1):
    sum_4 = r * 4
    for r_2 in range(n//7 + 1):
        sum_7 = r2 * 7
        if sum_4 + sum_7 == n:
            is_equal = 'Yes'
print(is_equal)

n = int(input())
for r_1 in range(n//4 + 1):
    sum_4 = r_1 * 4
    for r_2 in range(n//7 + 1):
        sum_7 = r_2 * 7
        if sum_4 + sum_7 == n:
            print('Yes')
            exit()
print('No')

Verdicts: Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n=int(input())
for i in range(1,(n//4)):
    for j in range(1,(n//7)):
        if (i*4)+(j*7)==n:
            print('Yes')
            exit()
print('No')

n=int(input())
for i in range((n//4)+1):
    for j in range((n//7)+1):
        if (i*4)+(j*7)==n:
            print('Yes')
            exit()
print('No')

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
import sys
n = int(input()) 
i = 0 
j = 0
while(i < 100):
    while(j < 100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()
        j+= 1
    i+= 1

print("No")


import sys
n = int(input()) 
for i in range(100):
    for j in range(100):
        if 7* i + 4 * j == n:
            print("Yes")
            sys.exit()

print("No")


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
print('YNeos'[int(input()) in[1,2,3,5,6,9,10,13,17]])

print('YNeos'[int(input()) in[1,2,3,5,6,9,10,13,17]::2])


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N=int(input())

if (N%4)==0:
    print("Yes")
    break
elif(N%7)==0:
    print("Yes")
    break
elif(N%11)==0:
    print("Yes")
    break
while N>0:
    i=1
    N=N-11*i
    if(N%4)==0 or (N%7)==0:
        print("Yes")
        break
    i=i+1
else:
    print("No")

N=int(input())

if (N%4)==0:
    print("Yes")
elif(N%7)==0:
    print("Yes")
elif(N%11)==0:
    print("Yes")
while N>0:
    i=1
    N=N-11*i
    if(N%4)==0 or (N%7)==0:
        print("Yes")
        break
    i=i+1
else:
    print("No")

N=int(input())

if (N%4)==0:
    print("Yes")
elif(N%7)==0:
    print("Yes")
elif(N%11)==0:
    print("Yes")
elif(1):
    while N>0:
        i=1
        N=N-11*i
        if(N<0):
            print("No")
            break
        if(N%4)==0 or (N%7)==0:
            print("Yes")
            break
        i=i+1

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N=int(input())
upper=N//7
flag=False
for i in range(upper):
        for j in range(upper):
                if 7*i+4*j==N:
                        flag=True
                        break

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





N=int(input())
upper_cake=N//7
upper_d=N//4
flag=False
for i in range(upper_cake+1):
        for j in range(upper_d+1):
                if 7*i+4*j==N:
                        flag=True
                        break

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

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
if N % 4 == 0 or N % 7 == 0 or N % 11 == 0 or N % 4 == 7 or N % 7 == 4 or N % 11 == 7 or N % 11 == 4:
    print('Yes')   
else :
    print('No')

N =int(input())

for i in range(0, 100//7):
    for j in range(0, 100//4):
        if 7*i + 4*j == N:
            print('Yes')
            exit()

print('No')

Verdicts: Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n=int(input())
if n%4==0:
    print("Yes")
elif (n-4*(n//4))%7==0:
    print("Yes")
else:
    print("No")

n=int(input())
ok=False
if n%4==0:
    print("Yes")
else:
    while n>0:
        if n%7==0:
            ok=True
            break
        n-=4
    if ok:
        print("Yes")
    else:
        print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())

money = False
if N % 4 == 0 or N % 7 == 0:
    money = True

for i in range(1, N+1):
    if N % 4 * i / 7 == 0:
        money = True
    break

if money:
    print('Yes')
else:
    print('No')

N = int(input())

combi = False
for i in range(N//4+1):
    if (N - 4 * i) % 7 == 0:
        combi = True
if combi:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
cnt = 0
for i in range(26):
    for j in range(16):
        if 4 *i + 7 *j == n:
            cnt += 1
            print(i, j)
if cnt >= 1:
    print("Yes")
else:
    print("No")

n = int(input())
cnt = 0
for i in range(26):
    for j in range(16):
        if 4 *i + 7 * j == n:
            cnt += 1
            
if cnt >= 1:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):

N = int(input())

for i in range(N//4) :
    for j in range(N//7) :
        if N == 4*i + 7*j :
            print("Yes")
        else :
            print("No")
            



N = int(input())

A = []
for i in range((N//4)+1) :
    for j in range((N//7)+1) :
        if N == 4*i + 7*j :
            A.append("Yes")
        else :
            A.append("No")

if "Yes" in A :
    print("Yes")
else :
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
#coding:utf-8
n = int(input())


for i in range(n//4):
    for j in range(n//7):
        if 4*i + 7*j == n:
            print('Yes')
            exit()

print('No')


#coding:utf-8
n = int(input())


for i in range(n//7):
    for j in range(n//4):
        if 7*i + 4*j == n:
            print('Yes')
            exit()

print('No')


#coding:utf-8
n = int(input())


for i in range(1 + n//4):
    for j in range(1 + n//7):
        if 4*i + 7*j == n:
            print('Yes')
            exit()

print('No')


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())
max_4 = int(N/4)
max_7 = int(N/7)
Flag = 0
for i in range(max_4):
    for j in range(max_7):
        if N == i*4 + j*7:
            Flag = 1
            break
    if Flag == 1:
        break
if Flag == 1:
    print("Yes")
else:
    print("No")
        

N = int(input())
max_4 = int(N/4)+1
max_7 = int(N/7)+1
Flag = 0
for i in range(max_4):
    for j in range(max_7):
        if N == i*4 + j*7:
            Flag = 1
            break
    if Flag == 1:
        break
if Flag == 1:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
def solve():
    n = int(input())
    max_cake = n // 4
    max_donut = n // 7
    for c in range(max_cake + 1):
        for d in range(max_donut + 1):
            if n == 4 * c + 7 * d:
                return "Yes"
    return "No"


if __name__ == "__main__":
    solve()


def solve():
    n = int(input())
    max_cake = n // 4
    max_donut = n // 7
    for c in range(max_cake + 1):
        for d in range(max_donut + 1):
            if n == 4 * c + 7 * d:
                return "Yes"
    return "No"


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


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())

f = False

for i in range(26):
    for j in range(15):
        if 4 * i + 7 * j == n:
            f = True
            break
        else:
            pass

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

n = int(input())

a = n // 4
b = n // 7
count = 0

for i in range(a + 1):
    n = n - i * 4
    for j in range(b + 1):
        if 4 * i + 7 * j == n:
            print(yes)
            count += 1
            break
        else:
            pass

if count == 0:
    print("No")
else:
    pass

n = int(input())

f = False

for i in range(26):
    for j in range(15):
        if 4 * i + 7 * j == n:
            f = True
            break
        else:
            pass

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())

sum = 0
flag = 0

a = int(N / 7)
re = N % 7

if re == 0:
    print('Yes')
    flag += 1
else:
    for i in range(a+1):
        sum = 7 * i
#        print(sum)
        while sum<N:
            sum += 4
#            print(sum)
            if sum == N:
                print('Yse')
                flag += 1
        if flag == 1:
            break

if flag == 0:
    print('No')
                


N = int(input())

sum = 0
flag = 0


a = int(N / 7)
re = N % 7

if re == 0 and N != 0:
    print('Yes')
    flag += 1
else:
    for i in range(a+1):
        sum = 7 * i
#        print(sum)
        while sum<N:
            sum += 4
#            print(sum)
            if sum == N:
                print('Yse')
                flag += 1
        if flag == 1:
            break

if flag == 0:
    print('No')
                


N = int(input())

sum = 0
flag = 0


a = int(N / 7)
re = N % 7

if re == 0 and N != 0:
    print('Yes')
    flag += 1
else:
    for i in range(a+1):
        sum = 7 * i
#        print(sum)
        while sum<N:
            sum += 4
#            print(sum)
            if sum == N:
                print('Yes')
                flag += 1
        if flag == 1:
            break

if flag == 0:
    print('No')
                


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
n = int(input())
for cake in range(n):
    for donut in range(n):
        if cake * 4 + donut * 7 == n:
            print("Yes")
            break
else:
    print("No")


n = int(input())
for cake in range(n):
    for donut in range(n):
        if cake * 4 + donut * 7 == n:
            print("Yes")
            break
    else:
        continue
    break
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())
flag = 0

for cake in range(26):
    for donut in range(15):
        if cake*4 + donut*7 == N:
            flag = 1
            break
    if flag == 1:
        break

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


N = int(input())
flag = 0

for cake in range(26):
    for donut in range(15):
        if cake*4 + donut*7 == N:
            flag = 1
            break
    if flag == 1:
        break

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


Verdicts: Runtime Error

Accepted
Problem: _La Confiserie d'ABC_ sells cakes at 4 dollars each and doughnuts at 7 dollars each. Determine if there is a way to buy some of them for exactly N dollars. You can buy two or more doughnuts and two or more cakes, and you can also choose to buy zero doughnuts or zero cakes.

Submission attempts (in order):
N = int(input())

for i in range(N//4):
    for j in range(N//7):
        if 4*i + 7*j == N:
            print("Yes")
            exit()

print("No")

N = int(input())

for i in range(N//4 +1):
    for j in range(N//7 +1):
        if 4*i + 7*j == N:
            print("Yes")
            exit()

print("No")

Verdicts: Wrong Answer

Accepted