Problem:


Score : 200 points

Problem Statement

You are given a string S. Each character of S is uppercase or lowercase English letter.
Determine if S satisfies all of the following conditions:

The initial character of S is an uppercase A.

There is exactly one occurrence of C between the third character from the beginning and the second to last character (inclusive).

All letters except the A and C mentioned above are lowercase.

Constraints

4 ≤ |S| ≤ 10 (|S| is the length of the string S.)

Each character of S is uppercase or lowercase English letter.

Input

Input is given from Standard Input in the following format:

S

Output

If S satisfies all of the conditions in the problem statement, print AC; otherwise, print WA.

Sample Input 1

AtCoder

Sample Output 1

AC

The first letter is A, the third letter is C and the remaining letters are all lowercase, so all the conditions are satisfied.

Sample Input 2

ACoder

Sample Output 2

WA

The second letter should not be C.

Sample Input 3

AcycliC

Sample Output 3

WA

The last letter should not be C, either.

Sample Input 4

AtCoCo

Sample Output 4

WA

There should not be two or more occurrences of C.

Sample Input 5

Atcoder

Sample Output 5

WA

The number of C should not be zero, either.



Sample input:
AtCoder


Sample output:
AC

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
def piyo():
    s = list(str(input()))
    c = 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 c>1:
        return "WA"
    return "AC"
        
if __name__ == '__main__':
    hoge=piyo()
    print(hoge)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
def piyo():
    s = list(str(input()))
    c = 0
    if s[0]!="A":
        return "WA"
    if s[0]=="C" and s[1]=="C" and s[2]=="C" and s[len(s)-2]=="C" and 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)

Submission status: Wrong Answer

Solution code:
def piyo():
    s = list(str(input()))
    if s[0]!="A":
        return "WA"
    for hage in s:
        if hage!="A" and hage!="C":
            if hage.isupper():
                return "WA"
    if s[len(s)-2]=="C" or s[2]=="C":
        if s[len(s)-2]=="C" and s[2]=="C":
            return "WA"
    return "AC"
        
if __name__ == '__main__':
    hoge=piyo()
    print(hoge)

Submission status: Wrong Answer

Solution code:
S = input()
if(S.count('A') != 1 or S.count('C') != 1):
  print('WA')
  exit()
if(S[0] == 'A' and 'C' in S[2:-1]):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
if(S.count('A') != 1 or S.count('C') != 1):
  print('WA')
  exit()
if(S[0] == 'A' and (S[2] == 'C' or S[-2] == 'C')):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
if ord('A') <= ord(s[1]) <= ord('Z'):
    print('WA')
    exit()
if s[0] != 'A':
    print('WA')
    exit()
s = s[2:-1]
if 'C' not in s:
    print('WA')
    exit()
f = 0
for c in s:
    f += ord('A') <= ord(c) <= ord('Z')
if ord('A') <= ord(s[-1]) <= ord('Z'):
    print('WA')
    exit()
if f == 1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
def oomoji(c):
    p = ord(c)
    return ord('A')<=p<=ord('Z')
def komoji(c):
    p = ord(c)
    return ord('a')<=p<=ord('z')

a = 0
for i,c in enumerate(s):
    if c == 'A':
        a += 1
        if i != 0:
            print('WA')
            exit()
    elif c == 'C':
        a += 100000
        if i != 2:
            print('WA')
            exit()
    else:
        if not komoji(c):
            print('WA')
            exit()
if a == 100001:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
def oomoji(c):
    p = ord(c)
    return ord('A')<=p<=ord('Z')
def komoji(c):
    p = ord(c)
    return ord('a')<=p<=ord('z')

flag = True
flag &= oomoji(s[0])
flag &= oomoji(s[2])
flag &= komoji(s[1])
for i in range(len(s)):
    if i <= 2:
        continue
    flag &= komoji(s[i])
if flag:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = str(input())
s = S[2:len(S)-1]
k = s.count("C")
def main(S):
    C_index = S.find("C")
    S = S[1:C_index]+S[C_index+1:]
    if S.lower() == S:
        return 1
    else:
        return 0

