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:
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):
            ans[2] = False
        else:
            ans[2] = True
if ans[0] and ans[1] and ans[2]:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ABC 104 B
s = list(input())

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

Submission status: Wrong Answer

Solution code:
s = input()

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

else:
    ss = s[1:2] + s[3:-2] + s[-1:]
    flag = True
    for i in range(len(ss)):
        if ss[i] < "a" or ss[i] > "z":
            flag = False

    if flag == False:
        print("WA")
    elif (s[2] == "C" and s[-2] != "C") or\
            (s[2] != "C" and s[-2] == "C"):
        print("AC")
    else:
        print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(str(input()))
n=len(s)
t=True
c=0
for i in range(n):
    if i == 0:
        if s[i]=="A":
            t=t and True
        else:
            t=False
    elif i == 1:
        if s[i]>="a" and s[i]<="z":
            t=t and True
        else:
            t = False
    else:
        if s[i] == "C":
            c+=1
        elif s[i]>="a" and s[i]<="z":
            t=t and True
        else:
            t = False
if c==1:
    t=t and True
else:
    t=False
if t:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)

if s[0]!='A':
    print('WC')
else:
    if s.count('C')!=1:
        print('WC')
    else:
        if s.index('C')<2 or s.index('C')>len(s)-2:
            print('WC')
        else:
            s.remove('A')
            s.remove('C')
            
            count=0
            for i in range(len(s)):
                if str.islower(s[i]):
                    count+=1
            if count==len(s):
                print('AC')
            else:
                print('WC')

Submission status: Wrong Answer

Solution code:
S = list(input())
cnt = 0

array = S[2:-1]
if array.count("C")==1:
  array.remove("C")
  S = S[:2]+array+S[-1:]
else:
  cnt += 1

if S[0]=="A":
  del S[0]
else:
  cnt += 1

s = "".join(S)
if s.islower == False:
  cnt += 1
