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):
A = int(input())
if (A%4 == 3 or A%4 == 0 A%7 == 4 or A%7 == 0) and A != 3:
  print('Yes')
else:
  print('No')

A = int(input())
if (A%4 == 3 or A%4 == 0 A%7 == 4 or A%7) and A != 3:
  print('Yes')
else:
  print('No')

A = int(input())
Flag = False
for i in range((A//4)+1):
  for j in range((A//7)+1):
    if A == 3:
      break;
    elif 4*i + 7*j == A:
      Flag = True
if Flag:
  print('Yes')
else:
  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())
a=4
b=7
for i in range(26):
	for j in range(15):
		if a*i+b*j==n:
			print('Yes')
		else:
			print('No')


n=int(input())
for i in range(26):
  for j in range(15):
    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):
n=int(input())
if n%7==0:
    print("Yes")
else:
    a=n//7
    buf=0
    for i in range(a):
        if (n-7*i)%4==0:
            buf=1
            print("Yes")
            break
    if buf==0:
        print("No")

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

n=int(input())
if n%7==0:
    print("Yes")
else:
    a=n//7
    buf=0
    for i in range(a+1):
        if (n-7*i)%4==0:
            buf=1
            print("Yes")
            break
    if buf==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(intput())

for i in range(26):
    for j in range(16):
        l.append(i*4+j*7):

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

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

for i in range(26):
    for j in range(16):
        l.append(i*4+j*7):

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

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

for i in range(26):
    for j in range(16):
        l.append(i*4+j*7)

if N in l:
    print('Yes')
else:
    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())
for i in range(15):
  for j in range(26):
    if i*7+j*4=n:
      print('Yes')
      exit()
print('No')

n=int(input())
for i in range(15):
  for j in range(26):
    if i*7+j*4==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())
f,s=0,0
while 1:
  if f*4+s*7>n:break
  if f*4+s*7==n:
    print("Yes")
    exit()
  while 1:
    if f*4+s*7>n:break
    if f*4+s*7==n:
      print("Yes")
      exit()
    s+=1
  f+=1
print("No")

n=int(input())
f,s=0,0
while f*4+s*7<=n:
  if f*4+s*7==n:
    print("Yes")
    exit()
  while f*4+s*7<=n:
    if f*4+s*7==n:
      print("Yes")
      exit()
    s+=1
  s=0
  f+=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())
res="No"
for i in range (n):
    if (n-7*i)%4==0 and n-7*i>=0:
        res="Yes"
        print(i)
print(res)

n=int(input())
res="No"
for i in range (1,n):
    if (n-7*i)%4==0 and n-7*i>=0 and int((n-7*i)/4!=0):
        res="Yes"
        print("dounat:",i)
        print("cake:",(n-7*i)/4)
print(res)

n=int(input())
res="No"
for i in range (n):
    if (n-7*i)%4==0 and n-7*i>=0 and int((n-7*i)/4>=0):
        res="Yes"
print(res)

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 i in range(0,26):
  for k in range(0,15):
    if N == 4*i + 7*k:
      print('Yes, i=',i,', k=',k)
      exit()
print('No')

N = int(input())
for i in range(0,26):
  for k in range(0,15):
    if N == 4*i + 7*k:
      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())
cnt=0
for i in (0,101):
    for j in (0,101):
        if 4*i+7*j==n:
            cnt+=1
if cnt==0:
    print('No')
else:
    print('Yes')

n=int(input())
cnt=0
for i in range(25):
    for j in range(14):
        if 4*i+7*j==n:
            cnt+=1
if cnt==0:
    print('No')