if S[0] != "A":
    print("WA")
elif k > 1 or k == 0:
    print(k)
    print("WA")
elif main(S) == 0:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == "A" and s[2:-1].count("C") == 1:
  index_C = s.find("C")
  print(index_C)
  if s[1:index_C].islower() and s[index_C+1:].islower():
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == "A" and s[2:-1].count("C") == 1:
  index_C = s.find("C")
  print(index_C)
  if s[1:index_C].islower() and s[index_C+1:]:
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = str(input())
import numpy as np
#print("S_A", list(S)[0])

S = list(S)

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

#print("S[1],S[-2],S[-1]",S[1],S[-2],S[-1])

if S[1].islower() is False or S[-1].islower() is False or S[-2].islower() is False:
    print("WA")
    exit()

S_ = S[2:len(S)-1]

if S_.count('C') != 1:
    print("WA")
    exit()
else:
    S_.pop(S_ == 'C')
    if str(S_).islower() is True:
        print("AC")
        exit()
    else:
        print("WA")
        exit()

Submission status: Wrong Answer

Solution code:
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
if flag == 1 and flag2 == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
S = input()

ans = "WA"
if S[0] == "A":
    if S[2:-1].count("C") == 1:
        ans = "AC"
        for i in range(len(S)):
            if i==0:
                continue
            if i==2 and S[i]=="C":
                continue
            if S[i].isupper():
                ans = "WA"

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

ans = "WA"
if S[0] == "A":
    if S[2:-2].count("C") == 1:
        ans = "AC"
        for i in range(len(S)):
            if i==0:
                continue
            if i==2 and S[i]=="C":
                continue
            if S[i].isupper():
                ans = "WA"

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

ans = "WA"
if S[0] == "A":
    if S[2:-2].count("C") == 1:
        ans = "AC"
        for i in range(len(S)):
            if i==0:
                continue
            if (i==1 or i==2) and S[i]=="C":
                continue
            if S[i].isupper():
                ans = "WA"

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

ans = "WA"
if S[0] == "A":
    if S[0:3].count("C") == 1 and S[1:].count("C") == 1:
        ans = "AC"
        for i in range(len(S)):
            if i==0:
                continue
            if (i==1 or i==2) and S[i]=="C":
                continue
            if S[i].isupper():
                ans = "WA"

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

ans = "WA"
if S[0] == "A":
    if S[0:3].count("C") == 1 and S[2:].count("C") == 1:
        ans = "AC"
        for i in range(len(S)):
            if i==0:
                continue
            if (i==1 or i==2) and S[i]=="C":
                continue
            if S[i].isupper():
                ans = "WA"

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()


ans = "AC"
if S[1:3].count("C") != 1 or S[2] != "C" or S[0] != "A":
    ans = "WA"

for i,c in enumerate(S):
    if i!=0 and i!=2:
        if c.isupper():
            ans = "WA"

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()


ans = "AC"
if S.count("C") != 1 or S[2] != "C" or S[0] != "A":
    ans = "WA"

for i,c in enumerate(S):
    if i!=0 and i!=2:
        if c.isupper():
            ans = "WA"

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

if S.count("C") == 1 and S[2] == "C":
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
A = input()
if A[0] == "A" and A[2:-1].count("C") ==1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
#B 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):
    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")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#B AcCepted
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() and c==1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
#B AcCepted
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() and c==1:
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
#B AcCepted
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")

Submission status: Wrong Answer

Solution code:
#B AcCepted
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("WC")

Submission status: Wrong Answer

Solution code:
S = input()

flag = 0



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

elif "C" in S:
    a = S.index("C")

    if 2 <= a <= len(S)-1:
        S = S.replace("A", "", 1).replace("C", "", 1)
        
        if S.islower():
            print("AC")
        
        else:
            print("WA")

    else:
        print("WA")

else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

flag = 0



if S[0] != "A":
    print("WA1")

elif "C" in S:
    a = S.index("C")

    if 2 <= a <= len(S)-1:
        S = S.replace("A", "", 1).replace("C", "", 1)
        
        if S.islower():
            print("AC")
        
        else:
            print("WA2")

    else:
        print("WA3")

