ZhenlongDai/ACPR huggingface dataset:
Problem: p03289
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()
def LIR(n): return [LI() for i in range(n)]


s = S()
if s[0] != "A":
    print("WA")
else:
    count = 0
    for i in range(2,len(s)-1):
        if s[i] == "C": count += 1
    if count != 1:
        print("WA")
    else:
        for i in range(len(s)):
            if s[i] not in "AC":
                if s[i] == s[i].upper():
                    print("WA")
                    break
        print("AC")







































Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
WA
AC


Fixed submission (verdict: Accepted):

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()
def LIR(n): return [LI() for i in range(n)]


s = S()
if s[0] != "A":
    print("WA")
else:
    count = []
    for i in range(2,len(s)-1):
        if s[i] == "C": count.append(i)
    if len(count) != 1:
        print("WA")
    else:
        for i in range(1,len(s)):
            if i not in count:
                if s[i] == s[i].upper():
                    print("WA")
                    quit()
        print("AC")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
ans = 'WA'
a = []
if s[0] == 'A' and s[2:-1].count('C') == 1:
     a = list(s)
     a.remove('A')
     a.remove('C')
     a = str(a)
     if a.islower() == 0:
          ans = 'AC'
print(ans)

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
s = input()
ans = 'WA'
a = []
if s[0] == 'A' and s[2:-1].count('C') == 1:
     a = list(s)
     a.remove('A')
     a.remove('C')
     a = str(a)
     if a.islower() == True:
          ans = 'AC'
print(ans)
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()

result = "AC"

if n[0:1] != "A":
        result = "WA"
        print(result)
        quit()

carea = n[2:-1]
ccount = 0
for i in carea:
        if i == "C":
                ccount += 1
if ccount >= 2 or ccount == 0:
        result = "WA"
        print(result)
        quit()

if n[-1] == "C":
        result = "WA"
        print(result)
        quit()

for i in n:
        if i.isupper == True:
                if i != "A" or i != "C":
                        result = "WA"
                        print(result)
                        quit()

print(result)

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
n = input()

result = "AC"
if n[0] != "A":
        result = "WA"
        print(result)
        quit()

carea = n[2:-1]
ccount = 0
for i in carea:
        if i == "C":
                ccount += 1
if ccount >= 2 or ccount == 0:
        result = "WA"
        print(result)
        quit()

for i in carea:
        if i == "A":
                result = "WA"
                print(result)
                quit()

if n[-1] == "C" or n[-1] == "A":
        result = "WA"
        print(result)
        quit()

if n[1] == "C" or n[1] == "A":
        result = "WA"
        print(result)
        quit()


for i in n:
        if i.isupper() == True:
                if i not in "AC":
                        result = "WA"
                        print(result)
                        quit()
print(result)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
if S[0] == 'A' and (S[2:-1]).count('C') == 1:
    S_ = S.replace('A', '').replace('C', '')
    if S_.islower():
        print('AC')
else:
    print('WA')

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:

Fixed submission (verdict: Accepted):
S = input()
if S[0] == 'A' and S[2:-1].count('C') == 1:
    S_ = S.replace('A', '').replace('C', '')
    if S_.islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

b = input()
a = list(b)
c = len(b)
d =""
if a[0] == "A" and a[2] == "C":
    a[0] = "a"
    a[2] = "c"
    c = 1
for i in a:
    d+=i
if d.islower():
    if c==1:
        print("AC")
else:
    print("WA")
    
    

Failing test case input:
oetpcb@

Expected output:
WA


Actual output:

Fixed submission (verdict: Accepted):

b = input()
a = list(b)
c=z = len(b)
d =""
if a[0] == "A":
    a[0] = "a"
    c = 10000
for i in range(2,z-1):
    if a[i] == "C":
        a[i]="c"
        c+=1
for i in a:
    d+=i
if d.islower() and c == 10001:
    print("AC")
else:
    print("WA")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s  = input()
f = True
if s[0] != "A":
    f = False
c = 0
for i in range(2, len(s) - 1):
    if s[i] == "C":
        c += 1
if c != 1:
    f=False
ss = s[1:].replace("C", "")
for i in range(len(ss)):
    if ss[i] < "A" or ss[i] > "z":
        f = False
        print("3")

if f:
    print("AC")
else:
    print("WA")

Failing test case input:
nCoBt@

Expected output:
WA


Actual output:
3
WA


Fixed submission (verdict: Accepted):
s  = input()
f = True
if s[0] != "A":
    f = False
c = 0
for i in range(2, len(s) - 1):
    if s[i] == "C":
        c += 1
if c != 1:
    f=False
ss = s[1:].replace("C", "")
for i in range(len(ss)):
    if ss[i] < "a" or ss[i] > "z":
        f = False
if f:
    print("AC")
else:
    print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

S = input()
upper_cnt=0
print(S[2:-1])
for i,c in enumerate(S):
    if (i==0 and c!="A") or S[2:-1].count("C")!=1 or (i==1 and not c.islower()):
        print('WA')
        exit()
    if i>=1 and c.isupper():
         upper_cnt+=1
    if upper_cnt >1:
        print('WA')
        exit()
print('AC')



Failing test case input:
nCoBt@

Expected output:
WA


Actual output:
oBt
WA


Fixed submission (verdict: Accepted):