else:
    print('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())
for i in range(n // 4 + 1):
    if (n - 4 * i) % 7 == 0:
        print('Yes')
print('No')


n = int(input())
for i in range(n // 4 + 1):
    if (n - 4 * i) % 7 == 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())
i = 0
flag = false
while(7*i<=n):
  if (n-7*i)%4 == 0:
    flag = true
    break
  i+=1
if flag:
  print("Yes")
else:
  print("No")


n = int(input())
i = 0
flag = False
while(7*i<=n):
  if (n-7*i)%4 == 0:
    flag = True
    break
if flag:
  print("Yes")
else:
  print("No")


n = int(input())
i = 0
flag = false
while(7*i<=n):
  if (n-7*i)%4 == 0:
    flag = true
    break
if flag:
  print("Yes")
else:
  print("No")


n = int(input())
i = 0
flag = False
while(7*i<=n):
  if (n-7*i)%4 == 0:
    flag = True
    break
  i+=1
if flag:
  print("Yes")
else:
  print("No")


Verdicts: Runtime Error

Time Limit Exceeded

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(25):
    for j in range(15):
        if N == 4*i + 7*j:
            print('Yes')
            break

print('No')


N = int(input())

for i in range(25)
    for j in range(15)
        if N == 4*i + 7*j:
            print('Yes')
            break

print('No')


N = int(input())

for i in range(25):
    for j in range(15):
        if N == 4*i + 7*j:
            print('Yes')
            exit()

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())
for i in range(100):
    for j in range(100):
        if 4 * i + 7 * j == n:
            print("Yes")
            exit(0)
print("No")

N = 3#int(input())
FLG = 0
for i in range(N // 7, 0, -1):
    if (N - i * 7) % 4 == 0:
        print("Yes")
        FLG = 1
        break
if FLG == 0:
    print("No")

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

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())
if n%4 == 0 or n%7 == 0 : print("Yes")
else:
  while n > 0:
    
    if n%4 == 0:
      print("Yes")
      break
    n-=7
print("No")

n = int(input())
if n%4 == 0 or n%7 == 0 : print("Yes")
else:
  while n > 0:
    
    if n%4 == 0:
      print("Yes")
      break
    n-=7
if n < 0 :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 = False
for a in range(n//4+1):
    for b in range(n//7+1):
        
        if 4*a + 7*b == n:
            print(a,b)
            flag = True
            break

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

n = int(input())
flag = False
for a in range(n//4+1):
    for b in range(n//7+1):
        
        if 4*a + 7*b == 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):
n = int(input())
for i in range(100):
    if (n - i*4)%7==0:
        print('Yes')
    if(n-i*4 < 0):
        break
print("No")


n = int(input())
flag = False
for i in range(100):
    if (n - i*4)%7==0:
        flag = True
    if(n-i*4 < 0):
        break
print("Yes" if flag 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())
S=0
while S<N:
    S=S+4
if S==N:
    print('Yes')
else:
    while S<N:
        S=S+7
    if S==N:
        print('Yes')
    else:
         print('No')

N=int(input())
k=0
for i in range(0,30):
    for j in range(0,15):
        S=4*i+7*j
        if S==N:
            k=k+1
if k>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):
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"

n = int(input())

fo = n // 4
se = n // 7

for i in range(fo+1):
    for j in range(se+1):
        if ((i*4) + (j*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())
r = n // 4
for i in range(r+1):
  for j in range(r+1):
    if 4*i + 7*j == n:
      flag = True
      break
  if flag:
    print('Yes')
    break
  else:
    print('No')

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

def pay_check(N):
  for i in range(N//4 + 1):
    for j in range(N//7 + 1):
      if (N == 4*i + 7*j):
        print('Yes')
        return
  print('No')
pay_check(int(input()))

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())
l=[0,1,3,5]
if l[N%4] > N//4:
  print("No")
else:
  print("Yes")

N =int(input())
s=False
l =[7*i for i in range(4)]
for i in range(26):
    for j in l:
        if j+4*i==N:
            s =True
            break
if s:
    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 = 0
​
for i in range(1,26):
  for j in range(1,15):
    n = 4*i + 7*j
    if n == N:
      ans = 1
      break
      
if ans == 1:
  print("Yes")
else:
  print("No")

N = int(input())
ans = 0

for i in range(26):
  for j in range(15):
    n = 4*i + 7*j
    if n == N:
      ans = 1
      break
  if ans == 1:
    break

if ans == 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())
p = 0
for i in range(26):
  for j in range(16):
    if 4*i + 7*j == n:
      p == 1
      break
if p == 0:
  print("No")
else: 
  print("Yes")


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

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


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())
count=0
for i in range(0,30):
  for j in range(0,30):
    if i*4+j+7==30:
      print("Yes")
      break
    count+=1
if count==900:
  print("No")

n=int(input())
keep=0
for i in range(0,30):
  for j in range(0,30):
    if i*4+j*7==n:
      keep=1
if keep==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):
#105b
n=int(input())
x = n//4
if n%4==0 or n%11==0:
    print('Yes')
    
else:
    for i in range(x+1):
        for j in range(x+1):
            temp=4*i+7*j
            if temp==n:
                print('Yes')
                exit()
print('No')

#105b
n=int(input())
x = n//4
if n%4==0 or n%11==0:
    print('Yes')
    
else:
    for i in range(x):
        for j in range(x):
            temp=4*i+7*j
            if temp==n:
                print('Yes')
                exit()
print('No')

#105b
n=int(input())
ans=0
flag=False
    
for i in range(25):
    for j in range(14):
        ans=4*i+j*7
        if ans==n:
            flag=True
            break
        elif ans>n:
            break
print('Yes' if flag==True else '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 i in range(1,n+1):
    if i%4 == 0 and (n-i) == 0:
        flag = True
if flag:
    print("Yes")
else:
    print("No")

n = int(input())
flag = False
for i in range(n+1):
    if i%4 == 0 and (n-i)%7 == 0:
        flag = True
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):
N = int(input())
counter = 0
for a in range(N//7):
    for b in range(N - 4*a):
        if(N == 7*a + 4*b):
            counter += 1
print(counter)



N = int(input())
flag = False
for a in range(N//7):
    for b in range((N - 7*a)//4):
        if(N == 7*a + 4*b):
           flag = True
           break;
if(flag):
    print("Yes")
else:
    print("No")



N = int(input())
flag = False
for a in range(N//7+1):
    for b in range((N - 7*a)//4+1):
        if(N == 7*a + 4*b):
           flag = True
           break;
if(flag):
    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):
# input
N = int(input())
pat = set(
    [
        fn
        for fn in range(4, 100, 4) 
    ] + [
        sn
        for sn in range(7, 100, 7)
    ]
)

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

# input
N = int(input())

for seven_n in range(0, 101, 7):
    if N - seven_n % 4 == 0 or N - seven_n == 0:
        print("Yes")
        exit(0)
print("No")

# input
N = int(input())


if N < 4:
    print("No")
else:
    for seven_n in range(0, N + 1, 7):
        if (N - seven_n) % 4 == 0 or N - seven_n == 0:
            print("Yes")
            exit(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())
n = N//7
flag = 0
for i in range(n):
    p = N - i*7
    if(p%4 == 0):
        flag = 1
        break
if(flag==1):
    print('Yes')
else:
    print('No')

N = int(input())
n = N//7
flag = 0
for i in range(n+1):
    p = N - i*7
    if(p%4 == 0):
        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):
N = int(input())
print('Yes' if (N % 4) % 7 == 0 else 'No')

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


n = int(input())
for i in range((n+3)//4+1):
    if (n - i * 4 ) % 7 == 0:
        print('Yes')
        break
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):
ans = int(input())
loopFlg = True

for i in range(26):
  if loopFlg == False:
    break
  for j in range(15):
    if 4*i + 7*j == ans:
      loopFlg = False

      
if loopFlg == True:
  print('NO')
else:
  print('YES')

ans = int(input())
loopFlg = True

for i in range(26):
  if loopFlg == False:
    break
  for j in range(15):
    if 4*i + 7*j == ans:
      loopFlg = False

      
if loopFlg == True:
  print('No')
else:
  print('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())
for i in range(26) :
  if N=>4 and (N-(4*i))%7==0 :
    print("Yes")
    break
else :
  print("No")

N=int(input())
for i in range(N//4+1) :
  if (N-(4*i))%7==0 :
    print("Yes")
    break
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):
for i in range(100):
    for j in range(100):
        if flag == True:
            continue
        print(N - i * 7 - j * 4 )
        if N - i * 7 - j * 4 == 0:
            flag = True

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


import math
N = int(input())

flag = False

for i in range(ceil(N/7)+1):
    for j in range(ceil(N/4)+1):
        if flag == True:
            continue
        
        if N - i * 7 - j * 4 == 0:
            flag = True

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


import math
N = int(input())

flag = False

for i in range(math.ceil(N/7)+1):
    for j in range(math.ceil(N/4)+1):
        if flag == True:
            continue
        
        if N - i * 7 - j * 4 == 0:
            flag = True

if flag == True:
    print('Yes')
else:
    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())
c = 4
d = 7
for i in range(26):
    for j in range(16):
        if c*i + d*j == n:
            print(i,j)
            print("Yes")
            exit()
print("No")

n = int(input())
c = 4
d = 7
for i in range(26):
    for j in range(16):
        if c*i + d*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):
n=int(input())
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i+7*j==n:
            ans+=1
print(ans)

n=int(input())
ans=0
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i+7*j==n:
            ans+=1
print(ans)

n=int(input())
for s in range(n//4+1):
    for t in range(n//7+1):
        if 4*s+7*t==n:
             print("Yes")
            break
        else:
            print("No")

n=int(input())
for s in range(n//4+1):
    for t in range(n//7+1):
        if 4*s+7*t==n:
            print("Yes")
            break
        else:
            print("No")

n=int(input())
for s in range(n//4+1):
    for t in range(n//7+1):
        if 4*s+7*t==n:
             print("Yes")
        else:
            print("No")

n=int(input())
d=0
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i+7*j==n:
            d+=1
print(d)

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

Verdicts: Runtime Error

Wrong Answer

Runtime Error

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())
a=[4*x+7*y for x in range(200) for y in range(200)]
ans="Yes" if N in a else "No"
print(ans)
print(type(4*x+7*y for x in range(200) for y in range(200)))

N=int(input())
a=[4*x+7*y for x in range(200) for y in range(200)]
ans="Yes" if N in a else "No"
print(ans)

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(16):
    if (n%(i*7))%4==0:
        print("Yes")
        exit()
print("No")


n =int(input())
for i in range(16):
    for j in range(26):
        if i*7+j*4==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):
def cakes_and_donuts(N: int) -> bool:
    while N > 0:
        if N % 4 == 0:
            return True
        N -= 7

    return N == 0  # <=> N % 7 == 0


if __name__ == "__main__":
    N = int(input())
    ans = cakes_and_donuts(N)
    print(ans)


def cakes_and_donuts(N: int) -> bool:
    while N > 0:
        if N % 4 == 0:
            return True
        N -= 7

    return N == 0  # <=> N % 7 == 0


if __name__ == "__main__":
    N = int(input())
    yes = cakes_and_donuts(N)
    print('Yes' if yes 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())

while N > 0:
    if N%7 == 0 or N%4 == 0:
        print('yes')
        break
    N -= 7

else :
    print('No')

N = int(input())

while N > 0:
    if N%7 == 0 or N%4 == 0:
        print('yes')
        break
    N -= 4

else :
    print('No')

N = int(input())

while N > 0:
    if N%7 == 0 or N%4 == 0:
        print('yes')
        break
    N -= 4

else :
    print('No')



def no_change(N):
    while N > 0:
        if N%7 == 0 or N%4 == 0:
            return 'Yes'
        N -= 4    
    else :
        return 'No'


N = int(input())


print(no_change(N))

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())
flag = False
for i4 in range(26):
    for i7 in range(15):
        if (i4*4)+(i7*7)==N:
            flag = True
            break
print("yes" if flag else "No")


N = int(input())
flag = False
for i4 in range(30):
    for i7 in range(20):
        if (i4*4)+(i7*7)==N:
            flag = True
            break
print("Yes" if flag 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):
four_w = []
seven_w = []
cross = []

for i in range(1,100):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

if n in four_w,seven_w,cross:
    print("Yes")
else:
    print("No")

four_w = []
seven_w = []
cross = []

for i in range(1,100):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

n in four_w,seven_w,cross

four_w = []
seven_w = []
cross = []

for i in range(1,101):
    if i % 4 == 0:
        four_w.append(i)
    elif i % 7 ==0:
        seven_w.append(i)

for four in four_w:
    for seven in seven_w:
        cross.append(four + seven)

n = int(input())

if n in cross:
    print("Yes")
elif n in seven_w:
    print("Yes")
elif n in four_w:
    print("Yes")
else:
    print("No")

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())
f = 4
s = 7

for i in range(n):
    for n in range(n):
        if s + f == n:
            ans = 1
            break

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


n = int(input())
if n <= 3:
    print("No")
elif n == 5:
    print("No")
elif n == 6:
    print("No")
elif n == 9:
    print("No")
elif n == 10:
    print("No")
elif n == 13:
    print("No")
elif n == 17:
    print("No")    
else:
    print("Yes")


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):
a=int(input())

b=int(a/7)
c=int(a/4)

for i in range(b):
    for j in range(c):
        if 7*b+4*c==a:
            print("Yes")
        else:
            print("No")



a=int(input())

b=int(a/7)
c=int(a/4)
k=0

for i in range(b+1):
    for j in range(c+1):
        if 7*i+4*j==a:
            k=1
if k==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 = map(int, input().split())

for i in range(int(100/7)+1):
  for j in range(int(100/4)+1):
    if i*7 + j*4 == N:
      print('Yes')
      return
print('No')
      

import sys
N = map(int, input().split())
N = N[0]
for i in range(int(100/7)+1):
	for j in range(int(100/4)+1):
		a = i*7 + j*4
		if int(N) == a:
			print('Yes')
			sys.exit();

print('No')


N = int(input())
res = 'No'
for i in range(int(100/7)+1):
	for j in range(int(100/4)+1):
		a = i*7 + j*4
		if int(N) == a:
			print('Yes')
print(res)


import sys
N = map(int, '4'.split())
N = N[0]
for i in range(int(100/7)+1):
	for j in range(int(100/4)+1):
		a = i*7 + j*4
		if int(N) == a:
			print('Yes')
			sys.exit();

print('No')


N = int(input())
res = 'No'
for i in range(int(100/7)+1):
	for j in range(int(100/4)+1):
		a = i*7 + j*4
		if int(N) == a:
			res='Yes'
print(res)


Verdicts: Runtime Error

Runtime Error

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())
answer="No"
for i in range(26):
  for j in range(16):
    total = 4*i + 7*j
    
    if total==N:
      answer="yes"

print(answer)

N = int(input())
answer="No"

for i in range(26):
  for j in range(16):
    total = 4*i + 7*j
    
    if total==N:
      answer="Yes"

print(answer)

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//4
y=n//7

print("yes" if len([n-4*a-7*b for b in range(y+1) for a in range(x+1) if n-4*a-7*b==0])!=0 else "no")


n=int(input())

x=n//4
y=n//7

print("Yes" if len([n-4*a-7*b for b in range(y+1) for a in range(x+1) if n-4*a-7*b==0])!=0 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())
#n, x  = map(int, input().split())
#h = list(map(int, input().split()))
#s = list(str(input()))

counter = 0
max = int(n/4)
for i in range(max):
  for ii in range(max):
    if(n == i*7 + ii*4):
      counter = counter +1
print(counter)

n = int(input())

counter = 0
max = int(n/4) + 1
for i in range(max):
  for ii in range(max):
    if(n == i*7 + ii*4):
      counter = counter +1

if(counter >= 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())
cakeA = round(N / 4)
cakeB = round(N / 7)
count = 0

for a in range(cakeA):
    for b in range(cakeB):
        if (4 * a)+(7 * b) == N:
            count = count + 1
print(count)


N = int(input())
cakeA = round(N / 4)
cakeB = round(N / 7)
count = 0

for a in round(cakeA):
    for b in round(cakeB):
        if (4 * a)+(7 * b) == N:
            count = count + 1
print(count)

n = int(input())

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

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())
for i in range(N // 4):
    for j in range(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):
n = int(input())
max_f = int(n / 4)
max_s = int(n / 7)
switch = 0
for i in range(max_s + 1):
    for j in range(max_f + 1):
        if (7 * i + 4 * j) == n:
            switch = 1
if switch == 1:
    print(Yes)
else:
    print(No)

n = int(input())
max_f = int(n / 4)
max_s = int(n / 7)
switch = 0
for i in range(max_s + 1):
    for j in range(max_f + 1):
        if (7 * i + 4 * j) == n:
            switch = 1
if switch == 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())
q = 0
flug = 0
while q <= N :
        if N%7 == 0:
                flug = 1
                break
	if N - q % 4 == 0:
		flug = 1
		break
	q = q + 7

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

N = int(input())
q = 0
flug = 0
while q <= N :
	if N - q % 4 == 0:
		flug = 1
		break
	q = q + 7

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

N = int(input())
q = 0
flug = 0
while q <= N :
	if N%7 == 0:
		flug = 1
		break
	
	if (N-q)%4 == 0:
		flug = 1
		break
	q = q + 7
 
if flug == 1:
	print("Yes")
else:
	print("No")

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())
for i in range(50):
    for j in range(50):
        if n==4*i+7*j:
            print("Yes")
            break
else:
    print("No")


n=int(input())
for i in range(50):
    for j in range(50):
        if n==4*i+7*j:
            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())

sum = 0
for i in range(30):
    for j in range(20):
        total = 4*i + 7*j
        if total == N:
            sum += 1


print(sum)

N = int(input())

sum = 0
for i in range(30):
    for j in range(20):
        total = 4*i + 7*j
        if total == N:
            sum += 1

if sum > 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):
def calc(a):
  for a4 in range(26):
    for a7 in range(16):
      if a4*4+a7*7 == a:
        return "Yes"
  return "No"