else:
    print("WA4")

Submission status: Wrong Answer

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math
import fractions
def j(a):
    if a: print("AC")
    else :print("WA")


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

#x = ip()                              #入力整数1つ
#x,y = (int(i) for i in input().split())      #入力整数横2つ
#x,y,z = (int(i) for i in input().split())    #入力整数横3つ
#n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列

if a[0] != 'A' or a[len(a)-1] == "C" or a[1] == "C" :j(0)
else:
    b = a[3:len(a)]
    if a.count('C') == 1:
        if a[1].islower() and b.islower():j(1)
    else: j(0)

Submission status: Wrong Answer

Solution code:
s=list(input().split())
ans='WA'
if s[0]=='A' and 'C' in s[2:-1]:
    if s.count('C')==1:
        s.remove('A')
        s.remove('C')
        if s.islower:
            ans='AC'
print(ans)

Submission status: Wrong Answer

Solution code:
S = str(input())
if  S[2:-1].count('C') == 1 and S[0] =='A' and S[1:].replace('C',' '):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math
import fractions
def j(a):
    if a: print("AC")
    else :print("WA")


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())

#x = ip()                              #入力整数1つ
#x,y = (int(i) for i in input().split())      #入力整数横2つ
#x,y,z = (int(i) for i in input().split())    #入力整数横3つ
#n,m,x,y= (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列

if a[0] != 'A' or a[len(a)-1] == "C" or a[1] == "C" :j(0)
else:
    a = a[:len(a)-1]
    if a.count('C') == 1:j(1)
    else: j(0)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A" and S[2:-1].count("C") == 1:
    S = S.replace("A","").replace("C","")
    print(S)
    if all(i.islower for i in S):
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A" and S[2:-1].count("C") == 1:
    S.replace("A","").replace("C","")
    if all(i.islower for i in S):
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
Sl = [i for i in S]
Cv = S.find("C")
C = Sl.pop(Cv)
A = Sl.pop(0)
lo = "".join(Sl)

if A == "A" \
and C == "C" \
and lo.islower() == True \
and 2 <= Cv < (len(Sl)-1):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
Sl = [i for i in S]
Cv = S.find("C")
C = Sl.pop(Cv)
A = Sl.pop(0)
lo = "".join(Sl)

if A == "A" and C == "C" and lo.islower() == True and Cv != 0 and Cv != 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = [i for i in input()]
C = S.pop(2)
A = S.pop(0)
S2 = "".join(S)

if A == "A" and C == "C" and S2.islower() == True:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A":
    if "C" in S[2:len(S)-1]:
        S=S.replace("A","",1)
        S=S.replace("C","",1)
        print(S)
        if S.islower():
            print("AC")
            exit()
print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A":
  count = 0
  for i in range(2,len(S)-1):
    if S[i] == "C":
      count += 1
    elif S[i].isupper():
      count += 2
  
  if count == 1:
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A":
  count = 0
  for i in range(1,len(S)-1):
    if S[i] == "C":
      count += 1
    elif S[i].isupper():
      count += 2
  
  if count == 1:
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A":
  count = 0
  for i in range(1,len(S)):
    if S[i] == "C":
      count += 1
    elif S[i].isupper():
      count += 2
  
  if count == 1:
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
import sys
s=list(input())
s_sli=s[2:-1]
if s[0]=='A' and s_sli.count('C')==1:
    del s[0]
    s.remove('C')
else:
    print("WA")
    sys.exit()
tmp=[i for i in s if i.islower()]
if tmp:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys
s=list(input())
s_sli=s[2:-1]
if s[0]=='A' and s_sli.count('C')==1:
    del s[0]
    del s[2]
else:
    print("WA")
    sys.exit()
tmp=[i for i in s if i.islower()]
if tmp:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys
s=list(input())
if s[0]=='A' and s[2]=='C' and s[1]!='C':
    del s[0]
    del s[2]
else:
    print("WA")
    sys.exit()