S = input()
upper_cnt=0
for i,c in enumerate(S):
    if (i==0 and c!="A") or S[2:-1].count("C")!=1 or (i==1 and not c.islower()):
        print('WA')
        exit()
    if i>=1 and c.isupper():
         upper_cnt+=1
    if upper_cnt >1:
        print('WA')
        exit()
print('AC')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s=input()
count=True
dumy=0
for i in range(len(s)):
  if(s[i]>="A" and s[i]<="Z"):
    dumy+=1
if(dumy!=2):
  count=False
dumy=0
if(s[0]=="A"):
  for i in range(len(s)):
    if(s[i]=="C"):
      dumy+=1
else:
  count=False
if(dumy!=1):
  count=False
if(count==False):
  print("WA")
else:
  print("AC")

Failing test case input:
ACoder

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):

s=input()
count=True
dumy=0
for i in range(len(s)):
  if(s[i]>="A" and s[i]<="Z"):
    dumy+=1
if(dumy!=2):
  count=False
dumy=0
if(s[0]=="A"):
  for i in range(2,len(s)-1):
    if(s[i]=="C"):
      dumy+=1
else:
  count=False
if(dumy!=1):
  count=False
if(count==False):
  print("WA")
else:
  print("AC")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
flg = 0
if S[0] == 'A':
    flg += 1
if S[1].isupper():
    flg += 1000
for i in range(2, len(S)-1):
    if S[i] == 'C':
        flg += 10
    elif S[i].isupper():
        flg += 1000
if S[-1].isupper():
    flg += 1000
print(flg)
if flg == 11:
    print('AC')
else:
    print('WA')


Failing test case input:
odBAdut

Expected output:
WA


Actual output:
2000
WA


Fixed submission (verdict: Accepted):
S = input()
flg = 0
if S[0] == 'A':
    flg += 1
if S[1].isupper():
    flg += 1000
for i in range(2, len(S)-1):
    if S[i] == 'C':
        flg += 10
    elif S[i].isupper():
        flg += 1000
if S[-1].isupper():
    flg += 1000
if flg == 11:
    print('AC')
else:
    print('WA')
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

if s[0] != 'A':
    print('WA')
    exit(0)

cnt = 0
i = 0
for j, c in enumerate(s):
    if j <= 1 or j == len(s) - 1:
        continue
    print(c)
    if c == 'C':
        cnt += 1
        if cnt == 2:
            print('WA')
            exit(0)
        i = j
if cnt == 0:
    print('WA')
    exit(0)

for j, c in enumerate(s):
    if j == 0 or j == i:
        continue
    if str(c).isupper():
        print('WA')
        exit(0)

print('AC')


Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
B
o
C
WA


Fixed submission (verdict: Accepted):
s = input()

if s[0] != 'A':
    print('WA')
    exit(0)

cnt = 0
i = 0
for j, c in enumerate(s):
    if j <= 1 or j == len(s) - 1:
        continue
    if c == 'C':
        cnt += 1
        if cnt == 2:
            print('WA')
            exit(0)
        i = j
if cnt == 0:
    print('WA')
    exit(0)

for j, c in enumerate(s):
    if j == 0 or j == i:
        continue
    if str(c).isupper():
        print('WA')
        exit(0)

print('AC')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(str(input()))

if S[0] == 'A':
    count_C = 0
    for ind in range(3-1, len(S)-1):
        if S[ind] == 'C':
            ind_C = ind
            count_C += 1
    if count_C == 1:
        del S[0]
        del S[ind_C]
        S = 'a'
        for i in S:
            S = S + i
        if S.islower():
            exit()
print('WA')


Failing test case input:
AtCodds

Expected output:
AC


Actual output:

Fixed submission (verdict: Accepted):
S = list(str(input()))

if S[0] == 'A':
    count_C = 0
    for ind in range(3-1, len(S)-1):
        if S[ind] == 'C':
            ind_C = ind
            count_C += 1
    if count_C == 1:
        del S[0]
        del S[ind_C - 1]
        s = 'a'
        for i in S:
            s = s + i
        if s.islower():
            print('AC')
            exit()
print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
ac = True
c = True
if s[0] != "A":
  ac = False
if not ord("a") <= ord(s[1]) <= ord("z"):
  ac = False
if not ord("a") <= ord(s[-1]) <= ord("z"):
  ac = False
for i in range(2, len(s)-1):
  if s[i] == "C":
    if c:
      c = False
    else:
      ac = False
  else:
    if not ord("a") <= ord(s[i]) <= ord("z"):
      ac = False
if ac:
  print("AC")
else:
  print("WA")


Failing test case input:
Atcoder

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
s = input()
ac = True
c = True
if s[0] != "A":
  ac = False
if not ord("a") <= ord(s[1]) <= ord("z"):
  ac = False
if not ord("a") <= ord(s[-1]) <= ord("z"):
  ac = False
for i in range(2, len(s)-1):
  if s[i] == "C":
    if c:
      c = False
    else:
      ac = False
  else:
    if not ord("a") <= ord(s[i]) <= ord("z"):
      ac = False
if c:
  ac = False
if ac:
  print("AC")
else:
  print("WA")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = input()

result = "AC"
if n[0:1] != "A":
        result = "WA"
        print(result)
        quit()

carea = n[2:-1]
ccount = 0
for i in carea:
        if i == "C":
                ccount += 1
if ccount >= 2 or ccount == 0:
        result = "WA"
        print(result)
        quit()

if n[-1] == "C":
        result = "WA"
        print(result)
        quit()

