ZhenlongDai/ACPR huggingface dataset:
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
print("AC" if s[1]=="A" and s[2:-1].count("C")==1 and s[1:].replace("C","").islower() else "WA")

Failing test case input:
AtCoder

Expected output:
AC

Actual output:
WA


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

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
S = input()
if not S[0] == 'A':
    print('WA')
elif S[2:-1].count('C') != 1:
    print('1WA')
elif len(re.findall('[A-Z]', S)) != 2:
    print('WA')
else:
    print('AC')

Failing test case input:
Abcqteo

Expected output:
WA


Actual output:
1WA


Fixed submission (verdict: Accepted):
import re
S = input()
if not S[0] == 'A':
    print('WA')
elif len(S) > 4 and S[2:-1].count('C') != 1:
    print('WA')
elif len(S) == 4 and S[2:].count('C') != 1:
    print('WA')
elif len(re.findall('[A-Z]', S)) != 2:
    print('WA')
else:
    print('AC')

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 "C" in S[2:-1]:
    s = S.replace("A", "a").replace("C", "c")
    t = s.lower();
    if s == t:
        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 and "C" in S[2:-1]:
    s = S.replace("A", "a").replace("C", "c")
    t = s.lower();
    if s == t:
        print("AC")
        exit()
print("WA")

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

def func(s):
    if s[0] == 'A':
        if s[2:-1].count('C') == 1:
            s_ = s[2:-1].replace('C', '')
            return (s_ + s[-1]).islower
        else:
            return False
    return False

if func(S):
    print('AC')
else:
    print('WA')

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


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

def func(s):
    if s[0] == 'A':
        if s[2:-1].count('C') == 1:
            s_ = s[2:-1].replace('C', '')
            ss = s[1] + s_ + s[-1]
            return ss.islower()
        else:
            return False
    else:
        return False

if func(S):
    print('AC')
else:
    print('WA')

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



s = str(input())

s1 = s[0]

for i in range(2, len(s) - 1):
    if s[i] == 'c' or s[i] == 'C':
        s1 += s[i]

    else:
        continue

if s1.isupper() and 'C' in s1:
    print('AC')

else:
    print('WA')


Failing test case input:
@tBnCo

Expected output:
WA


Actual output:
AC


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

ans = 'AC'

if s[0] != 'A':
    ans = 'WA'

for i in range(1, len(s)):
    if s[i].isupper():
        if i == 1 or i == len(s) - 1 or s[i] != 'C':
            ans = 'WA'

if s.count('C') != 1:
    ans = 'WA'

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

cap = S[0]
mid = list(S[2:-1])
print(mid)

if (mid.count('C') >= 1):
    index = S.index('C')
    strr = S[1:index] + S[index + 1 :]
else:
    print('WA')
    exit()


if (cap == 'A' and mid.count('C') == 1 and strr.islower() == True):
    print('AC')
else:
    print('WA')


Failing test case input:
BcycliC

Expected output:
WA


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


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

cap = S[0]
mid = list(S[2:-1])

if (mid.count('C') >= 1):
    index = S.index('C')
    strr = S[1:index] + S[index + 1 :]
else:
    print('WA')
    exit()


if (cap == 'A' and mid.count('C') == 1 and strr.islower() == True):
    print('AC')
else:
    print('WA')

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

Failing test case input:
AtCoder

Expected output:
AC

Actual output:
WA


Fixed submission (verdict: Accepted):
s=input()
ans='AC'
if s[0]!='A':
  ans='WA'
s=s[1:]
if s[1:-1].count('C')!=1:
  ans='WA'
s=s.replace('C','c')
for i in s:
  if i.islower()==False:
    ans='WA'
    break
print(ans)

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

s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","")
        s=s.replace("C","")
        if s.isupper()==False:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","b")
        t=s.lower()
        if s==t:
            print("AC")
        else:
            print("WA")
    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()
elif S[2:-2].count("C") != 1:
  print("WA")
  exit()
else:
  if S.count("C") != 0:
    print("WA")
  else:
    S = S[1:].replace("C", "")
    if S.islower():
      print("AC")
    else:
      print("WA")

Failing test case input:
AtCoddr

Expected output:
AC


Actual output:
WA


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.4.3), verdict: Wrong Answer):
S = input()
s = S[2:-1]

judge = "AC"
if S[0] != "A":
	judge = "WA"
else:
	if s.count("C") != 1:
		judge = "WA"
	else:
		S = S.replace("A", "")
		S = S.replace("C", "")
		ch = "Yes"
		print(S)
		for i in S:
			if ord(i) <= 96:
				ch = "No"
		if ch == "No":
			judge = "WA"