if __name__ == '__main__':
  calc(int(input()))
      

def calc(a):
  for a4 in range(26):
    for a7 in range(16):
      if a4*4+a7*7 is a:
        return "Yes"
  return "No"

if __name__ == '__main__':
  calc(int(input())
      

def calc(a):
  a = int(input())
  for a4 in range(26):
    for a7 in range(16):
      if a4*4+a7*7 is a:
        return "Yes"
  return "No"

if __name__ == '__main__':
  calc(int(input())
      

def calc(a):
  for a4 in range(26):
    for a7 in range(16):
      if a4*4+a7*7 == a:
        return "Yes"
  return "No"

if __name__ == '__main__':
  print(calc(int(input())))


Verdicts: Wrong Answer

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())
if n < 4:
    print('No')
else:
    m = n % 4
    if n >= (4 - m) * 7:
        print(n, 'Yes')
    else:
        print('No')


n = int(input())
if n < 4:
    print('No')
else:
    m = n % 4
    if m == 0 or n >= (4 - m) * 7:
        print(n, 'Yes')
    else:
        print('No')


n = int(input())
if n < 4:
    print('No')
else:
    m = n % 4
    if m == 0 or n >= (4 - m) * 7:
        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())

cake = [i for i in range(4, N+1, 4)]

dons = [i for i in range(7, N +1, 7)]