if n[1] == "C":
        result = "WA"
        print(result)
        quit()


for i in n:
        if i.isupper == True:
                if i != "A" or i != "C":
                        result = "WA"
                        print(result)
                        quit()

print(result)


Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
n = input()

result = "AC"
if n[0] != "A":
        result = "WA"
        print(result)
        quit()

carea = n[2:-1]
ccount = 0
for i in carea:
        if i == "C":
                ccount += 1
if ccount >= 2 or ccount == 0:
        result = "WA"
        print(result)
        quit()

for i in carea:
        if i == "A":
                result = "WA"
                print(result)
                quit()

if n[-1] == "C" or n[-1] == "A":
        result = "WA"
        print(result)
        quit()

if n[1] == "C" or n[1] == "A":
        result = "WA"
        print(result)
        quit()


for i in n:
        if i.isupper() == True:
                if i not in "AC":
                        result = "WA"
                        print(result)
                        quit()
print(result)

Problem: p03289
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
S=str(input())
cnt=0
for i in range(2,len(S)-2):
    if S[i] =='C':
        cnt+=1
if cnt==1:
    if S[0]=='A':
        T = S.replace("C","").replace("A","")
        if T.islower():
            print("AC")
            exit()
print("WA")

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
S=str(input())
cnt=0
for i in range(2,len(S)-1):
    if S[i] =='C':
        cnt+=1
if cnt==1:
    if S[0]=='A':
        T = S.replace("C","").replace("A","")
        if T.islower():
            print("AC")
            exit()
print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
ans = 'WA'
if S[0] == 'A' and S[2:len(S)-1].count('C') == 1 and S.count('A') ==1 and S.count('C') == 1:
    komozi =''
    for i in S:
        if i == 'A' or 'C':
            i = i.replace('A','')
            i = i.replace('C','')
        komozi += i
        if komozi.islower():
            ans = 'AC'
print(ans)

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = list(input())
ans = 'WA'
if S[0] == 'A' and S[2:len(S)-1].count('C') == 1 and S.count('A') ==1 and S.count('C') == 1:
    komozi =''
    for i in S:
        if i == 'A' or 'C':
            i = i.replace('A','')
            i = i.replace('C','')
        komozi += i
    if komozi.islower():
        ans = 'AC'
print(ans)
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import re


cnt = 1
input_arr = []
for l in sys.stdin:
  input_arr.append(l.split("\n")[0])
  if len(input_arr) == cnt:
      break
S = input_arr[0]
if S[0] == "A" and len(re.sub(r'[a-z]+', '', S[1]+S[-0]+S[2:-1].replace("C","",1))) == 0:
    print("AC")
else:
    print("WA")

Failing test case input:
AtCoddr

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
import sys
import re


cnt = 1
input_arr = []
for l in sys.stdin:
  input_arr.append(l.split("\n")[0])
  if len(input_arr) == cnt:
      break
S = input_arr[0]
if len(re.sub(r'A[a-z]+C[a-z]+', '', S)) == 0:
    print("AC")
else:
    print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = [i for i in input()]
print(S[2:-2])
if S[0]=="A" and S[2:-1].count("C")==1:
    S.remove("A")
    S.remove("C")
    if "".join(S).islower():
            print("AC")
    else:
        print("WA")
else: 
    print("WA")

Failing test case input:
CilcycB

Expected output:
WA


Actual output:
['l', 'c', 'y']
WA


Fixed submission (verdict: Accepted):
S = [i for i in input()]
if S[0]=="A" and S[2:-1].count("C")==1:
    S.remove("A")
    S.remove("C")
    if "".join(S).islower():
            print("AC")
    else:
        print("WA")
else: 
    print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
if s[0] == "A" and s[2:-2].count("C") == 1:
    s.remove("A")
    s.remove("C")
    for i in range(len(s)):
        if s[i].islower:
            continue
        else:
            print("WA")
            exit()
    print("AC")

Failing test case input:
sAdpdC

Expected output:
WA


Actual output:

Fixed submission (verdict: Accepted):
s = list(input())
if s[0] == "A" and s[2:-1].count("C") == 1:
    s.remove("A")
    s.remove("C")
    for i in range(len(s)):
        if s[i].islower():
            continue
        else:
            print("WA")
            exit()
    print("AC")
else:
    print("WA")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) 


if __name__ == '__main__':
    s = input()
    count =0

    for i in range(len(s)):
        if s[0] != "A":
            count += 2
        if s[i] =="C" :
            if i < len(s)-1 and i >1:
                count +=1
            else:
                count+=2
        elif i>0 and  ord(s[i]) <=97 and ord(s[i]) >=122:
            count += 2

    if count == 1:
        print("AC")
    else:
        print("WA")



Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) 


if __name__ == '__main__':
    s = input()
    count =0

    for i in range(len(s)):
        if s[0] != "A":
            count += 2
        if s[i] =="C" :
            if i < len(s)-1 and i >1:
                count +=1
            else:
                count+=2
        elif i>0 and ( ord(s[i]) <97 or ord(s[i]) >122):
            count += 2

    if count == 1:
        print("AC")
    else:
        print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
S=input()
first=S[0]
cnt=0
moji=[i for i in "abcdefghijklmnopqrstuvwxyz"]

if first=="A":
  for i in range(2,len(S)-1):
    if S[i]=="C":
      cnt+=1
    else:
      for j in moji:
        if S[i] in moji == False:
          print("WA")
          sys.exit()
          
  if cnt==1:
    print("AC")
  else:
    print("WA")
        