print(judge)

Failing test case input:
AtCoddr

Expected output:
AC


Actual output:
toddr
AC


Fixed submission (verdict: Accepted):
S = input()
s = S[2:-1]

judge = "AC"
if S[0] != "A":
	judge = "WA"
else:
	if s.count("C") != 1:
		judge = "WA"
	else:
		S = S.replace("A", "")
		S = S.replace("C", "")
		ch = "Yes"
		for i in S:
			if ord(i) <= 96:
				ch = "No"
		if ch == "No":
			judge = "WA"

print(judge)

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)-1):
        if p[i].upper() ==p[i]:
            count_c+=1
    if p[len(p)-1]==p[len(p)-1].upper():
        count_c+=1
    if count_c ==2:
        count += 1
    
    if count ==3:
        print('AC')
    else:
        print('WA')
         
atcoder(a)

Failing test case input:
AcycliC

Expected output:
WA

Actual output:
AC


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

flag = True

if S[0] != 'A':
    flag = False

idx = None
for i, s in enumerate(S[3:-1]):
    if s == 'C':
        if idx == None:
            idx = i + 3
        else:
            flag = False

for i, s in enumerate(S):
    if i == 0 or i == idx:
        continue

    if s != s.lower():
        flag = False

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

Failing test case input:
AtCoder

Expected output:
AC

Actual output:
WA


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

flag = True

if S[0] != 'A':
    flag = False

idx = None
for i, s in enumerate(S[2:-1]):
    if s == 'C':
        if idx == None:
            idx = i + 2
        else:
            flag = False

if idx == None:
    flag = False

for i, s in enumerate(S):
    if i == 0 or i == idx:
        continue

    if s != s.lower():
        flag = False

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

Failing test case input:
@ootBD

Expected output:
WA


Actual output:
No


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()
flag = True
if S[0] != 'A' or S[2:-2].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:
  flag = False