ans = "No"
for i in range(N//4):
    for j in range(N//7):
        if cake[i] + dons[j] == N:
            ans = "Yes"
            break

ans

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

n = int(input())
for i in range(n//7+1):
    if (n-7*i)%4==0:
        print('Yes')
        break
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):
import sys
for i in range(100):
    for l in range(100):
        if 4*i + 7*l == int(input()):
            print("Yes")
            sys.exit()
print("No")

import sys
N = int(input())
for i in range(100):
    for l in range(100):
        if 4*i + 7*l == N:
            print("Yes")
            sys.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):
import numpy as np
a = int(input())
c = np.zeros(a)
for i in range(7):
	if(i == 3 or i == 6):
		c[i] = 1
#print(c)
for i in range(7, 40):
	if(c[i-4] == 1 or c[i-7] == 1):
		c[i] = 1
if(c[-1] == 1):
	print("Yes")
else:
	print("No")

import numpy as np
a = int(input())
if(a > 7):
	c = np.zeros(a)
	for i in range(7):
		if(i == 3 or i == 6):
			c[i] = 1
	#print(c)
	for i in range(7, c.shape[0]):
		if(c[i-4] == 1 or c[i-7] == 1):
			c[i] = 1
	if(c[-1] == 1):
		print("Yes")
	else:
		print("No")
else:
	if(a == 4 or a == 7):
		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())