else:
  print("WA")

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
import sys
S=input()
first=S[0]
second=S[1]
last=S[len(S)-1]
cnt=0
moji=[i for i in "abcdefghijklmnopqrstuvwxyz"]


if first=="A":
  for i in range(2,len(S)-1):
  
    if S[i]=="C":
      cnt+=1
    else:
      if (S[i] in moji)==False:
        print("WA")
        sys.exit()

  if cnt==1 and ((last in moji)==True) and ((second in moji)==True):
    print("AC")
  else:
    print("WA")
        
else:
  print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

if s[0] != "A":
    print("WA")
    exit()

if s[3:-1] not in "C":
    print("WA")
    exit()

if s[1:].replace("C", "").lower() == s[1:].replace("C", ""):
    print("AC")
else:
    print("WA")


Failing test case input:
AtCoddt

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
s = input()

if s[0] != "A":
    print("WA")
    exit()

if len(s[2:-1]) - len(s[2:-1].replace("C", "")) != 1:
    print("WA")
    exit()

if s[1:].replace("C", "").lower() == s[1:].replace("C", ""):
    print("AC")
else:
    print("WA")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import string
S = input()
ans = [False,False,False]
if S[0] == 'A':
    ans[0] = True
if 'C' in S[2:-1]:
    ans[1] = True
if ans[0] == True and ans[1] == True and list(S).count('C') == 1:
    x = list(S)
    del x[0]
    x.remove('C')
    for i in range(len(x)):
        if x[i] not in list(string.ascii_lowercase):
            break
        else:
            ans[2] = True
if ans[0] and ans[1] and ans[2]:
    print('AC')
else:
    print('WA')

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
import string
S = input()
ans = [False,False,False]
if S[0] == 'A':
    ans[0] = True
if 'C' in S[2:-1]:
    ans[1] = True
if ans[0] == True and ans[1] == True and list(S).count('C') == 1:
    x = list(S)
    del x[0]
    x.remove('C')
    for i in range(len(x)):
        if x[i] not in list(string.ascii_lowercase):
            break
        if i == len(x) -1:
            ans[2] = True
if ans[0] and ans[1] and ans[2]:
    print('AC')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
ans = True
if s[0]!='A':
  ans = False
if s[2:-1].count('C')!=1:
  ans = False
upper = 0
for i in  s:
  if i.isupper:
    upper += 1
if upper != 2:
  ans = False
if ans:
  print('AC')
else:
  print('WA')

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
s = input()
ans = True
if s[0]!='A':
    ans = False
if s[2:-1].count('C')!=1:
    ans = False
upper = 0
for i in  s:
    if i.isupper():
        upper += 1

if upper != 2:
    ans = False

if ans:
    print('AC')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
flag = True
if S[0] != 'A' or S[2:-2].count('C') != 1 or S[1].lower() != S[1]:
  flag = False
for s in S[2:]:
  if s != 'C' and s.lower() != s:
    flag = False
print('AC' if flag else 'WA')

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
flag = True
if S[0] != 'A' or S[2:-1].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:
  flag = False
for i in range(2,len(S)-1):
  if S[i] != 'C' and S[i].lower() != S[i]:
    flag = False