for s in S[2:-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()
lead = S[0]
sub = S[2:-1]
C = sub.count('C')
sub_rep = sub.replace('C','a')
if lead == 'A' and C == 1:
  for i in range(len(S)):
    if i == 'A' or 'C':
      pass
    else:
      if i.islower():
        pass
      else:
        print('WA')
        exit()
  print('AC')
  exit()
else:
  print('WA')

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
lead = S[0]
sub = S[2:-1]
C = sub.count('C')
if lead == 'A' and C == 1:
  for x in range(1,len(S)):
    if S[x].islower() or S[x] == 'C':
      pass
    else:
      print('WA')
      exit()
  print('AC')
else:
  print('WA')

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

cnt = 0
if S[0] != 'A' or S[-1] == 'C':
    cnt += 1

A = S.replace('A', '')
A = A.replace('C', '')
if len(S) -2 != len(A) or A.islower() == False:
    cnt += 1
if cnt > 0:
    print('WA')
else:
    print('AC')

Failing test case input:
ACoder

Expected output:
WA

Actual output:
AC


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

cnt = 0
if S[0] != 'A' or S[-1] == 'C' or S[1] == 'C':
    cnt += 1

A = S.replace('A', '')
A = A.replace('C', '')
if len(S) -2 != len(A) or A.islower() == False:
    cnt += 1
if cnt > 0:
    print('WA')
else:
    print('AC')
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
if s[0] == "A" and s[2:-1] in "C":
  i = s.index("C")
  ss = s[1:i] + s[i+i:]
  if ss.islower() == True:
    print("AC")
  else:
    print("WA")
else:
  print("WA")


Failing test case input:
AtCoder

Expected output:
AC

Actual output:
WA


Fixed submission (verdict: Accepted):
s = input()
if s[0] == "A" and s[2:-1].count("C") == 1:
  i = s.index("C")
  ss = s[1:i] + s[i+1:]
  if ss.islower() == True:
    print("AC")
  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.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')

        
print('WC')

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
AC
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=list(input())
print('AC' if (s[0]=='A') and ('C' in s[2:-1]) and all(i.islower for i in s if not i in ['A','C']) and (s.count('A')==s.count('C')==1) else 'WA')

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


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

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
s = input()
s = [c for c in s]
flg = False
if s[0] == 'A':
    if s[2:-1].count('C') == 1:
        if s.count('C') == 1:
            s.remove('A')
            s.remove('C')
            print(s)
            for c in s:
                if not c.islower():
                    flg = False
                    break
                flg = True
print('AC' if flg else 'WA')

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
['t', 'o', 'd', 'd', 's']
AC


Fixed submission (verdict: Accepted):
import sys
s = input()
s = [c for c in s]
flg = False
if s[0] == 'A':
    if s[2:-1].count('C') == 1:
        if s.count('C') == 1:
            s.remove('A')
            s.remove('C')
            for c in s:
                if not c.islower():
                    flg = False
                    break
                flg = True
print('AC' if flg else 'WA')
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
count = 0

if S[0] == 'A':
    count += 1
if 'C' in S[2:-1]:
    count += 1
print(S)
S = S.replace("A", "")
S = S.replace("C", "")

if S.islower():
    count += 1

if count == 3:
    print("AC")
else:
    print('WA')

Failing test case input:
@uBoddu

Expected output:
WA


Actual output:
@uBoddu
WA


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

if S[0] == 'A':
    count += 1
if S[2:-1].count("C") == 1:
    count += 1
S = S.replace("C", "")
S=S[1:]
if S.islower():
    count += 1

if count == 3:
    print("AC")
else:
    print('WA')

Problem: p03289
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
S = input()
check = 0
tmp = S[2:-1].split('C')
if (S[0]=='A') and (len(tmp)==2) and S[1].lower()==S[1]:
    for i in range(len(tmp)):
        if tmp[i].lower() != tmp[i]:
            check += 1
    if check == len(tmp):
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Failing test case input:
AtCoddr

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
S = input()
check = 0
tmp = S[2:-1].split('C')
if (S[0]=='A') and (len(tmp)==2) and S[1].lower()==S[1] and S[-1].lower()==S[-1]:
    for i in range(len(tmp)):
        if tmp[i].lower() == tmp[i]:
            check += 1
    if check == len(tmp):
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
str=list(input())
flag=True
if str[0]!='A':
    flag=False
str[0]='a'
cnt=0
for i in range(2,len(str)-1):
    if str[i]=='C':
        cnt+=1
        if cnt==1:
            str[i]='c'
if cnt!=1:
    flag=False

tmp="".join(str)
print(tmp)
if not tmp.islower():
    flag=False

if flag==True:
    print("AC")
else:
    print("WA")

Failing test case input:
BcycliC

Expected output:
WA


Actual output:
acycliC
WA


Fixed submission (verdict: Accepted):
str=list(input())
flag=True
if str[0]!='A':
    flag=False
str[0]='a'
cnt=0
for i in range(2,len(str)-1):
    if str[i]=='C':
        cnt+=1
        if cnt==1:
            str[i]='c'
if cnt!=1:
    flag=False

tmp="".join(str)
if not tmp.islower():
    flag=False

if flag==True:
    print("AC")
else:
    print("WA")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
S = list(S)
flag = True
if S[0] != "A":
    flag = False
flag1 = False
for i in range(3,len(S)-1):
    if S[i] == "C" and flag1:
        flag = False
        S[i] = 'c'
        
    elif S[i] == "C" and not flag1:
        flag1 = True
if not flag1:
    flag = False
S[0] = "a"
for i in range(len(S)):
    if not S[i].islower():
        flag = False
        
if flag:
    print('AC')
else:
    print('WA')

Failing test case input:
AtCoder

Expected output:
AC

Actual output:
WA


Fixed submission (verdict: Accepted):
S = input()
S = list(S)
flag = True
if S[0] != "A":
    flag = False
flag1 = False
for i in range(2,len(S)-1):
    if S[i] == "C" and flag1:
        flag = False
        
        
    elif S[i] == "C" and not flag1:
        flag1 = True
        S[i] = "c"
if not flag1:
    flag = False
S[0] = "a"
for i in range(len(S)):
    if not S[i].islower():
        flag = False
        
if flag:
    print('AC')
else:
    print('WA')

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

if S[0] == "A":
    if S[2:-1].count("C") == 1:
        Ssorted = sorted(S)
        if Ssorted[0] < Ssorted[2]:
            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()

if S[0] == "A":
    if S[2:-1].count("C") == 1:
        Ssorted = sorted(S)
        if "Z" < Ssorted[2]:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = str(input())
flag = 0
flag2 = 0
if s[0] == 'A':
    for i in range(2,len(s)-2):
        if s[i] == 'C':
            flag += 1
    for i in range(1,len(s)):
        if s[i] == s[i].upper():
            flag2 += 1
print(flag,flag2)
if flag == 1 and flag2 == 1:
    print("AC")
else:
    print("WA")

Failing test case input:
ddCAps

Expected output:
WA


Actual output:
0 0
WA


Fixed submission (verdict: Accepted):
s = str(input())
flag = 0
flag2 = 0
if s[0] == 'A':
    for i in range(2,len(s)-1):
        if s[i] == 'C':
            flag += 1
    for i in range(1,len(s)):
        if s[i] == s[i].upper():
            flag2 += 1

if flag == 1 and flag2 == 1:
    print("AC")
else:
    print("WA")
Problem: p03289
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    c1 = S.pop(1)
    c2 = S.pop(-2)
    other = ''.join(S)
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    if c1=='C' or c2=='C' and c1!=c2:
        flag1 = True
    
    if other.islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('AC')
    else:
        print('WA')


    
if __name__== "__main__":
    main() 











Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    cList = []
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    for i,j in enumerate(S[1:-1]):
        if j=='C':
            cList.append(i+1)
    if len(cList)==1:
        flag1=True
        S.pop(cList[0])
        
    if ''.join(S).islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('AC')
    else:
        print('WA')


    
if __name__== "__main__":
    main()

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
count=0
for i in range(len(s)):
    if s[i] == "A":
        if i!=0:
            print("WA")
            exit()
    elif s[i] == "C":
        if 2<=i<=len(s)-2:
            count += 1
            if count >= 2:
                print("WA")
                exit()
    else:
        if not s[i].islower():
            print("WA")
            exit()
print('AC') if count==1 else print('WA')

Failing test case input:
hzClbcC

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
s=input()
count=0
for i in range(len(s)):
    if i==0:
        if s[i] != "A":
            print("WA")
            exit()
    elif s[i] == "A":
        if i!=0:
            print("WA")
            exit()
    elif s[i] == "C":
        if 2<=i<=len(s)-2:
            count += 1
            if count >= 2:
                print("WA")
                exit()
        else:
            print("WA")
            exit()
    else:
        if not s[i].islower():
            print("WA")
            exit()
print('AC') if count==1 else print('WA')

Problem: p03289
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
if S[0] != 'A':
  print('WA')
elif S[2:-2].count('C') != 1:
  print('WA')
else:
  cindex = S.index('C')
  for i in range(len(S[1:])):
    if i == cindex:
      continue
    if S[i+1].isupper():
      print('WA')
      exit()
  print('AC')
    
    
     

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
S = input()
if S[0] != 'A':
  print('WA')
elif S[2:-1].count('C') != 1:
  print('WA')
else:
  cindex = S.index('C')
  for i in range(len(S[1:])):
    if i+1 == cindex:
      continue
    if S[i+1].isupper():
      print('WA')
      exit()
  print('AC')
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

def hasC(txt):
    c = 0
    for t in txt:
        if t == "C":
            if c > 0:
                return False
            c = 1
    return True
def allLower(txt):
    a = ord("a")
    z = ord("z")
    for t in txt:
        tc = ord(t)
        if tc < a or tc > z:
            return False
    return True


if len(S) < 4:
    print("WA")
    exit()
if S[0] != "A":
    print("WA")
    exit()
if not hasC(S[2:-1]):
    print("WA")
    exit()
nonC = S[:2] + S[2:-1].replace("C", "") + S[-1]
if not allLower(nonC[1:]):
    print("WA")
    exit()
print("AC")

Failing test case input:
Abcqteo

Expected output:
WA


Actual output:
AC


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

def hasC(txt):
    c = 0
    for t in txt:
        if t == "C":
            if c > 0:
                return False
            c = 1
    return c == 1
def allLower(txt):
    a = ord("a")
    z = ord("z")
    for t in txt:
        tc = ord(t)
        if tc < a or tc > z:
            return False
    return True

if S[0] != "A":
    print("WA")
    exit()
if not hasC(S[2:-1]):
    print("WA")
    exit()
nonC = S[:2] + S[2:-1].replace("C", "") + S[-1]
if not allLower(nonC[1:]):
    print("WA")
    exit()
print("AC")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
if S[0] == "A":
    flag = False
    index = -1
    for i, x in enumerate(S[2:-2]):
        if S[i] == "C":
            if flag:
                flag = False
                break
            else:
                flag = True
                index = i
    if flag:
        if (len(S[1:i-1]) == 0 or S[1:i-1].islower()) and (len(S[i+1]) == 0 or S[i+1:].islower()):
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")


Failing test case input:
ACoder

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
if S[0] == "A":
    flag = False
    for i, x in enumerate(S[2:-1]):
        if x == "C":
            if flag:
                flag = False
                break
            else:
                flag = True
                index = i+2
    if flag:

        if (len(S[1:index]) == 0 or S[1:index].islower()) and (len(S[index+1:]) == 0 or S[index+1:].islower()):
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")
Problem: p03289
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    c1 = S.pop(1)
    c2 = S.pop(-2)
    other = ''.join(S)
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    if (c1=='C' or c2=='C') and c1!=c2:
        flag1 = True
    
    if other.islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('CA')
    else:
        print('WA')


    
if __name__== "__main__":
    main() 











Failing test case input:
AtCodds

Expected output:
AC


Actual output:
CA


Fixed submission (verdict: Accepted):
from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    cList = []
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    for i,j in enumerate(S[1:-1]):
        if j=='C':
            cList.append(i+1)
    if len(cList)==1:
        flag1=True
        S.pop(cList[0])
        
    if ''.join(S).islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('AC')
    else:
        print('WA')


    
if __name__== "__main__":
    main()

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

if S[0] == 'A':
    count += 1
if 'C' in S[2:-1]:
    count += 1

S = S.replace("A", "")
S = S.replace("C", "")

if S.islower():
    count += 1

if count == 3:
    print("AC")
else:
    print('WA')

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


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

if S[0] == 'A':
    count += 1
if S[2:-1].count("C") == 1:
    count += 1
S = S.replace("C", "")
S=S[1:]
if S.islower():
    count += 1

if count == 3:
    print("AC")
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","b")
        if s.isupper()==False:
            print(s.isupper())
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Failing test case input:
AtCoder

Expected output:
AC

Actual output:
False
AC


Fixed submission (verdict: Accepted):
s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","b")
        t=s.lower()
        if s==t:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

alpha2num = lambda c: ord(c) - ord('a') + 1

s = input()
ans = "WA"
if s[0] == "A" and s.count("C") == 1:
    if 2 <= s.index("C") <= len(s) - 2:
        for i in range(1, len(s)):
            if i != s.index("C") and 1 <= alpha2num(s[i]) <= 26:
                ans = "AC"
                continue
            else:
                ans = "WA"
                break
print(ans)

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

alpha2num = lambda c: ord(c) - ord('a') + 1

s = input()
ans = "WA"
if s[0] == "A" and s.count("C") == 1:
    if 2 <= s.index("C") <= len(s) - 2:
        for i in range(1, len(s)):
            if i == s.index("C"):
                continue
            elif 1 <= alpha2num(s[i]) <= 26:
                ans = "AC"
            else:
                ans = "WA"
                break
print(ans)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
S = list(input())

if S[0] == 'A':
    
    if S[2:-1].count('C') == 1:
        del S[-2]
        del S[2]
        del S[0]
        s = ''.join(S)
        if s.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
from collections import Counter
S = list(input())

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        idx = S[2:-1].index('C')
        del S[idx+2]
        del S[0]
        s = ''.join(S)
        if s.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

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

if S[0] != 'A':
    print('WC')
elif S[2:-1].count('C') != 1:
    print('WC')
else:
    S = list(S[1:])
    S.remove('C')
    S = ''.join(S)
    if S.islower():
        print('AC')
    else:
        print('WC')


Failing test case input:
teorccA

Expected output:
WA


Actual output:
WC


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

if S[0] != 'A':
    print('WA')
elif S[2:-1].count('C') != 1:
    print('WA')
else:
    S = list(S[1:])
    S.remove('C')
    S = ''.join(S)
    if S.islower():
        print('AC')
    else:
        print('WA')
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
word=input()
cflg=True
if word[0]!='A':
  cflg=False
  print(cflg)
elif word[2:-1].count('C')!=1:
  cflg=False
cnt=0
for l in word[1:]:
  if l.isupper():
    cnt+=1
else:
  if cnt!=1:
    cflg=False
  
if cflg:
  print('AC')
else:
  print('WA')

Failing test case input:
redpctA

Expected output:
WA


Actual output:
False
WA


Fixed submission (verdict: Accepted):
word=input()
cflg=True
if word[0]!='A':
  cflg=False
elif word[2:-1].count('C')!=1:
  cflg=False
cnt=0
for l in word[1:]:
  if l.isupper():
    cnt+=1
else:
  if cnt!=1:
    cflg=False
  
if cflg:
  print('AC')
else:
  print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
temp_s = s[1:-1]


if (s[0]=="A")and("C" in temp_s):
  s.remove("A")
  s.remove("C")
  if len(set(s) - set(list("".join(s).lower())))==0:
    print("AC")
  else:
    print("WA")
else:
    print("WA")

Failing test case input:
ACodds

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
s = list(input())
temp_s = s[2:-1]


if (s[0]=="A")and("C" in temp_s):
  s.remove("A")
  s.remove("C")
  temp = s.copy()
  if len(set(s) - set(list("".join(temp).lower())))==0:
    print("AC")
  else:
    print("WA")
else:
    print("WA")

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

if not s.startswith('A'):
    print('WA')
elif s[2:len(s) - 3].count('C') == 1:
    print('WA')
else:
    print('AC')

Failing test case input:
Accqteo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
import re

s = input()

if not s.startswith('A'):
    print('WA')
elif s[2:len(s) - 1].count('C') != 1:
    print('WA')
elif len(re.findall('[A-Z]', s)) != 2:
    print('WA')
else:
    print('AC')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def piyo():
    s = list(str(input()))
    c = 0
    if s[0]!="A":
        return "WA"
    if s[1]=="C" or s[2]=="C" or s[len(s)-2]=="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 c>1:
        return "WA"
    return "AC"
        
if __name__ == '__main__':
    hoge=piyo()
    print(hoge)


Failing test case input:
Accrteo

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 (Python (3.4.3), verdict: Wrong Answer):
s = input()
if s[0] == 'A' and s[2:-1].count('C') == 1 and s.count('C') == 1:
     list(s).remove("A")
     list(s).remove("C")
     if s.islower() == 0:
          print('AC')
     else:
          print('WA')
else:
     print('WA')

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


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):
S = input()
S = list(S)
flag = True
if S[0] != "A":
    flag = False