tmp=[i for i in s if i.islower()]
if tmp:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys
s=list(input())
if s[0]=='A' and s[2]=='C':
    del s[0]
    del s[2]
else:
    print("WA")
    sys.exit()
tmp=[i for i in s if i.islower()]
if tmp:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import re

S = input()
matchObj = re.match(r'^A[a-z]C{1}[a-z]*[a-z]$', S)
if matchObj:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import re

S = input()
matchObj = re.match(r'^A[a-z]C[a-z]*[a-z]$', S)
if matchObj:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import re

S = input()
matchObj = re.match(r'^A[a-z]C[a-z]+$', S)
if matchObj:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import re

S = input()
matchObj = re.match(r'^A[a-z]C[a-z]*$', S)
if matchObj:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
c1, c2, c3 = False, False, False
#print(c1, c2, c3)
import re
#print(s[2:-1])

if s[0] == "A":
  c1 = True
if s[2:-2].find("C") >= 0:
  c2 = True
if len(re.findall("[a-z]", s)) == len(s)-2:
  c3 = True
#print(c1, c2, c3)
#print(len(re.findall("[a-z]", s)))

if c1 and c2 and c3:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
c1, c2, c3 = False, False, False
#print(c1, c2, c3)
import re
#print(s[2:-1])

if s[0] == "A":
  c1 = True
if s[2:-2].find("C") >= 0:
  c2 = True
if len(re.findall("[a-z]", s)) == len(s)-2:
  c3 = True
#print(c1, c2, c3)
#print(len(re.findall("[a-z]", s)))

if c1 and c2 and c3:
  print("AC")
else:
  print("RE")

Submission status: Wrong Answer

Solution code:
def main():
    s = list(input())
    s_len = len(s)
    if s[0] != "A":
        print("WA")
        return
    elif s[1] == "C":
        print("WA")
        return
    elif s[s_len-1] == "C":
        print("WA")
        return
    c_counter = 0
    for i in range(2, s_len - 1):
        if(s[i] == "C"):
            if(c_counter == 1):
                print("WA")
                return
            c_counter += 1
        if(s[i].isupper()):
            if(s[i] != "A" and s[i] != "C"):
                print("WA")
                return
    if(c_counter == 0):
        print("WA")
        return

    print("AC")
main()

Submission status: Wrong Answer

Solution code:
S = input()
mid = S[2:-1]
S_lower = S.lower()
S_replace = S.replace('A', 'a').replace('C', 'c')
C_count = 0

if S[0] == 'A':
    for i in mid:
        if i == 'C':
            C_count += 1
    if C_count == 1:
        if S_lower == S_replace:
            print('AC')
        else:
            print('WA')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
mid = S[2:-1]
S_lower = S.lower()
S_replace = S.replace('C', 'c')
C_count = 0

if S[0] == 'A':
    for i in mid:
        if i == 'C':
            C_count += 1
    if C_count == 1:
        if S_lower == S_replace:
            print('AC')
        else:
            print('WA')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
# https://beta.atcoder.jp/contests/abc104/tasks/abc104_b

import re


def solve():
    S = input()
    pattern = re.compile(r'^A.C.*')

    if pattern.match(S):
        if S.count('C') == 1:
            print('AC')
            exit()
    print('WA')


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
S = input()

count = 0
tf = True
if S[0] != "A" or S[1] == "C" or S[-1] == "C":
    tf = False

for i in range(1, len(S)):
    if tf:
        break
    if i == 0:
        continue
    if S[i] == "C":
        count += 1
    elif not S[i].islower():
        tf = False

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

Submission status: Wrong Answer

Solution code:
S = input()

count = 0
tf = True
if S[0] != "A" or S[1] == "C" or S[-1] == "C":
    tf = False

for i in range(len(S)):
    if tf:
        break
    if i == 0:
        continue
    if S[i] == "C":
        count += 1
    elif not S[i].islower():
        tf = False

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

Submission status: Wrong Answer