print('AC' if flag else 'WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
if s[0] != "A":
  print("No")
  exit()
if  s.find("C") < 2 or s.find("C") == len(s)-1:
  print("No")
  exit()
if s.count("C") != 1:
  print("No")
  exit()
s = s.replace("A","",1)
s = s.replace("C","")
if s != s.lower():
  print("No")
  exit()
print("Yes")

Failing test case input:
pdBdAvu

Expected output:
WA


Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
if s[0] != "A":
  print("WA")
  exit()
if  s.find("C") < 2 or s.find("C") == len(s)-1:
  print("WA")
  exit()
if s.count("C") != 1:
  print("WA")
  exit()
s = s.replace("A","",1)
s = s.replace("C","")
if s != s.lower():
  print("WA")
  exit()
print("AC")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

count = 0
tf = True
if S[0] != "A":
    tf = False

for i in range(2, len(S) - 1):
    if i == 0:
        continue
    if S[i] == "C" and tf:
        count += 1

if tf and count == 1:
    print("AC")
else:
    print("WA")


Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()

count = 0
ans = True

if S[0] != "A":
    ans = False
if not "C" in S[2:-1]:
    ans = False
for s in S:
    if s.isupper():
        count += 1
if count > 2:
    ans = False

print("AC" if ans else "WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
ans = 'AC'

if S[0] != 'A':
  ans = 'WA'
if S[2:len(S)-1].count('C') != 1:
  ans = 'WA'
  
S.replace('A', "")
S[2:len(S)-1].replace('C', "")
if S.islower == False:
  ans = 'WA'
print(ans)

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
ans = 'AC'

if S[0] != 'A':
  ans = 'WA'
if S[2:len(S)-1].count('C') != 1:
  ans = 'WA'

if sum(1 for c in S if c.isupper()) != 2:
  ans = 'WA'
print(ans)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())

bl = False

if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
    s[2:len(s)-1].remove('C')
    s.remove('A')
    ss = ''.join(s)
    if ss.islower():
        bl = True

print('AC' if bl else 'WA')


Failing test case input:
AtCoddr

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
s = list(input())

bl = False
s1 = s[1]
s2 = s[2:len(s)-1]
s3 = s[-1]

if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
    s2.remove('C')
    s2 = ''.join(s2)
    ss = s1+s2+s3
    if ss.islower():
        bl = True

print('AC' if bl else 'WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def piyo():
    s = list(str(input()))
    c = 0
    a = 0
    if s[0]!="A":
        return "WA"
    if s[1]=="C" or s[len(s)-1]=="C":
        return "WA"
    for hage in s:
        if hage!="A" and hage!="C":
            if hage.isupper():
                return "WA"
        if hage=="C":
            c+=1
        if hage=="A":
            a+=1
    if c>1:
        return "WA"
    if a>1:
        return "WA"
    return "AC"
        
if __name__ == '__main__':
    hoge=piyo()
    print(hoge)

Failing test case input:
Abcpteo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
def piyo():
    s = list(str(input()))
    c = 0
    a = 0
    if s[0]!="A":
        return "WA"
    if s[1]=="C" or s[len(s)-1]=="C":
        return "WA"
    for hage in s:
        if hage!="A" and hage!="C":
            if hage.isupper():
                return "WA"
        if hage=="C":
            c+=1
        if hage=="A":
            a+=1
    if c>1 or c==0:
        return "WA"
    if a>1:
        return "WA"
    return "AC"
        
if __name__ == '__main__':
    hoge=piyo()
    print(hoge)
Problem: p03289
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = list(input())

a = [chr(i) for i in range(97, 97+26)]
A = [chr(i) for i in range(65, 65+26)]

flg = "AC"

if not s[0] == "A":
    flg = "WA"

if not s[2:-2].count("C") ==1:
    flg = "WA"

b = set(s)-set(["A","C"])

if not b<=set(a):
    flg = "WA"

print(flg)

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
s = list(input())

a = [chr(i) for i in range(97, 97+26)]
A = [chr(i) for i in range(65, 65+26)]

flg = "AC"

if not s[0] == "A":
    flg = "WA"

if not s[2:-1].count("C") ==1:
    flg = "WA"

b = set(s)-set(["A","C"])

if not b<=set(a):
    flg = "WA"

print(flg)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

if S[0] == "A" and S[2:-1].count("C") == 1:
  index =  S.index('C')
  S = S[1:index] + S[index + 1:]
  if S.islower() == True:
    print("AC")
    exit()
else:
  print("WA")
    


Failing test case input:
AtBnCo

Expected output:
WA


Actual output:

Fixed submission (verdict: Accepted):
S = input()

if S[0] == "A" and S[2:-1].count("C") == 1:
  index = S.index('C')
  S = S[1:index] + S[index + 1:]
  if S.islower():
    print("AC")
    exit()

print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from string import ascii_lowercase
S = input()
if not S[0] is 'A' or not S[2] is 'C':
    print('WA')
    exit()
for i in range(1,len(S)):
    if i == 2:
        continue
    if not S[i] in ascii_lowercase:
        print('WA')
        exit()
print('AC')


Failing test case input:
AtCoder

Expected output:
AC

Actual output:
WA


Fixed submission (verdict: Accepted):
from string import ascii_lowercase
S = input()
try:
    if not S[0] is 'A' or not 'C' in S[2:-1]:
        raise RuntimeError
    for i in range(1,len(S)):
        if i == S.index('C'):
            continue
        if not S[i] in ascii_lowercase:
            raise RuntimeError
    print('AC')
except:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
ans = 'WA'
if S[0] == 'A' and S[2:len(S)-1].count('C') == 1:
    for i in S:
        komozi = ''
        if i == 'A' or 'C':
            i = i.replace('A','a')
            i = i.replace('C','b')
        komozi += i
        if komozi.islower():
            ans = 'AC'
print(ans)

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = list(input())
ans = 'WA'
if S[0] == 'A' and S[2:len(S)-1].count('C') == 1 and S.count('A') ==1 and S.count('C') == 1:
    komozi =''
    for i in S:
        if i == 'A' or 'C':
            i = i.replace('A','')
            i = i.replace('C','')
        komozi += i
    if komozi.islower():
        ans = 'AC'
print(ans)
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

if S[0] == 'A':
    index = S.find('C')
    new_S = S[:index] + S[(index + 1):]
    if 1 < index < len(new_S) and not 'C' in new_S:
        print('AC')
        exit()

print('WA')

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()

if S[0] == 'A':
    index = S.find('C')
    new_S = S[1:index] + S[(index + 1):]
    if 1 < index < len(S) - 1 and new_S.islower():
        print('AC')
        exit()

print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
if s[0] == 'A' and s[2:-1].count('C')==1:
    c=0
    for i in s:
        if i.islower():c+=1
    if c==2:
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
s = input()
if s[0] == 'A' and s[2:-1].count('C')==1:
    c=0
    for i in s:
        if i.isupper():c+=1
    if c==2:
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
S_len = len(S)
import re

S_check = []
a = []
b = []
if S[0] == 'A':
    for i in range(2,S_len-1):
        if S[i] == 'C':
            S_check.append(1)
    if len(S_check) == 1:
        a = re.findall('A', S)
        b = re.findall('C', S)
        if len(a) == 1 and len(b) == 1 :
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')



Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
S_len = len(S)
import re

S_check = []
a = []
b = []
if S[0] == 'A':
    for i in range(2,S_len-1):
        if S[i] == 'C':
            S_check.append('a')
    if len(S_check) == 1:
        S_list = list(S)
        S_list[0] = str('a')
        C_loc = S.find('C')
        S_list[C_loc] = str('c')
        S = "".join(S_list)
        if S.islower() == True:
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

a = S.count('A')
c = S[2:-1].count('C')

i = S.find('C')
if S[0] == 'A' and a == 1 and c == 1:
    temp = S[2:i]+S[i+1:-1]
    if 1 < i and i < len(S)-1 and temp.islower():
        print('AC')
    else:
        print('WC')
else:
    print('WC')

Failing test case input:
@ootBD

Expected output:
WA


Actual output:
WC


Fixed submission (verdict: Accepted):
S = input()

a = S.count('A')
c = S[2:-1].count('C')

i = S.find('C')
if S[0] == 'A' and a == 1 and c == 1:
    temp = S[1:i]+S[i+1:]
    if 1 < i and i < len(S)-1 and temp.islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
def atcoder(p):
    count = 0
    if p[0]=='A':
        count += 1
    count_C=0
    for i in range(len(p)-2):
        if p[i+2]=='C':
            count_C += 1
    if count_C == 1:
        count += 1
    count_c = 0
    for i in range(len(p)-2):
        if p[i].upper() ==p[i]:
            count_c+=1
    if count_c ==2:
        count += 1
    if count ==3:
        print('Yes')
    else:
        print('No')
         
atcoder(a)

Failing test case input:
@tBooC

Expected output:
WA


Actual output:
No


Fixed submission (verdict: Accepted):
a = input()
def atcoder(p):
    count = 0
    if p[0]=='A':
        count += 1
    
    count_C=0
    for i in range(len(p)-2):
        if p[i+2]=='C':
            count_C += 1
    if count_C == 1:
        count += 1
    
    count_c = 0
    for i in range(len(p)-1):
        if p[i].upper() ==p[i]:
            count_c+=1
    if p[len(p)-1]==p[len(p)-1].upper():
        count_c+=2
    if len(p)==3:
        count_c+=2
    if count_c ==2:
        count += 1
    
    
    if count ==3:
        print('AC')
    else:
        print('WA')
         
atcoder(a)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

if s[0] == 'A' and s[2:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower() or letter == 'C':
      print('WA')
      break
  else:
    print('AC')
else:
  print('AC')


Failing test case input:
fqCBdr

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
s = input()

if s[0] == 'A' and s[2:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower() and letter != 'C':
      print('WA')
      break
  else:
    print('AC')
else:
  print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())

if s[0] == "A" and s[2:-1].count("C") == 1 and s.count("A")==1:

    s.remove("A")
    s.remove("C")
    
    if "".join(s).lower() == "".join(s):
        print("AC")

else:
    print("WA")

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:

Fixed submission (verdict: Accepted):
s = list(input())

if s[0] == "A" and s[2:-1].count("C") == 1:
    s.remove("A")
    s.remove("C")
    
    if "".join(s).lower() == "".join(s):
        print("AC")
    else:
        print("WA")

else:
    print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

if S.startswith("A") and S[2:-2].count("C") == 1:
    if S[1].islower() and S[2:-2].lstrip("C").islower() and S[-1].islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()

if S.startswith("A") and S[2:-1].count("C") == 1 and S[1].islower() and S[-1].islower():
    deleted_S = S[2:-1].replace("C", "")
    if len(deleted_S) == 0:
        print("AC")
    elif deleted_S.islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
if s[0] =='A' and s[2:-1].count('C') ==1 and s[1:].replace('C', '').islower:
  print('AC')
else:
  print('WA')

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
s=input()
if s[0] =='A' and s[2:-1].count('C') ==1 and s[1:].replace('C', '').islower():
  print('AC')
else:
  print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
s = input()
pattern = r'^A\w{1}[AB,D-z]*C{1}[AB,D-z]*\w{1}$'

if re.match(pattern, s):
    print("AC")
else:
    print("WA")


Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
import re
s = input()
pattern = r'^A[a-z][a-z]*C{1}[a-z]*[a-z]$'

if re.match(pattern, s):
    print("AC")
else:
    print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
j= 0
count = 0
if not s[0] == 'A':
    print('WA')
    exit()

for i in s[2:-1]:
    if i == 'C':
        count += 1
        tmp = j
    j += 1
if not count == 1:
    print('WA')
    exit()

del s[0]
del s[tmp-1]
s = ''.join(s)
if s.isupper():
    print('WA')
    exit()

print('AC')

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
s = list(input())
j= 2
count = 0
if not s[0] == 'A':
    print('WA')
    exit()

for i in s[2:-1]:
    if i == 'C':
        count += 1
        tmp = j
    j += 1
if not count == 1:
    print('WA')
    exit()

del s[0]
del s[tmp-1]
s = ''.join(s)

if s.islower():
    print('AC')
    exit()

print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
 
S = input()
matchObj = re.match("^A[a-z]*C{1}[a-z]*[a-z]$", S)
if matchObj:
  print("AC")
else:
  print("WA")

Failing test case input:
ACoder

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
import re
 
S = input()
matchObj = re.match("^A[a-z]+C{1}[a-z]*[a-z]$", S)
if matchObj:
  print("AC")
else:
  print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def AcCepted(s):

    ans = "WA"

    if s[0] == "A" and s[2:-2].count("C") == 1:
        s = s.replace("C" , "c")
        if s[1:].islower():
            ans = "AC"

    return ans

def main():
    s = str(input())
    print(AcCepted(s))

if __name__ == '__main__':
    main()

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):

def AcCepted(s):

    ans = "WA"

    if s[0] == "A" and s[2:-1].count("C") == 1:
        s = s.replace("C" , "c")
        if s[1:].islower():
            ans = "AC"

    return ans

def main():
    s = str(input())
    print(AcCepted(s))

if __name__ == '__main__':
    main()
Problem: p03289
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
if s[0] == "A" and s[2:-1].count("C")==1:
    c = s[2:-1].index('C')
    if (s[1]+s[2:c+2]+s[c+3:]).islower():
        print('AC')
else:
    print('WA')

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:

Fixed submission (verdict: Accepted):
s = input()
if s[0] == "A" and s[2:-1].count("C")==1:
    c = s[2:-1].index('C')
    if (s[1]+s[2:c+2]+s[c+3:]).islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
if s[0] == 'A' and s[2:-1].count('C') == 1 and s.count('C') == 1:
     s.remove('A')
     s.remove('C')
     if str(s).islower() == 0:
          print('AC')
     else:
          print('WA')
else:
     print('WA')

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
s = input()
ans = 'WA'
a = []
if s[0] == 'A' and s[2:-1].count('C') == 1:
     a = list(s)
     a.remove('A')
     a.remove('C')
     a = str(a)
     if a.islower() == True:
          ans = 'AC'
print(ans)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(input())
k = 0
for i in range(len(a)):
	if i == 0 and a[i] != "A":
		k = 1
		break
	elif i >= 2 and i <= len(a)-2:
		if a[i] == "C":
			k += 2
		elif a[i] > z or a[i] < a:
			k = 1
			break
	else:
		if a[i] > "z" or a[i] < "a":
			k = 1
			break
if k == 2:
	print("AC")
else:
	print("WA")



Failing test case input:
AtCoder

Expected output:
AC

Actual output:
WA


Fixed submission (verdict: Accepted):
a = list(input())
k = 0
for i in range(len(a)):
	if i == 0 and a[i] != "A":
		k = 1
		break
	elif i == 0:
		k = k
	elif i >= 2 and i <= len(a)-2:
		if a[i] == "C":
			k += 2
		elif a[i] <= "z" and a[i] >= "a":
			k = k
		else:
			k = 1
			break
	else:
		if a[i] <= "z" and a[i] >= "a":
			k = k
		else:
			k = 1
			break
if k == 2:
	print("AC")
else:
	print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())

a = False
c = False
small = False
for i in range(len(s)):
    if i == 0 and s[i] == "A":
        a = True
    if a == True and i >= 2 and i < len(s) - 1 and s[i] == "C" and c == False:
        c = True
    elif s[i] >= "a" and s[i] <= "z":
        small = True
    else:
        small = False
        break

if a == True and c == True and small == True:
    print("AC")
else:
    print("WA")

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
s = list(input())

a = False
c = False
small = False
for i in range(len(s)):
    if i == 0 and s[i] == "A":
        a = True
    elif a == True and i >= 2 and i < len(s) - 1 and s[i] == "C" and c == False:
        c = True
    elif s[i] >= "a" and s[i] <= "z":
        small = True
    else:
        small = False
        break

if a == True and c == True and small == True:
    print("AC")
else:
    print("WA")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
count = 0
ans = "WA"
L = []
for k in range(len(S)):
    L.append(S[k])

if S[0] == "A":
    for i in range(2,len(S)-1):
        if S[i] == "C":
            count += 1
            c = i
    if count == 1:
        L[0] = "a"
        L[i] = "c"
        for j in range(len(L)):
            if L[j].islower:
                count += 1
        if count == len(L)+1:
            ans = "AC"
print(ans)

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
count = 0
ans = "WA"
L = []
for k in range(len(S)):
    L.append(S[k])

if L[0] == "A":
    for i in range(2,len(L)-1):
        if L[i] == "C":
            count += 1
            c = i
    if count == 1:
        count2 = 0
        for j in range(len(L)):
            if L[j].islower():
                count2 += 1
        if count2 == len(L)-2:
            ans = "AC"
print(ans)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

a = S.count('A')
c = S.count('C')

i = S.find('C')
if S[0] == 'A' and a == 1 and c == 1:
    test = S[1:i]+S[i+1:]
    if test.islower():
        print('AC')
    else:
        print('WC')
else:
    print('WC')

Failing test case input:
sAdpdC

Expected output:
WA


Actual output:
WC


Fixed submission (verdict: Accepted):
S = input()

a = S.count('A')
c = S[2:-1].count('C')

i = S.find('C')
if S[0] == 'A' and a == 1 and c == 1:
    temp = S[1:i]+S[i+1:]
    if 1 < i and i < len(S)-1 and temp.islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

if s[0] == 'A' and 'C' in s[2:-2] and s[1:].replace('C', '').islower():
    print('AC')
else:
    print('WA')


Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
s = input()

if s[0] == 'A' and 'C' in s[2:-1] and s[1:].replace('C', '',1).islower():
    print('AC')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
s = input()
cnt = 0
if (s[2:-2].count('C') != 1):
    print('WA')
    exit(0)
for i in range(len(s)):
    if (s[i] >= 'A' and s[i] <= 'Z'):
        cnt += 1
        if (cnt >= 3):
            print('WA')
            exit(0)
print('AC')


Failing test case input:
fqCBcr

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
import re
s = input()
cnt = 0
if (s[2:-1].count('C') != 1):
    print('WA')
    exit(0)
for i in range(len(s)):
    if (s[i] >= 'A' and s[i] <= 'Z'):
        cnt += 1
        if (cnt >= 3):
            print('WA')
            exit(0)
print('AC') if s[0]=='A' else print('WA')
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
cnt = 0
if S[0] == "A":
    for i in S[1: len(S) - 1]:
        if i == "C":
            cnt += 1
sr = S.replace("A", "")
src = sr.replace("C", "")
if src.islower() and cnt == 1:
    print("AC")
else:
    print("WA")

Failing test case input:
ACodes

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
cnt = 0
if S[0] == "A":
    for i in S[2: len(S) - 1]:
        if i == "C":
            cnt += 1
sr = S.replace("A", "")
src = sr.replace("C", "")
if src.islower() and cnt == 1:
    print("AC")
else:
    print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
if S[0] != "A":
  print("WA")
  exit()
elif S[2:-2].count("C") == 1 and S.count("C") == 1:
  print("WA")
  exit()
else:
  S = S[1:].replace("C", "")
  if S.islower():
    print("AC")
  else:
    print("WA")

Failing test case input:
Abcpteo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
if S[0] != "A":
  print("WA")
  exit()
elif S[2:-1].count("C") != 1 or S[:2].count("C") != 0 or S[-1:].count("C") != 0:
  print("WA")
  exit()
else:
  S = S[1:].replace("C", "")
  if S.islower():
    print("AC")
  else:
    print("WA")

Problem: p03289
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
ans = 'WA'
if S[0] == 'A' and S[2:-1].count('C'):
    if S[1:].replace('C', '').islower():
        ans = 'AC'
print(ans)

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
ans = 'WA'
if S[0] == 'A' and S[2:-1].count('C') == 1:
    if S[1:].replace('C', '').islower():
        ans = 'AC'
print(ans)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
ans="AC"
cnt1=0
cnt2=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="WA"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="WA"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt2+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1:
    ans="WA"
print(ans)

Failing test case input:
AdBoudu

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
s=input()
ans="AC"
cnt1=0
cnt2=0
cnt3=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="WA"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="WA"
            elif s[i].isupper()*1>0:
                ans="WA"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt3+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1 or cnt3!=0:
    ans="WA"
print(ans)
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
if(S[0]=='A'):
  S_1=S[1:]
else:
  print('WA')
  exit()
if(S[2:(len(S)-1)].count('C')==1):
  S_2=S_1[0:len(S_1)-1].replace('C','')
else:
  print('WA')
  exit()
S_3=S_2+S[-1]

print('AC' if (S_3.islower) else 'WA')

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S=input()
if(S[0]=='A'):
  S_1=S[1:]
else:
  print('WA')
  exit()
if(S[2:(len(S)-1)].count('C')==1):
  S_2=S_1[0:len(S_1)-1].replace('C','')
else:
  print('WA')
  exit()
S_3=S_2+S[-1]



print('AC' if (S_3.islower()) else 'WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())

if s[0] != "A":
    print("WA")
    exit()
if s[2:-2].count("C") != 1:
    print("WA")
    exit()
for t in s:
    if t.isupper() and t != "A" and t != "C":
        print("WA")
        exit()

print("AC")


Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
s = list(input())

if s[0] != "A":
    print("WA")
    exit()
if s[2:-1].count("C") != 1:
    print("WA")
    exit()
for t in s:
    if t.isupper() and t != "A" and t != "C":
        print("WA")
        exit()

print("AC")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
ans = "AC"
if S[0] != "A":
  ans = "WA"
else:
  count_c = 0
  for i in range(1,len(S)):
    if 2 <= i < len(S)-1 and S[i] == "C":
      count_c += 1
      continue
    if not S[i].islower:
      ans = "WA"
  if count_c != 1:
    ans = "WA"
print(ans)


Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
ans = "AC"
if S[0] != "A":
  ans = "WA"
else:
  count_c = 0
  for i in range(1,len(S)):
    if 2 <= i <= len(S)-2 and S[i] == "C":
      count_c += 1
      continue
    if not S[i].islower():
      ans = "WA"
  if count_c != 1:
    ans = "WA"
print(ans)
Problem: p03511
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    L = int(input())
    S, T = (input() for _ in [0] * 2)

    ans = []
    apnd = ans.append
    a = S
    b = T
    i = 0
    for _ in [0] * 2:
        while 1:
            x = L - (len(b) * i)
            div_, mod_ = divmod(x, len(a))
            if not mod_:
                apnd(a * div_ + b * i)
                break
            i += 1
        a, b = b, a
    print(min(ans))

main()


Failing test case input:
8
coding
festiual

Expected output:
festiual


Actual output:
codingcodingcodingcoding


Fixed submission (verdict: Accepted):
def main():
    L = int(input())
    S, T = (input() for _ in [0] * 2)

    ans = []
    apnd = ans.append
    a = S
    b = T
    i = 0
    for _ in [0] * 2:
        while 1:
            x = L - (len(b) * i)
            div_, mod_ = divmod(x, len(a))
            if not mod_:
                apnd(a * div_ + b * i)
                break
            i += 1
        i = 0
        a, b = b, a
    print(min(ans))

main()