flag1 = False
for i in range(3,len(S)-1):
    if S[i] == "C" and flag1:
        flag = False
        
        
    elif S[i] == "C" and not flag1:
        flag1 = True
        S[i] = "c"
if not flag1:
    flag = False
S[0] = "a"
for i in range(len(S)):
    if not S[i].islower():
        flag = False
        
if flag:
    print('AC')
else:
    print('WA')

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
S = input()
S = list(S)
flag = True
if S[0] != "A":
    flag = False
flag1 = False
for i in range(2,len(S)-1):
    if S[i] == "C" and flag1:
        flag = False
        
        
    elif S[i] == "C" and not flag1:
        flag1 = True
        S[i] = "c"
if not flag1:
    flag = False
S[0] = "a"
for i in range(len(S)):
    if not S[i].islower():
        flag = False
        
if flag:
    print('AC')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
L = len(S)
Flag = True
if not S[0] == 'A':
    Flag = False
cnt = 0
a = str(S[1])
for i in range(2,L-1):
    if S[i] == 'C':
        cnt += 1
    else:
        a += S[i]

if a.lower() and cnt == 1:
    pass
else:
    Flag = False
if Flag:
    print('AC')
else:
    print('WA')

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
S = input()
L = len(S)
Flag = True
if not S[0] == 'A':
    Flag = False