print("AC" if cnt==0 else "WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
cnt = 0

array = S[2:-1]
if array.count("C")==1:
  S.remove("C")
else:
  cnt += 1

if S[0]=="A":
  del S[0]
else:
  cnt += 1

s = "".join(S)
if s.islower == False:
  cnt += 1
print("AC" if cnt==0 else "WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
cnt = 0

array = S[2:-1]
if array.count("C")==1:
  S.remove("C")
else:
  cnt += 1

if S[0]=="A":
  del S[0]
else:
  cnt += 1

s = "".join(S)
if s.islower == False:
  cnt += 1
print("AC" if cnt==0 else "WA")

Submission status: Wrong Answer

Solution code:
def main():
    s = list(input())
    count = 0

    if s[0] == 'A':
        if s[2] == 'C':
            if s[-2] == 'C':
                return 'WA'
            for i in range(len(s)):
                if s[i].isupper():
                    count += 1
            if count < 2 or count > 2:
                return 'WA'
        elif s[-2] == 'C':
            if s[2] == 'C':
                return 'WA'
            for i in range(len(s)):
               if s[i].isupper():
                   count += 1
            if count < 2 or count > 2:
                return 'WA'
        else:
            return 'WA'
    else:
        return 'WA'

    return 'AC'





if __name__=='__main__':
    a = main()
    print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

ans = "WA"
if S[0] == "A":
    flag = "AC"
    S = S.replace("A", "a", 1)

count = 0
for i in range(2, len(S) - 1):
    if S[i] == "C":
        count += 1
        S = S.replace("C", "c", 1)
if count != 1:
    ans = "WA"

if not S.islower():
    ans = "WA"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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:
    for i in S:
        if i == 'A' or 'C':
            i = i.replace('A','')
            i = i.replace('C','')
        komozi = ''
        komozi += i
        if komozi.islower():
            ans = 'AC'
print(ans)

Submission status: Wrong Answer

Solution code:
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:
    for i in S:
        komozi = ''
        if i == 'A' or 'C':
            i = i.replace('A','')
            i = i.replace('C','')
        komozi += i
        if komozi.islower():
            ans = 'AC'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
S = input()
print(S[0])
print(S[2:-1])
print(S[0] + S[1:-1] + S[-1:])
print(S[0] + S[1:-1].replace('C', 'c', 1) + S[-1:])

if S[0] == 'A' and S[2:-1].count('C') == 1 and (S[1:-1].replace('C', 'c', 1) + S[-1:]).islower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
sml='Cqwertyuiopasdfghjklzxcvbnm'

s=input()
n=len(s)
if s[0]=='A' and s[2:n].count('C')==1 and set(s[1:])<=set(sml):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
import re
s=input()
ans='WA'
regex=re.match(r'^A[a-z]C[a-z]+',s)
if regex:
    if len(regex.group())==len(s):
        ans='AC'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
if s[0] =='A' and s[2:-1].count('C') ==1:
  if s[1:].replace('C', '').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:
  if s[1:].replace("C", "").islower:
    print("AC")
  else:
    print('WA')  
else:
  print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def valid(s):
    if s[0] != 'A':
        return False
    if s[2:-1].count('C') != 1:
        return False

    num_upper = 0
    for c in list(s):
        if s.isupper():
            num_upper += 1

    if num_upper > 2:
        return False

    return True


s = input().strip()
print('AC') if valid(s) else print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
m='WA'
if'A'==s[0]and(s[2:-2]).count('C')==1:
  i=(s[2:-2]).index('C')+1
  b=s[1:i+1]+s[i+2:]
  if b.lower()==b:
    m='AC'
print(m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
  S = input()
  flag1 = (S[0] == 'A')
  flag2 = (S[2:-1].count('C') == 1)
  flag3 = (S.replace('A', '').replace('C', '').lower()
           == S.replace('A', '').replace('C', ''))

  print(flag1, flag2, flag3)
  if flag1 and flag2 and flag3:
    print('AC')
  else:
    print('WA')


if __name__ == "__main__":
  main()

Submission status: Wrong Answer

Solution code:
import sys
s = input()
judge = 1
if s[0] != "A":
    judge = 0

if not s[1] != "C" and s[len(s) -1] != "C" and s.count("C") == 1:
    judge = 0

s = s.replace("A","a").replace("C","c")

if s.islower() and judge == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys
s = input()
judge = 1
if s[0] != "A":
    judge = 0

if not s[1] != "C" and s[len(s) -1] != "C" and s.count("C") == 1:
    judge = 0

s.replace("A","a").replace("C","c")

if s.islower() and judge == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import re

string  = input()

if re.match('A[a-z]+C[a-z]+',string) == None:
  print('WA')
else:
  print('AC')

Submission status: Wrong Answer

Solution code:
import re

string  = input()

if re.match('A\w+C\w+',string) == None:
  print('WA')
else:
  print('AC')

Submission status: Wrong Answer

Solution code:
s=input()

flag=False
lens=len(s)
s_3_2=s[2:lens-1]

if s[0]=="A":
    if s_3_2.count("C")==1:
        s=s.replace("A","")
        s=s.replace("C","")
        if s.islower:
            flag=True

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

Submission status: Wrong Answer

Solution code:
s=input()
if s[2:(len(s)-2)].count('C'):
  i=s[2:(len(s)-2)].index('C')+2
  print('WAAC'[s[0]=='A'and i and s[1:i]+s[-~i:]==(s[1:i]+s[-~i:]).lower()::2])
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
s = list(input())

ans = 'AC'
length = len(s)

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

s[0] = 'a'
cnum = 0

for i in range(2,length-1):
    if s[i] == 'C':
        cnum = cnum + 1
        s[i] == 'c'
#print(cnum)
if cnum != 1:
    ans = 'WA'

if str(s).islower == False:
    ans = 'WA'

print(ans)

Submission status: Wrong Answer

Solution code:
s = list(input())

ans = 'AC'
length = len(s)

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

s[0] = 'a'
cnum = 0

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

if cnum != 1:
    ans = 'WA'

if str(s).islower == False:
    ans = 'WA'

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

str = input()

if str[0] != 'A' :
    print("WA")
    sys.exit()

str.replace('A', 'a', 1)

flag = False

for i in range(2, len(str) - 1) :
    if str[i] == 'C':
        str.replace('C' , 'c', 1)
        flag = True
        
if not flag :
    print("WA")
    sys.exit()

if str.islower():
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
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 and sub_rep.islower():
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
a=input()
b=a[1:].replace("C","")
c=b.lower()
print(["WA","AC"][a[0]=="A" and a[2:-2].count("C")==1 and b==c])

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(S: str):
    a = S[0] == 'A'
    bs = list(filter(lambda x: x != 'C', S[2:-1]))
    cs = list(filter(lambda x: ord('A') <= ord(x) <= ord('Z'), bs + list(S[-1:])))
    r =  a and len(bs) == (len(S[2:-1]) - 1) and len(cs) == 0
    return 'AC' if r else 'WA'


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    result = solve(S)
    print(result)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(S: str):
    a = S[0] == 'A'
    bs = list(filter(lambda x: x != 'C', S[2:-2]))
    cs = list(filter(lambda x: ord('A') <= ord(x) <= ord('Z'), bs + list(S[-2:])))
    r =  a and len(bs) == (len(S[3:-1]) - 1) and len(cs) == 0
    return 'AC' if r else 'WA'


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    result = solve(S)
    print(result)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()
memo = 0

if S[0] == "A":
    for i in range(2,len(S)-2):
        if S[i] == "C":
            memo = i
            break
    if memo > 0:
        S = S[1:]
        S = S[:memo-1] + S[memo:]
        if S.islower():
            print("AC")
            exit()
print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0]=="A" and s[2:-1].count("C")==1 and s[1].islower():
    s = s.replace("C", "")
    if s[1:].islower():
        print("AC")
        exit()
print("Wa")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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
    if not S[i].islower:
      ans = "WA"
  if count_c != 1:
    ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

s = list(input())



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

cnt = 0

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


if cnt != 1:
    print('WA')
    exit()

del(s[0])
del(s[i])

s = ''.join(s)
if s.islower:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

s = list(input())



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

cnt = 0

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


if cnt != 1 or cnt == 0:
    print('WA')
    exit()

del(s[0])
del(s[i])

s = ''.join(s)
if s.islower:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

s = list(input())



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

cnt = 0

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


if cnt != 1 or cnt == 0:
    print('WA')
    exit()

del(s[0])
del(s[i])

s = ''.join(s)
if s.islower:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
A=list(input())
cnt = 0
Ccon = 0
B=[]
if A[0] == "A":
    cnt += 1
for i in range(2,len(A)-2):   
    if A[i] == "C":
        Ccon += 1
if Ccon == 1:
    cnt += 1
for x in range(0,len(A)):
    if A[x].islower():
        B.append(A[x])
if len(B)==len(A)-2:
    cnt+=1      
if cnt==3:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
A=input()
A=list(A)
cnt = 0
Ccon = 0
B=[]
if A[0] == "A":
    cnt += 1
for i in range(2,len(A)-2):   
    if A[i] == "C":
        Ccon += 1
if Ccon == 1:
    cnt += 1
for x in range(0,len(A)):
    if A[x].islower():
        B.append(A[x])
if len(B)==len(A)-2:
    cnt+=1      
if cnt==3:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
flaglow = True
flagAC = False

for i in range(len(S)):
    if S[i].isupper:
        flaglow = False
if S[0]=='A' and S[2:-1].count('C') == 1:
    flagAC = True

if flaglow and flagAC:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
flag = True

for i in range(len(S)):
    if S[i].isupper:
        flag = False
if S[0]=='A' and S[2:-1].count('C') == 1:
    flag = True

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

Submission status: Wrong Answer

Solution code:
S = input()
flag = False
if S[0]=='A' and S[2:-1].count('C')==1 and S[1].islower():
    for i in range(len(S)):
        if S[i] in 'ACabcdefghijklmnopqrstuvwxyz':
            flag = True
if flag == True:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
flag = False
if S[0]=='A' and S[2:-1].count('C')==1:
    for i in range(len(S)):
        if S[i] in 'ACabcdefghijklmnopqrstuvwxyz':
            flag = True
if flag == True:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S=input()
if S[0]=='A':
    if S[2:-1].count('C')==1:
        i = S.index('C')
        tmp = S[1:i]+S[i+1:]
        tmp_low=tmp.lower()
        print(tmp)
        print('AC' if tmp==tmp_low else 'WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
a = input()
b = a[2:-1]
if a.startswith("A"):
    if b.count("C") == 1:
        c = list(a)
        c.remove("A")
        c.remove("C")
        for i in c:
            if i.isupper():
                break
        print("AC")
        exit()
print("WA")

Submission status: Wrong Answer

Solution code:
a = input()
b = a[2:-1]
if a.startswith("A"):
    if b.count("C") == 1:
        c = list(a)
        c.remove("A")
        c.remove("C")
        print(c)
        for i in c:
            if i.isupper():
                break
        print("AC")
        exit()
print("WA")

Submission status: Wrong Answer

Solution code:
a = input()
b = a[2:-1]
if a.startswith("A"):
    if b.count("C") == 1:
        c = list(a)
        c.remove("A")
        c.remove("C")
        for i in c:
            if i.islower():
                print("AC")
                exit()
print("WA")

Submission status: Wrong Answer

Solution code:
# ABC104B - AcCepted
s = input().rstrip()
if (
    s[0] == "A"
    and s[2:-1].count("C") == 1
    and s[3:].islower()
    and s[1].islower()
):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
# ABC104B - AcCepted
s = input().rstrip()
if (
    s[0] == "A"
    and s[2:-1].count("C") == 1
    and s[1] != "C"
    and s[3:-1].islower()
    and s[1].islower()
):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
# ABC104B - AcCepted
s = input().rstrip()
if (
    s[0] == "A"
    and s[2:-1].count("C") == 1
    and s[1] != "C"
    and s[3:].islower()
    and s[1].islower()
):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

print(["AC", "WA"][not("A" == S[0] and 1 == S[2:-1].count("C") and (S[2:-1].replace("C", "") + S[-1]).islower())])
#print("A" == S[0], 1 == S[2:-1].count("C"), (S[2:-1].replace("C", "") + S[-1]).islower())

Submission status: Wrong Answer

Solution code:
S = input()

print(["AC", "WA"][not(S[0] == "A" and 1 == S[2:-1].count("C") and S[2:-1].replace("C", "").islower())])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
ans="WA"
if S[0]=="A":
  S=S[1:]
  if 1<=S.find("C")<=len(S)-2:
    S.strip("C")
    T=S
    T.lower()
    if S==T:
      ans="AC"
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
  s = list(input())

  print(s)

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

  C_counter = 0
  for n in s[2:-1]:    
    if n == 'C':
      C_counter += 1

  if C_counter != 1:
    print('WA')
    return

  for n in s:
    if n == 'A' or n == 'C':
      continue
    if not n.islower():
      print('WA')
      return
  print('AC')
  return




main()

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!="A":
    print("WA")
else:
    if s[1]=='C':
        print("WA")
    else:
        count=0
        for i in range(2,len(s)-1):
            if s[i]=='C':
                count+=1
        if count==0 or count>1:
            print("WA")
        else:
            if s[len(s)-1]=='C':
                print("WA")
            else:
                print("AC")

Submission status: Wrong Answer

Solution code:
S = input()
ans = True
a = S[2:-1]
if S[0] != 'A':
    ans = False
check = False
cnt = 0
for i in range(len(a)):
    if a[i] == "C":
        cnt += 1
if ans == True and cnt == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
ans = True
if S[0] != 'A':
    ans = False
check = False
for i in range(3,-1):
    if S[i] == 'C':
        check = True
if ans == True and check == True:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
ans = True
if S[0] != 'A':
    ans = False
check = False
for i in range(3,-2):
    if S[i] == 'C':
        check = True
if ans == True and check == True:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = str(input())
mid = S[2:-1]
cnt = 0
if S[0] != "A":
    print("WA")
    exit()
for i in range(len(mid)):
    if mid[i] == "C":
        cnt += 1
        if cnt >= 2:
            print("WA")
            exit()
if cnt == 0:
    print("WA")
    exit()
print("AC")

Submission status: Wrong Answer

Solution code:
def main():
	S = input()
	if S[0] != "A":
		print("WA")
		return

	if S[1].isupper():
		print("WA")
		return

	c_num = 0
	other_small = True
	for i in range(2, len(S)-1):
		if S[i] == "C":
			c_num += 1
		elif S[i].isupper():
			other_small = False
	for i in range(len(S)-2, len(S)):
		if S[i].isupper():
			other_small = False

	if c_num == 1 and other_small:
		print("AC")
	else:
		print("WA")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
	S = input()
	if S[0] != "A":
		print("WA")
		return

	c_num = 0
	other_small = True
	for i in range(2, len(S)-1):
		if S[i] == "C":
			c_num += 1
		elif S[i].isupper():
			other_small = False

	if c_num == 1 and other_small:
		print("AC")
	else:
		print("WA")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
	S = input()
	if S[0] != "A":
		print("WA")
		return

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
	S = input()
	if S[0] != "A":
		print("WA")
		return

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()

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

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

if S[1]+S[3:] != (S[1]+S[3:]).lower():
    ans = 'WA'
    
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == 'A' and S[2:len(S)-1].count('C') == 1:
    for s in S:
        if s not in ('A','C') and s.isupper():
            print('WA')
            break
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A":
  if S[2:-1].count("C") == 1:
    if S[1].islower():
      if S[3:].islower():
        print("AC")
      else:
        print("WA")
    else:
      print("WA")
  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 and S[1].islower() and S[3:-1].islower():
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A":
  if S[2:-2].count("C") == 1:
    if not S[0:2].upper:
      if S[3:].islower:
        print("AC")
      else:
        print("WA")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
import sys
s=input()


if s[0]!="A" or s[2:-1].count('C')!=1: print("WA"),sys.exit()

i=s.find("C",2,len(s))
s=s[1:i]+s[i+1:]
print("AC" if s[1:].islower() else "WA")

Submission status: Wrong Answer

Solution code:
import sys
s=input()

if s[0]!="A" or s[3:-1].count('C')!=1: print("WA"),sys.exit()

i=s.find("C",3,-1)
s=s[1:i]+s[i+1:]
print("AC" if s[1:].islower() else "WA")