*H,=map(int,input().split())
RH=H[::-1]

ans='Yes'
i=0
while i+1<=N-1:
    if RH[i+1]-RH[i]==1:
        RH[i+1]-=1
    elif RH[i+1]-RH[i]>=

N=int(input())

ans='No'
i=0
while 7*i<=N:
    if (N-7*i)%4==0:
        ans='Yes'
    i+=1

print(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())
f = False
for i in range(int(n/4)):
    for j in range(int(n/7)):
      if 4*i + 7*j == n:
        f = True
if f:
  print('Yes')
else:
  print('No')

n = int(input())
f = False
for i in range(int(n/4)):
    for j in range(int(n/7)):
      if 4*i + 7*j == n:
        f = True
if f and n>3:
  print('Yes')
else:
  print('No')

n = int(input())
f = False
for i in range(int(n/4)):
    for j in range((n/7)):
      if 4*i + 7*j == n:
        f = True
if f:
  print('Yes')
else:
  print('No')

n = int(input())
f = False
for i in range(int(n/4)):
    for j in range(int(n/7)):
        if 4*i + 7*j == n:
            f = True
if f and n>3:
  print('Yes')
else:
  print('No')

import math
n = int(input())
ans = 'No'
for i in range(math.ceil(n/4)+1):
    for j in range(math.ceil(n/7)+1):
        if 4*i + 7*j == n:
            ans = 'Yes'
print(ans)

Verdicts: Wrong Answer

Wrong Answer

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):
def det(n)
    if n % 4 == 0:
        return 'Yes'
    elif n % 7 == 0:
        return 'Yes'
    elif n < 4 or (5 <= n and n <= 6):
        return 'No'
    seven = range(n//7 + 1)
    for i in seven:
        if (n - seven*7) % 4 == 0:
            return 'Yes'
    return 'No'
n = int(input())
print(det(n))
    

def det(n):
    seven = range((n // 7) + 1)
    four = range((n // 4) + 1)
    for i in seven:
        for p in four:
            if (i*7 + p*4) == n:
                return 'Yes'
    return 'No'
x = int(input)
print(det(x))

def det(n):
    seven = range((n // 7) + 1)
    four = range((n // 4) + 1)
    for i in seven:
        for p in four:
            if (i*7 + p*4) == n:
                return 'Yes'
    return 'No'
x = int(input())
print(det(x))

Verdicts: Runtime Error

Runtime Error

Accepted