cnt = 0
a = str(S[1])
for i in range(2,L-1):
    if S[i] == 'C':
        cnt += 1
    else:
        a += S[i]
a += S[-1]
if a.islower() and cnt == 1:
    pass
else:
    Flag = False
if Flag:
    print('AC')
else:
    print('WA')

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
letters = input()
C = letters[2:-3]
D = letters.replace("A","a").replace("C","c")


if letters[0] == "A" and C.count("C") == 1 and D.islower() == True  :
  print("AC")
else:
  print("WA")

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
letters = input()
C = letters[2:-1]
D = letters.replace("A","a").replace("C","c")

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

Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


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

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


s = input().rstrip()

def isValid(s:str):
    if s[0] != "A":
        return False
    if s[1] == s[1].upper():
        return False
    sub = s[2:]
    if len([i for i in sub if i == "C"]) != 1:
        return False

    sub2 = sub.replace("C", "")
    if sub2 != sub2.lower():
        return False
    return True

ans = "AC"

if not isValid(s):
    ans = "WA"

print(ans)


Failing test case input:
AcycliC

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):


s = input().rstrip()

def isValid(s:str):
    if s[0] != "A":
        return False
    if s[1] == s[1].upper():
        return False
    sub = s[2:-1]
    if len([i for i in sub if i == "C"]) != 1:
        return False

    sub2 = s[1] + sub.replace("C", "") + s[-1]
    if sub2 != sub2.lower():
        return False
    return True