Solution code:
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
    elif not S[i].islower():
        tf = False

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

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
submit = list(str(input()))
a = len(submit)
if submit[0] == "A":
  if a >= 5 and submit[2:a-2].count("C") == 1 or a == 4 and submit[2] == "C":
    submit.remove("A")
    submit.remove("C")
    substr = " "
    for x in submit:
      substr += x
    if substr.islower():
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
submit = list(str(input()))
a = len(submit)
if submit[0] == "A":
  if submit[2:a-2].count("C") == 1:
    submit.remove("A")
    submit.remove("C")
    substr = " "
    for x in submit:
      substr += x
    if substr.islower():
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
from collections import Counter

def is_lower_case(c):
  lower_case_alphabets = 'abcdefghijklmnopqrstuvwxyz'
  return c in lower_case_alphabets

S = input()
cnt = Counter(S[2:-1])

flag = True
if S[0] != 'A':
  flag = False
if cnt['C'] != 1:
  flag = False
for c in S:
  if c != 'C' and not is_lower_case(c):
    flag = False
print('AC' if flag else 'WA')

Submission status: Wrong Answer

Solution code:
from collections import Counter

def is_lower_case(c):
  lower_case_alphabets = 'abcdefghijklmnopqrstuvwxyz'
  return c in lower_case_alphabets

S = input()
cnt = Counter(S[3:-1])

flag = True
if S[0] != 'A':
  flag = False
if cnt['C'] != 1:
  flag = False
for c in S:
  if c != 'C' and not is_lower_case(c):
    flag = False
print('AC' if flag else 'WA')

Submission status: Wrong Answer

Solution code:
from collections import Counter

def is_lower_case(c):
  lower_case_alphabets = 'abcdefghijklmnopqrstuvwxyz'
  return c in lower_case_alphabets

S = input()
cnt = Counter(S)

flag = True
if S[0] != 'A':
  flag = False
if cnt['C'] != 1:
  flag = False
for c in S:
  if c != 'C' and not is_lower_case(c):
    flag = False
print('AC' if flag else 'WA')

Submission status: Wrong Answer

Solution code:
import sys
s=list(input())
if s[0]!='A':
    print("WA")
    sys.exit()
else:
    s.remove("A")
x=s[1:-1]
if x.count('C')==1:
    s.remove('C')
else:
    print("WA")
    sys.exit()
a=''.join(s)
print(["WA","YES"][a.islower()])

Submission status: Wrong Answer

Solution code:
from collections import Counter

s = input()

flag = 1
if not s[0] == "A":
    flag = 0

c = Counter(s[2:-2])
if not c["C"] == 1:
    flag = 0

small = set([chr(i) for i in range(ord("a"), ord("z") + 1)])

for i in s:
    if not (i in small or i == "A" or i == "C"):
        flag = 0

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

Submission status: Wrong Answer

Solution code:
T = []
for i in range(ord("a"),ord("z")+1) :
    T.append(chr(i))


L = list(input())
flag = 0
ans = 1
for i in range(len(L)) :
    if i == 0 and L[i] != "A" :
        ans = -1
        break
    elif (2 <= i <= len(L)-1) and L[i] == "C" :
        if flag == 1 :
            ans = -1
            break
        else :
            flag = 1
    else :
        if L[i] not in T :
            if i == 0 or i == len(L)-1 or flag == 1 : 
                ans = -1
                break

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

Submission status: Wrong Answer

Solution code:
s = str(input())
if s[0] != "A":
    print("WA")
    exit()
cou = 0
for i in range(1,len(s)):
    num = ord(s[i])-ord("a")
    if 0 <= num and num <= 25:
        continue
    else:
        if s[i] == "C":
            if i == 1 or i == len(s)-1:
                print("WA")
                exit()
            else:
                cou += 1
        else:
            print("WA")
            exit()
    if cou > 1:
        print("WA")
        exit()
print("AC")

Submission status: Wrong Answer

Solution code:
s=input()
if s[0] == 'A' and s[2:-2].count('C') == 1 and s.replace('A','').replace('C','') == s.replace('A','').replace('C','').lower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S=input()
n=len(S)
if S[0]=="A":
	if 2<=S.find("C")<=n-2:
		T=S.lstrip("A")
		R=T.replace("C","c",1)
		Q=T.replace("C","c")
		if R==Q:
			if R.lower()==R:
				print("AC")
