TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a.find(1)
ans=m//(k-1)+(n-m-1)//(k-1)
kk=m%(k-1)+(n-m-1)%(k-1)+1
ans+=1+(kk>k)
print(ans)

n,k=map(int,input().split())
a=list(map(int,input().split()))
m=a.index(1)
ans=m//(k-1)+(n-m-1)//(k-1)
kk=m%(k-1)+(n-m-1)%(k-1)+1
if m!=0 and m!=n-1:
  if kk>1:
    ans+=1+(kk>k)
else:
  ans+=(ans*(k-1)+1<n)
print(ans)

Verdicts: Runtime Error

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
import math
N,K = list(map(int,input().split(" ")))
lengths = [] 
nums = list(map(int,input().split(" ")))
counts = []
co = [0,0]
minnum = min(nums)
ind = 0

for num in nums:
    if num == 1:
        ind += 1
    else:
        co[ind] += 1

print(co)
ans = 0
# print(counts)
K = K -1
for count in co:
    ans += int(math.ceil(count/K))
print(ans)

import math
N,M = list(map(int,input().split(" ")))
temp = input()
ans = int(math.ceil((N-1)/(M-1)))
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
import math
N, K, *A = map(int, open(0).read().split())
print(math.ceil((N-1)//(K-1)))


import math
N, K = map(int, input().split())
print(math.ceil((N-1)/(K-1)))


Verdicts: Wrong Answer

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
N, K = map(int,input().split())
A = list(map(int,input().split()))
print(str((N-1) // (K-1)))

N, K = map(int,input().split())
A = list(map(int,input().split()))
ans = (N-1) // (K-1) if (N-1)%(K-1) == 0 else (N-1) // (K-1) + 1
print(str(ans))

Verdicts: Wrong Answer

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
N = int(input())
a =[1,2,3,4,5,6,7,8,9]
for i in range(1,10000):
  b = 10**i - 1
  for j in range(1,10):
    a.append(b + j * 10 ** i)
  
for i in range(N):
  print(a[i])

N,K = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
c = a.index(1)
naga = len(a)-K
if naga <= 0:
  print(1)
else:
  d = c-0
  if d != 0:
    V = K-1
    ans += d // V
    if d % V != 0:
      ans += 1
  e = N-1-c
  if e != 0:
      V = K-1
      ans += e // V
      if e % V != 0:
        ans += 1
  ans1 = 0
  ans2 = 0
  if d < K-1:
    ans1 += 1
    e = e -(K-d-1)
    if e < 0:
      V = K-1
      ans += e // V
      if e % V != 0:
        ans1 += 1
  else:
    ans1 = 999999999999999999999999999999
  if e < K-1:
    ans2 += 1
    d = d -(K-e-1)
    if d < 0:
      V = K-1
      ans += d // V
      if e % V != 0:
        ans2 += 1
  else:
    ans2 = 999999999999999999999999999999
  print(min(ans,ans1,ans2))

N,K = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
c = a.index(1)
naga = len(a)-K
if naga <= 0:
  print(1)
else:
  d = c-0
  if d != 0:
    V = K-1
    ans += d // V
    if d % V != 0:
      ans += 1
  e = N-1-c
  if e != 0:
      V = K-1
      ans += e // V
      if e % V != 0:
        ans += 1
  ans1 = 0
  ans2 = 0
  if d <= K-1:
    ans1 += 1
    ex = e -(K-d-1)
    if ex >= 0:
      V = K-1
      ans1 += ex // V
      if ex % V != 0:
        ans1 += 1
  else:
    ans1 = 999999999999999999999999999999
  if e <= K-1:
    ans2 += 1
    dx = d -(K-e-1)
    if dx >= 0:
      V = K-1
      ans2 += dx // V
      if dx % V != 0:
        ans2 += 1
  else:
    ans2 = 999999999999999999999999999999
  ans3 = 0
  ans4 = 999999999999999999
  V = K-1
  for i in range(K):
    ans3 = 0
    dx = d- i
    ex = e - (K - i - 1)
    ans3 += 1
    if dx > 0:
      if ex > 0:
        ans3 += ex//V
        if ex % V != 0:
          ans3 += 1
        ans3 += dx//V
        if dx % V != 0:
          ans3 += 1
        ans4 = min(ans4,ans3)
  print(min(ans,ans1,ans2,ans4))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
n, k = map(int, input().split())
a = list(map(int, input().split()))
if n == k:
    print(1)
    exit()
pos_1 = a.index(1)
left = (pos_1 + k - 2) // (k - 1)
right = (n - pos_1 + k - 3) // (k - 1)
print(left, right)
print(left + right)

N, K = map(int, input().split())
A = input()
ans = (N - 1) // (K - 1)
if (N - 1) % (K - 1) == 0:
    print(ans)
else:
    print(ans + 1)


Verdicts: Wrong Answer

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
n, k = map(int, input())

if (n-1)%(k-1)==0:
    print((n-1)//(k-1))
else:
    print((n-1)//(k-1)+1)

n, k = map(int, input().split())

if (n-1)%(k-1)==0:
    print((n-1)//(k-1))
else:
    print((n-1)//(k-1)+1)

Verdicts: Runtime Error

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
n,k=map(int,input().split())
l=list(map(int,input().split()))
i=l.index(1)
k-=1
a=-(-i//k)+0 if i%k!=1 else -1
b=-(-(n-i-1)//k)+0 if (n-i-1)%k!=1 else -1
print(a+b)

n,k=map(int,input().split())
l=list(map(int,input().split()))
i=l.index(1)
k-=1
a=-(-i//k)- int(i%k==1)
b=-(-(n-i-1)//k)-  int((n-i-1)%k==1)
print(a+b)

n,k=map(int,input().split())
print(-((1-n)//(k-1)))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
n,k = map(int,input().split())
print( ( (n-1 + k-2)//(k-1) )+1 )

n,k = map(int,input().split())
print( ( (n-1 + k-2)//(k-1) ) )

Verdicts: Wrong Answer

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
n,k=map(int, input().split())
a=list(map(int, input().split()))
for i in range(n):
    if a[i]==1:
        mi=i
x=n-(mi+1)
y=mi
if x%(k-1)==0:
    ax=x//(k-1)
else:
    ax=x//(k-1)+1
if y%(k-1)==0:
    ay=y//(k-1)
else:
    ay=y//(k-1)+1
if 0<x%(k-1)+y%(k-1)<k:
    print(ax+ay-1)
else:
    print(ax+ay)

n,k=map(int, input().split())
a=list(map(int, input().split()))
if (n-1)%(k-1)==0:
    print((n-1)//(k-1))
else:
    print((n-1)//(k-1)+1)

Verdicts: Wrong Answer

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

Submission attempts (in order):
n, k = map(int, input().split())
print((n-1)//(k-1))


n, k = map(int, input().split())
print(-(-(n-1)//(k-1)))


Verdicts: Wrong Answer

Accepted
Problem: There is a sequence of length N: A_1, A_2, ..., A_N. Initially, this sequence is a permutation of 1, 2, ..., N.  On this sequence, Snuke can perform the following operation:    * Choose K consecutive elements in the sequence. Then, replace the value of each chosen element with the minimum value among the chosen elements.  Snuke would like to make all the elements in this sequence equal by repeating the operation above some number of times. Find the minimum number of operations required. It can be proved that, Under the constraints of this problem, this objective is always achievable.

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

cnt=1
num=k
while num<n:
  num+=(k-1)
  cnt+=1
  
print(cnt)


n,k=map(int,input().split())
l=list(map(int,input()))

cnt=1
num=3
while num<n:
  num+=2
  cnt+=1
  
print(cnt)

n,k=map(int,input().split())
l=list(map(int,input().split()))

cnt=1
num=k
while num<n:
  num+=(k-1)
  cnt+=1
  
print(cnt)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Let S(n) denote the sum of the digits in the decimal notation of n. For example, S(123) = 1 + 2 + 3 = 6.  We will call an integer n a **Snuke number** when, for all positive integers m such that m > n, \frac{n}{S(n)} \leq \frac{m}{S(m)} holds.  Given an integer K, list the K smallest Snuke numbers.

Submission attempts (in order):
K = int(input())
maxnum = 10**20
al = []
ERROR  = 10**(-10)

def sunuke(i):
    s = 0
    old = i
    while i>0:
        s += i%10
        i = i//10
    return [old/s,old]

for i in range(1,100):
    al.append(sunuke(i))
for j in range(3,17):
    for k in range(10,100):
        al.append(sunuke(k*(10**(j-2))+10**(j-2)-1))
anslist = []
al.reverse()
for j in al:
    if j[0]<maxnum+ERROR:
        anslist.append(j[1])
        maxnum = j[0]
anslist.reverse()

for i in range(K):
    print(anslist[i])
print(len(anslist))

K = int(input())
al = []

def sums(i):
    s = 0
    old = i
    while i>0:
        s += i%10
        i = i//10
    return (s,old)

for i in range(1,1000):
    al.append(sums(i))
for j in range(4,16):
    for k in range(100,1000):
        al.append(sums(k*(10**(j-3))+10**(j-3)-1))
anslist = []
al.reverse()
maxs,maxi = sums(10**15)
for j in al:
    if maxs*j[1] <= maxi*j[0]:
        anslist.append(j[1])
        maxs = j[0]
        maxi = j[1]
anslist.reverse()

for i in range(K):
    print(anslist[i])

Verdicts: Wrong Answer

Accepted
Problem: Let S(n) denote the sum of the digits in the decimal notation of n. For example, S(123) = 1 + 2 + 3 = 6.  We will call an integer n a **Snuke number** when, for all positive integers m such that m > n, \frac{n}{S(n)} \leq \frac{m}{S(m)} holds.  Given an integer K, list the K smallest Snuke numbers.

Submission attempts (in order):
K = int(input())
snuke = ""
i = 1
while True:
  snuke = str(i % 10) + "9" * (i // 10)
  if snuke[0] == "0":
    i += 1
    continue
  if int(snuke) >= K:
    break
  print(snuke)
  i += 1

K = int(input())
a = 0
b = 1
for i in range(K):
  a += b
  print(a)
  if b < (a + b) / sum(map(int,str(a + b))):
    b *= 10



Verdicts: Wrong Answer

Accepted
Problem: Let S(n) denote the sum of the digits in the decimal notation of n. For example, S(123) = 1 + 2 + 3 = 6.  We will call an integer n a **Snuke number** when, for all positive integers m such that m > n, \frac{n}{S(n)} \leq \frac{m}{S(m)} holds.  Given an integer K, list the K smallest Snuke numbers.

Submission attempts (in order):
#!/usr/bin/env python3

k = int(input())

keta = 4

ans_c = []
sunuke = []
for i in range(1, 10**keta):  # 1~9999
    a = i
    b = sum([int(j) for j in str(i)])
    tmp_sunuke = a/b
    ans_c.append(a)
    sunuke.append(tmp_sunuke)

base = 10
nines = 9
while(len(ans_c) <= 9000000):
    for i in range(1000, 10**keta):  # 1000~9999
        a = i*base+nines
        b = sum([int(j) for j in str(i)])
        tmp_sunuke = a/b
        ans_c.append(a)
        sunuke.append(tmp_sunuke)
    base *= 10
    nines = nines*10 + 9
    # print(len(ans_c))

# print(ans_c)

tmp = 10**10
ans = []
for i in reversed(range(len(ans_c))):
    if sunuke[i] <= tmp:
        tmp = sunuke[i]
        ans.append(ans_c[i])
# print(ans)


for i in range(0, k):
    print(ans[-1-i])


#!/usr/bin/env python3

k = int(input())

now = 1
step = 1


def sunuke(n):
    r = 0
    while n:
        r += n % 10
        n //= 10
    return r


def ok(a, b):
    return a * s(b) <= b*s(a)


while k:
    if ok(now, now+step):
        print(now)
        k -= 1
        now += step
    else:
        nstep = step*10
        while now % nstep != nstep-1:
            now += step
        step = nstep


#!/usr/bin/env python3

k = int(input())

now = 1
step = 1


def sunuke(n):
    r = 0
    while n:
        r += n % 10
        n //= 10
    return r


def ok(a, b):
    return a * sunuke(b) <= b*sunuke(a)


while k:
    if ok(now, now+step):
        print(now)
        k -= 1
        now += step
    else:
        nstep = step*10
        while now % nstep != nstep-1:
            now += step
        step = nstep


Verdicts: Time Limit Exceeded

Runtime Error

Accepted
Problem: Let S(n) denote the sum of the digits in the decimal notation of n. For example, S(123) = 1 + 2 + 3 = 6.  We will call an integer n a **Snuke number** when, for all positive integers m such that m > n, \frac{n}{S(n)} \leq \frac{m}{S(m)} holds.  Given an integer K, list the K smallest Snuke numbers.

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

s = ''
while K > 0:
  for i in range(1,min(10,K+1)):
    print(i,s, sep='')
  s += '9'
  K -= 10


K = int(input())
d = 0
n = 1
while K > 0:
  if ((n+1)*10**d-1)*(sum(map(int,str(n+1)))+9*d) <= ((n+2)*10**d-1)*(sum(map(int,str(n)))+9*d):
    print(n,'9'*d, sep='')
    K -= 1
    n += 1
  else:
    d += 1
    n = (n+1)//10

Verdicts: Wrong Answer

Accepted
Problem: Let S(n) denote the sum of the digits in the decimal notation of n. For example, S(123) = 1 + 2 + 3 = 6.  We will call an integer n a **Snuke number** when, for all positive integers m such that m > n, \frac{n}{S(n)} \leq \frac{m}{S(m)} holds.  Given an integer K, list the K smallest Snuke numbers.

Submission attempts (in order):
args = int(input().rstrip())

def snuke(number):
    temp = list(str(number))
    arr = [ int(t) for t in temp] 
    return sum(arr)

def find_snuke(args):
    result = []
    i = 1
    while len(result) < args:

        if((i+1)/snuke(i+1))>=(i/snuke(i)):
            result.append(i)
        i=i+1
            
    return result

args = int(input().rstrip())

def snuke(n):
    s = 0
    while n:
        s += n % 10
        n //= 10
    return s

def find_snuke(args):
    result = []
    i = 1
    while len(result) < args:
        push = True
        p = 0
        for power in range(0,len(str(i))):
            if((i+10**power)/snuke(i+10**power))<(i/snuke(i)):
                push = False
                p = power
                break
        if push:
            result.append(i)
        i=i+10**p
            
    return result

arr = find_snuke(args)
for a in arr:
   print(a)

Verdicts: Wrong Answer

Accepted
Problem: Let S(n) denote the sum of the digits in the decimal notation of n. For example, S(123) = 1 + 2 + 3 = 6.  We will call an integer n a **Snuke number** when, for all positive integers m such that m > n, \frac{n}{S(n)} \leq \frac{m}{S(m)} holds.  Given an integer K, list the K smallest Snuke numbers.

Submission attempts (in order):
def s(n):
    if n<10:
        return n
    else:
        return n%10+s(n//10)

k =int(input())
n=0
for _ in [0]*k:
    n +=1    
    minn = n
    d = 10
    while n>=d:
        m = (n//d+1)*d-1
        if minn*s(m)>m*s(minn):
            minn = m
    n = minn
    print(n)


def s(n):
    if n<10:
        return n
    else:
        return n%10+s(n//10)
n=0
for _ in [0]*int(input()):
    n +=1    
    minn = n
    d = 1
    while n>=d:
        d *= 10    
        m = (n//d+1)*d-1
        if minn*s(m)>m*s(minn):
            minn = m
    n = minn
    print(n)

Verdicts: Time Limit Exceeded

Accepted
Problem: Let S(n) denote the sum of the digits in the decimal notation of n. For example, S(123) = 1 + 2 + 3 = 6.  We will call an integer n a **Snuke number** when, for all positive integers m such that m > n, \frac{n}{S(n)} \leq \frac{m}{S(m)} holds.  Given an integer K, list the K smallest Snuke numbers.

Submission attempts (in order):
def s(n):
    ret=0    
    for i in range(15):
        ret+=(n%10**(i+1))//10**i
    return ret

k=int(input())
ksnk=set()

for i in range(13):
    for j in range(1,1000):
        n=int(str(j)+'9'*i)
        ksnk.add(n)
ksnk=sorted(list(ksnk), reverse=True)

fmin=float('inf')
ans=[]
for a in ksnk:
    fa=a/s(a)    
    if fa<=fmin:
        ans.append(a)
        fmin=fa
ans.reverse()
print(ans[:k])


def s(n):
    ret=0    
    for i in range(15):
        ret+=(n%10**(i+1))//10**i
    return ret

k=int(input())
ksnk=set()

for i in range(13):
    for j in range(1,1000):
        n=int(str(j)+'9'*i)
        ksnk.add(n)
ksnk=sorted(list(ksnk), reverse=True)

fmin=float('inf')
ans=[]
for a in ksnk:
    fa=a/s(a)    
    if fa<=fmin:
        ans.append(a)
        fmin=fa
ans.reverse()
for a in ans[:k]:
    print(a)


Verdicts: Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a, b = input().split()
if a > 8 or b > 8: print(":(")
else: print("Yay!")

a, b = map(int, input().split())
if a>8 or b>8: print(":(")
else: print("Yay!")

Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a = int(input())
b = int(input())

if max(a, b) > 8:
    print(':(')
else:
    print('Yay!')

a = int(input())
b = int(input())

if max(a, b) > 8:
    print(':(')
else:
    print('Yay!')

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

if max(a, b) > 8:
    print(':(')
else:
    print('Yay!')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):


a, b = map(int, input().split())
if a <= 8 and b <= 8:
    print("Yay")
else:
    print(":(")

a, b = map(int, input().split())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")


Verdicts: Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
import sys

a, b = map(int, sys.stdin.readline())

if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(":(")

import sys

a, b = map(int, sys.stdin.readline().split()))

if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(":(")

import sys

a, b = map(int, sys.stdin.readline().split())

if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(":(")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
line = raw_input().split()
a = line[0]
b = line[1]

if a > 8 or b > 8:
    return ':('
else:
    return 'Yay!'

line = input().split()
a = line[0]
b = line[1]

if a > 8 or b > 8:
    return ':('
else:
    return 'Yay!'

line = input().split()
a = line[0]
b = line[1]

if a > 8 or b > 8:
    print(':(')
else:
    print('Yay!')

A, B = map(int, input().split())
if A <= 8 and B <= 8:
    print('Yay!')
else :
    print(':(')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a ,b = map(int,input().split())
if a =< 8 and b=<8:
    print("Yay")
else:
    print(":(")

a ,b = map(int,input().split())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")

Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a,b=map(int,input())
if(a+b%2==0):
    print('Yay!')
elif(a < 9 and b < 9):
    print('Yay!')
else:
    print(':(')

a,b=map(int,input().split())
if(a+b%2==0):
    print('Yay!')
elif(a < 9 and b < 9):
    print('Yay!')
else:
    print(':(')

Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a, b = map(input().split())
if a < 8 and b < 8:
  print("Yay!")
else:
  print(":(")

a, b = map(int, input().split())
if a <= 8 and b <= 8:
  print("Yay!")
else:
  print(":(")

Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):

A = int(input())
B = int(input())

if A>8 or B>8:
    print(":(")
elif A<=8 and B<=8:
    print("Yay!")



A,B = map(int, input().split())
 
if A>8 or B>8:
    print(":(")
elif A<=8 and B<=8:
    print("Yay!")

Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a,b=map(int,input().split()) 
print("Yay" if a<=8 and b<=8 else ":(" )

a,b=map(int,input().split()) 
print("Yay!" if a<=8 and b<=8 else ":(" )

Verdicts: Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

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

if a>8 or b>8:
  print(":(")
else:
  print("Yay")

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

if a>8 or b>8:
  print(":(")
else:
  print("Yay!")

Verdicts: Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
line = input()
num_a, num_b = [int(n) for n in line.split()][0]
is_it_possible = "Yay!"
if num_a > 8 or num_b > 8:
    is_it_possible = ":("
print(is_it_possible)

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

if a > 8 or b > 8:
    print('Yay!')
else:
    print(':(')

line = input()
num_a, num_b = [int(n) for n in line.split()]
is_it_possible = "Yay!"
if num_a > 8 or num_b > 8:
    is_it_possible = ":("
print(is_it_possible)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a = int(input())
b = int(input())
if max(a,b) <= 6:
  print('Yay!')
else:
  print(':(')

a = int(input())
b = int(input())
if max(a,b) <= 8:
  print('Yay!')
else:
  print(':(')

a,b = map(int,input().split())
if max(a,b) <= 8:
  print('Yay!')
else:
  print(':(')


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a, b = (int(i) for i in input().split())

if a <= 8 & b<= 8:
    print ("Yay!")
else:
    print(":(")




a, b = [int(i) for i in input().split()]
 
if a <= 8 and b<= 8:
    print ("Yay!")
else:
    print(":(")

Verdicts: Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
A, B = map(int, input().split())
if A== 8 and B==8:
  print("Yay!")
if A>8 and b<8:
  print(":(")
if A<8 and b>8:
  print(":(")
else:
  print("Yay!")
  

A, B = map(int, input().split())
if A<8 and B <8:
    print("Yay!")
elif A==8 and B == 8:
    print("Yay!")
else:
    print(":(")


Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

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

for a<9 and b<9:
  print("Yay!")
else:
  print(":(")

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

if a<9 and b<9:
  print("Yay!")
else:
  print(":(")

Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
import numpy as np

a = input()
b = input()

a = int(a)
b = int(b)
if a > 8:
    print(':(')

elif b > 8:
    print(':(')

elif a+b > 16:
    print(":(")

else:
    print("Yay!")


i = int(input())
ii = input().split()

a = int(0)
n = int(0)
m = int(0)
k = int(0)
for n in ii:
    a = int(n)
    for m in range(i):
      while (a % 1 == 0):
        a = a/2
        if (a % 1 == 0):
            k += 1

print(k)

c = input().split()

a = int(c[0])
b = int(c[1])

if a > 8:
    print(':(')

elif b > 8:
    print(':(')

elif a+b > 16:
    print(":(")

else:
    print("Yay!")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a,b=map(int,input().split)
print("Yay!" if a<=8 and b<=8 else ":(")

a,b=map(int,input().split)
print("Yay!" if (a<=8 and b<=8) else ":(")

a,b=map(int,input().split())
print("Yay!" if a<=8 and b<=8 else ":(")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
A, B = map(int input().split())
if max(A, B) > 8:
    print(':(')
else:
    print('Yay!')

A, B = map(int, input().split())
if max(A, B) > 8:
    print(':(')
else:
    print('Yay!')

Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
D, N = map(int,input().split())

count = N
x = (100 ** D) * (N - (N-1)//99)                                                                         
print(x)

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

max = max(A,B)
min = min(A,B)
print("max: {}".format)
if(A==B):
    print("Yay!")
elif((min*2+1)+(max-min) +2 <= 16):
    print("Yay!")
else:
    print(":(")

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

if A <= 8 or B <= 8:
    return "Yay!"
else:
    return ":("

A, B = map(int, input().split())
 
if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a b = list(map(int, input().split()))
if a <= 8 and b <= 8:
  print('Yay!')
else:
  print(':(')

a, b = list(map(int, input().split()))
if a <= 8 and b <= 8:
  print('Yay!')
else:
  print(':(')

Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
if int(input())>8 or int(input())>8:
  print(":(")
else:
  print("Yay!")

if max(list(map(int,input().split()))) >8:
  print(":(")
else:
  print("Yay!")


Verdicts: Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
A,B=map(int,input().split())
if A<=8 and B<=8 :
	print("Yes")
else :
	print(":(")

A,B=map(int,input().split())
if A<=8 and B<=8 :
	print("Yay!")
else :
	print(":(")

Verdicts: Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a=int(input())
b=int(input())
if(a>8 or b>8):print(":(")
else:print("Yay!")

a=int(input())
b=int(input())
if(a>8 or b>8):print(":(")
else:print("Yay!")

a,b=map(int,input().split())
if(a>8 or b>8):print(":(")
else:print("Yay!")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a,b=map(int,input().split()):print('Yay!' if max(a,b)<=8 else ':(')

print('Yay!'if max(map(int,input().split()))<'9' else':(')

s=input();print(':('if len(s)>3 or'9'in s else'Yay!')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a,b = map(int,input().split())
if a < 9 and b < 9:
    print("Yey!")
else:
    print(":(")

a,b = map(int,input().split())
if a < 9 and b < 9:
    print("Yay!")
else:
    print(":(")


Verdicts: Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a,b=map(int,input().split())
print("Yay" if abs(a-b)<=2 else ":(")

a,b=map(int,input().split())
print("Yay" if abs(a-b)<=1 else ":(")

a,b=map(int,input().split())
print("Yay!" if abs(a-b)<=1 else ":(")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a,b=map(int,input(),split())
if a<=8 and b<=8:
  print("Yay!")
else:
  print(":(")

a,b =int(input(),split())
if a<=8 or b<=8:
  print("Yay!")
else:
  print(":(")



a,b =map(int,input(),split())
if a<=8 or b<=8:
  print("Yay!")
else:
  print(":(")



a,b=map(int,input().split())
if a<=8 and b<=8:
  print("Yay!")
else:
  print(":(")


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
D, N = map(int, input().split())
a = pow(100, D)
#print(a * N)
b = a * N
if N==100:
    print(b + pow(100, D))
else:
    print(b)


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

e = 0
squ = 0
for i in range(0, 16, 2):
    #for j in range(b)
    #s[i] = 1
    #s[i+1] = 0
    e += 1
    squ += 1

if e>=a and squ>=b:
    print("Yay!")
else:
    print(":(")


Verdicts: Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
cake_a = int(input())
cake_b = int(input())

if cake_a > 8 or cake_b > 8:
    print(":(")
    exit(0)
    
print("Yay!")


cake_a = int(input())
cake_b = int(input())

if cake_a > 8 or cake_b > 8:
    print(":(")
    exit(0)
    
print("Yay!")


input_line = input().split()

cake_a = int(input_line[0])
cake_b = int(input_line[1])

if cake_a > 8 or cake_b > 8:
    print(":(")
else:
    print("Yay!")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a = int(input())
b = int(input())
if a + b <= 14:
    print('Yay!')
else:
    print(':(')

a = int(input())
b = int(input())
if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')

a, b = map(int, input().split())
if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
d,n=map(int,input().split())
if d!=100:
	print((100**d)*n)
else:
	print((100**d)*(n+1))

a,b=map(int,input().split())
if 8<a or 8<b:
	print(':(')
else:
	print('Yay!')


Verdicts: Wrong Answer

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

a = int(input())
b = int(input())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")


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

a = int(input())

b = int(input())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(" :(")


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

a = int(input())

b = int(input())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(" :(")


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

a, b = map(int, input().split())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: E869120's and square1001's 16-th birthday is coming soon.   Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan- shaped pieces.  E869120 and square1001 were just about to eat A and B of those pieces, respectively,   when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".  Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Submission attempts (in order):
a,b=map(int,input().split())
if a+b>16:
  print(":(")
elif (abs(a-b))%2==0:
  print("Yay!")
else:
  print(":(")

a,b=map(int,input().split())
if (abs(a-b))%2==0 and a+b==16:
  print("Yay!")
else:
  print(":(")

a,b=map(int,input().split())
if a<=8 and b<=8:
  print("Yay!")
else:
  print(":(")

Verdicts: Wrong Answer

Wrong Answer

Accepted