ans = "AC"

if not isValid(s):
    ans = "WA"

print(ans)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
if s[0] != "A":
    print("WA")
    exit()
if s[1].isupper():
    print("WA")
    exit()
if s[-1].isupper() or s[-1] == "C":
    print("WA")
    exit()
flag = False
for c in s[3:]:
    if c == "C":
        if flag:
            print("WA")
            exit()
        else:
            flag = True
    if c.isupper():
        print("WA")
        exit()
if flag:
    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 s[1].isupper():
    print("WA")
    exit()
if s[-1].isupper() or s[-1] == "C":
    print("WA")
    exit()
flag = False
for c in s[2:]:
    if c == "C":
        if flag:
            print("WA")
            exit()
        else:
            flag = True
    else:
        if c.isupper():
            print("WA")
            exit()
if flag:
    print("AC")
else:
    print("WA")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
print("WA" if re.match('A[a-z][a-z][a-z]*C[a-z]*[a-z]',input()) == None else "AC")

Failing test case input:
AtCoddr

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
import re
print("WA" if re.match('^A[a-z]+C[a-z]+$',input()) == None else "AC")
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
if S.find('A')==0 and S.find('C')>=2:
	S.strip('A')
	S.strip('C')
	if S.islower:
		print('Yes')
	else:
		print('No')