print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
print("AC" if s[0]=='A'and s[2:-1].count('C')==1 else "WA")

Submission status: Wrong Answer

Solution code:
import sys
N = list(input())
komoji = 0
oomoji = 0
if N[0] == 'A':
    if N[1].islower():
        for i in range(2, len(N)):
            if N[i] == 'C':
                oomoji += 1
            if N[i].islower():
                komoji += 1
if oomoji == 1 and komoji == len(N) - 3:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys
N = list(input())
komoji = 0
oomoji = 0
if N[0] == 'A':
    if N[1].islower():
        for i in range(2, len(N)-1):
            if N[i] == 'C':
                oomoji += 1
            if N[i].islower():
                komoji += 1
if oomoji == 1 and komoji == len(N) - 3:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys
N = list(input())
if N[0] == 'A' and N[2] == 'C':
    if N[1].islower():
        for i in range(3, len(N)):
            if N[i].islower():
                continue
            else:
                print("WA")
                sys.exit()
    print("AC")
else:
    print("WA")
    sys.exit()

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
c = False
for e,i in enumerate(s):
    if e == 0:
        if not i == "A":
            print("WA")
            break
    elif 2 < e < n-1 and i == "C":
        if not c:
            c = True
        else:
            print("WA")
            break
    else:
        if not i in "abcdefghijklmnopqrstuvwxyz":
            print("WA")
            break
else:
    if c:
        print("AC")
    else:
        print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
c = False
for e,i in enumerate(s):
    if e == 0:
        if not i == "A":
            print("WA")
            break
    elif 2 < e < n-2 and i == "C":
        if not c:
            c = True
        else:
            print("WA")
            break
    else:
        if not i in "abcdefghijklmnopqrstuvwxyz":
            print("WA")
            break
else:
    if c:
        print("AC")
    else:
        print("WA")

Submission status: Wrong Answer

Solution code:
import re


s = input()
if s[0] == "A" and s[2:-2].count("C") == 1 and len(re.findall('[A-Z]', s)) == 2:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] != 'A' or not 'C' in S[2:-1]:
    print('WA')
    exit()
n = 1
for i in S[2:-1]:
    if i.islower():
        pass
    elif i == 'C' and n==1:
        n-=1
    else:
        print('WA')
        exit()
print('AC')

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] != 'A' or not 'C' in S[2:-1]:
    print('WA')
    exit()

for i in S[2:-1]:
    n = 1
    if i.islower():
        pass
    elif i == 'C' and n==1:
        n-=1
    else:
        print('WA')
        exit()
print('AC')

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] != 'A' or not 'C' in S[2:-2]:
    print('WA')
    exit()

for i in S[2:-2]:
    n = 1
    if i.islower():
        pass
    elif i == 'C' and n==1:
        n-=1
    else:
        print('WA')
        exit()
print('AC')

Submission status: Wrong Answer

Solution code:
a = list(input())

if a.count("A") != 1 or a.count("C")!= 1:
  print("WA")
elif a.index("A") == 0 and a.index("C") >= 2 and a.index("C") <= (len(a)-2):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
a = list(input())
b = list(set(a))

if b.count("A") != 1 or b.count("C")!= 1:
  print("WA")
elif a.index("A") == 0 and a.index("C") >= 2 and a.index("C") <= (len(a)-2):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
n=input()
s=list(n)
l=0
if s[0]=="A":
    for i in range(2,len(n)-1):
        if s[i]=="C":
            s[i]="c"
            k="a"
            for j in range(1,len(n)):
                k+=s[j]
            if k.islower():
                print("AC")
                l+=1
                break
if l!=1:
    print("WA")

Submission status: Wrong Answer

Solution code:
n=input()
s=list(n)
l=0
if s[0]=="A":
    for i in range(2,len(n)-1):
        if s[i]=="C":
            s[i]="c"
            k="a"
            for j in range(1,len(n)):
                k+=s[j]
            if k.islower():
                print("Yes")
                l+=1
                break
if l!=1:
    print("No")