else:
	print('No')

Failing test case input:
obtpce@

Expected output:
WA


Actual output:
No


Fixed submission (verdict: Accepted):
S=input()
if S.find('A')==0 and len(S)-2>=S.find('C')>=2:
	S=S.replace('A','a',1)
	S=S.replace('C','c',1)
	if S.islower():
		print('AC')
	else:
		print('WA')
else:
	print('WA')

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

f = 1
c = 0

for i in range(len(s)):
    on = 0
    if i==0:
        if not s[i]=='A':
            f = 0
            on = 1
    elif i>=2 and i<=len(s)-2:
        if s[i] == 'C':
            c += 1
            on = 1
            
    if on == 0 and s[i].islower()==False:
        f = 0
        
if c!=1:
    f=0
    
if f==0:
    print("WA")
else:
    print("AC")

Failing test case input:
AtCoddr

Expected output:
AC


Actual output:
WA


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

f = 1
c = 0

for i in range(len(s)):
    on = 0
    if i==0:
        if not s[i]=='A':
            f = 0
        else:
            on = 1
    elif i>=2 and i<=len(s)-2:
        if s[i] == 'C':
            c += 1
            on = 1
            
    if on == 0 and s[i].islower()==False:
        f = 0
        
if c!=1:
    f=0
    
if f==0:
    print("WA")
else:
    print("AC")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
if S[0] != 'A':
    print('WA')
    exit()
if len([s for s in S[3:-2] if s == 'C']) != 1:
    print('WA')
    exit()
SL = [s for s in S if s not in ['A', 'C']]
if not all([sl.islower() for sl in SL]) or len(SL) + 2 != len(S):
    print('WA')
    exit()
print('AC')

Failing test case input:
AtCoddr

Expected output:
AC


Actual output:
WA


Fixed submission (verdict: Accepted):
S = list(input())
if S[0] != 'A':
    print('WA')
    exit()
if len([s for s in S[2:-1] if s == 'C']) != 1:
    print('WA')
    exit()
SL = [s for s in S if s not in ['A', 'C']]
if not all([sl.islower() for sl in SL]) or len(SL) + 2 != len(S):
    print('WA')
    exit()
print('AC')

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

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
AC = input()
correct = AC[0] == 'A' and AC.count('A') == 1 and AC[-1] != 'C' and AC[:2].count('C') == 0 and AC[2:-1].count('C') == 1 and AC.replace('A', 'a').replace('C', 'c') == AC.lower()
print('AC' if correct else 'WA')
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
print("WA" if re.match('A[a-z][a-z]*C[a-z]*[a-z]',input()) == None else "AC")

Failing test case input:
AtCoCo

Expected output:
WA

Actual output:
AC


Fixed submission (verdict: Accepted):
import re
print("WA" if re.match('^A[a-z]+C[a-z]+$',input()) == None else "AC")

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    s = list(input())
    if s[0] != 'A':
        print("WA")
    elif 'C' in s[1] or s[-1] == 'C':
        print('WA')
    else:
        if 'C' in s[2:-1] and s[2:-1].count('C') == 1:
            print('AC')
        else:
            print('WA')


if __name__ == "__main__":
    main()


Failing test case input:
AtBnCo

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
import sys


def main():
    s = list(input())
    if s[0] != 'A' or s[2:-1].count("C") != 1:
        print("WA")
    else:
        for i in range(1, len(s)):
            if ord(s[i]) < ord('a') and i != s.index('C'):
                print("WA")
                sys.exit(0)
        print("AC")


if __name__ == "__main__":
    main()

Problem: p03289
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = list(input())

ans = 'AC'
if s[0] != 'A':
    ans = 'WA'
else:  
    s[0] = 'a'

if s[2:-1].count('C') != 1:
    ans = 'WA'

wk = ['x' if i == 'C' else i for i in s]
if "".join(wk).isupper():
    ans = 'WA'

print(ans)

Failing test case input:
AtBoCo

Expected output:
WA


Actual output:
AC


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

ans = 'AC'
if s[0] != 'A':
    ans = 'WA'  

if s[2:-1].count('C') != 1:
    ans = 'WA'

cnt = 0
for i in s:
    
    if 'A' <= i <= 'Z':
        cnt += 1

if cnt != 2:
    ans = 'WA'

print(ans)

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def chk(s):
    if s[0]!="A" or s[2:len(s)-1].count("C")!=1: return "WA"
    l=s.index("C")
    print(l)
    for i in range(len(s)):
        if i not in [0,l] and s[i] not in "abcdefghijklmnopqrstuvwxyz": return "WA"
    return "AC"
    


s=input()
print(chk(s))

Failing test case input:
AtCoddt

Expected output:
AC


Actual output:
2
AC


Fixed submission (verdict: Accepted):
def chk(s):
    if s[0]!="A" or s[2:len(s)-1].count("C")!=1: return "WA"
    l=s.index("C")
    for i in range(len(s)):
        if i not in [0,l] and s[i] not in "abcdefghijklmnopqrstuvwxyz": return "WA"
    return "AC"
    


s=input()

print(chk(s))

Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(input())
k = False
if A[0] == 'A' and A[1].islower() == True and  A[-1].islower() == True:
  A.pop(0)
  A=str(A)
  A = A.replace('C', 'c', 1)
  k = A.islower()
if k:
  print('AC')
else:
  print('WA')

Failing test case input:
Adcpter

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):
A = list(input())
k = False
p = False
if A[0] == 'A' and A[1].islower() == True and  A[-1].islower() == True:
  A.pop(0)
  A=str(A)
  for a in A:
    if a == 'C':
      p =True
  A = A.replace('C', '', 1)
  k = A.islower()
if k and p:
  print('AC')
else:
  print('WA')
Problem: p03289
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

countA = 0
countC = 0
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            print('WA')
            quit()
        else:
            continue
    if S[i] == 'A':
        countA += 1
    elif S[i] == 'C':
        if i < 2 or i == len(S)-1:
            print('WA')
            quit()
        countC += 1
    elif not S[i].islower():
        print('WA')
        quit()
    if countA > 1 or countC > 1:
        print('WA')
        quit()

if countA != 1 or countC != 1:
    print('WA')
    quit()
print('AC')

Failing test case input:
AtCodds

Expected output:
AC


Actual output:
WA


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

countA = 0
countC = 0
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            print('WA')
            quit()
        else:
            countA += 1
            continue
    if S[i] == 'C':
        if i < 2 or i == len(S)-1:
            print('WA')
            quit()
        countC += 1
    elif not S[i].islower():
        print('WA')
        quit()
    if countA > 1 or countC > 1:
        print('WA')
        quit()

if countA != 1 or countC != 1:
    print('WA')
    quit()
print('AC')

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

s = "AtCoder"
c_list = []
c_count = 0
answer = "WA"
for i in range(2,len(s)-1):
    if s[i] == "C":
        c_list.append(i)
    if s[i].islower() == False:
        c_count += 1
if s[0]=="A" and s[1].islower()==True and s[-1].islower()==True and len(c_list)==1 and c_count==1:
    answer="AC"
print(answer)

Failing test case input:
rcBCpf

Expected output:
WA


Actual output:
AC


Fixed submission (verdict: Accepted):

s = input()
c_list = []
c_count = 0
answer = "WA"
for i in range(2,len(s)-1):
    if s[i] == "C":
        c_list.append(i)
    if s[i].islower() == False:
        c_count += 1
if s[0]=="A" and s[1].islower()==True and s[-1].islower()==True and len(c_list)==1 and c_count==1:
    answer="AC"
print(answer)

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


def lower_checker(ss):
    flag = True
    for k in ss:
        if k != 'A' or k != 'C':
            flag = flag and k.islower()
    return flag

flag = True
if s[0] != 'A':
    flag = False
if flag is False or 'C' not in s[3:-2]:
    flag = False
if flag is False or not lower_checker(s):
    flag = False

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

Failing test case input:
AtCoddt

Expected output:
AC


Actual output:
WA


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


def lower_checker(ss):

    for k in ss:
        if k != 'A' and k != 'C' and k.islower() is False:
            return False
    return True

def C_counter(ss):
    cnt = 0
    for k in ss:
        if k == 'C':
            cnt += 1
    if cnt == 1:
        return True
    else:
        return False

flag = True
if s[0] != 'A':
    flag = False
if flag is False or C_counter(s[2:-1]) is False:
    flag = False
if flag is False or lower_checker(s) is False:
    flag = False

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