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

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] != 'A':
    print("WA")
else:
    if s.count('C') != 1:
        print("WA")
    else:
        status = True
        for i in s:
            if i.upper() == True and i!= 'A' and i != 'C':
                status = False
        if status :
            if 'C' not in s[2:-1]:
                print("WA")
            else:
                print("AC")
        else:
            print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] != 'A':
    print("WA")
else:
    if s.count('C') != 1:
        print("WA")
    else:
        status = True
        for i in s:
            if i.upper() == True and i!= 'A' and i != 'C':
                status = False
        if status :
            if 'C' not in s[2:-2]:
                print("WA")
            else:
                print("AC")
        else:
            print("WA")

Submission status: Wrong Answer

Solution code:
from collections import Counter
from functools import reduce
import fractions
import math
import statistics
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]  # LIST INT
def LF(): return [float(x) for x in sys.stdin.readline().split()]  # LIST FLOAT
def LS(): return sys.stdin.readline().split()  # LIST STRING
def MI(): return map(int, sys.stdin.readline().split())  # MAP INT
def II(): return int(sys.stdin.readline())  # INPUT INT
def IS(): return input()  # INPUT STRING
def P(x): return print(x)
def C(x): return Counter(x)
def GCD_LIST(numbers):  # greatest common divisor
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):  # least common multiple
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))


s = IS()
if s[0] == 'A' and s[2:len(s)-1].count('C') == 1 and ''.join([s[i] for i in range(2, len(s)) if not i == s.index('C')]).islower():
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
upper_list = [chr(i) for i in range(65, 65 + 26)]
if (S[0] == "A"):
    if(S[2:-1].count("C") == 1):
        del S[0]
        S.remove("C")
        if (S not in upper_list):
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
upper_list = [chr(i) for i in range(65, 65 + 26)]
if (S[0] == "A"):
    if ("C" in S[2:-1]):
        S.remove("C")
        if ("C"not in S[2:-1]):
            del S[0]
            if (S not in upper_list):
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys
s = str(raw_input())
if (s[0] == 'A') & (s[2:-1].count('C') == 1):
	if (s.count('A') == 1) & (s.count('C') == 1):
		strans = s
		slower = s
		strans.replace('A', 'a').replace('C', 'c')
		slower.lower()
		if strans == slower:
			print 'AC'
			sys.exit()
print 'WA'

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == 'A':
    if S[2 : len(S) - 2].count('C') == 1:
        S[S.index('C')] = 'a'
        S[0] = 'a'

        l = list(map(ord, S))
        i = 0
        while i < len(l):
            if l[i] >= 97 and l[i] <= 122:
                i += 1
            else:
                print('WA')
                break
        if i == len(l):
            print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] == 'A':
    if S[2 : len(S) - 2].count('C') == 1:
        S[S.index('C')] = 'a'
        S[0] = 'a'

        l = list(map(ord, S))
        i = 0
        while i < len(l):
            if l[i] >= 97 and l[i] <= 122:
                i += 1
            else:
                print('WA')
                break
        if i == len(l):
            print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
import sys
def solve(S):
    if not S[0] == 'A':
        return False
    cnt = 0
    c = 0
    for i in range(2,len(S)-1):
        if S[i] == 'C':
            cnt = cnt+1
            c = 2
    if not cnt == 1:
        return False
    for i in range(len(S)):
        if not (ord(S[i]) <= ord('z') and ord(S[i]) >= ord('a')):
            if(i == 0 or i == c):
                continue
            else:
                return False
    return True
            
S = input()
print("AC" if solve(S) else "WA")

Submission status: Wrong Answer

Solution code:
s=list(input())
c=0
m=0
for i in s:
    if i=="C":
        m+=1
if m!=1:
    print("WA")
    exit()

for i in s:
    if i=="C":
        c=s.index(i)
        break
if s[0]=="A" and 2<=c<=(len(s)-1):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=list(input())
c=0
m=0
for i in s:
    if i=="C":
        m+=1
if m!=1:
    print("WA")
    exit()
for i in s:
    if i=="C":
        c=s.index(i)
        break
if s[0]=="A" and 2<=c<=(len(s)-2):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=list(input())
c=0
m=0
for i in s:
    if i=="C":
        m+=1
if m>=2 or m==0:
    print("WA")
    exit()
for i in s:
    if i=="C":
        c=s.index(i)
        break
if s[0]=="A" and 2<=c<=(len(s)-2):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=list(input())
c=0
m=0
for i in s:
    if i=="C":
        m+=1
if m>=2:
    print("WA")
    exit()
for i in s:
    if i=="C":
        c=s.index(i)
        break
if s[0]=="A" and 2<=c<=(len(s)-2):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=list(input())
c=0
for i in s:
    if i=="C":
        c=s.index(i)
        break
if s[0]=="A" and 2<=c<=(len(s)-2):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

s = list(input())

answer = True

if s[0] != "A":
    answer = False

c = 0


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

if c != 1:
    answer = False

capital = 0


for i in range(len(s)):
    if s[i].isupper():
        capital += 1

if capital != 2:
    answer = False

print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

ans = True
if S[0] != "A":
    ans = False
if S[2:-2].count("C") != 1:
    ans = False
if len([x for x in S if x.islower()]) != len(S) - 2:
    ans = False

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input();ans="AC"
if s[0]!="A":ans="WA"
s=s[1:]
if "C"in s[0]+s[-1]:ans="WA"
s=s[1:-1]
if not"C"in s:ans="WA"
n=s.find("C");s=s[:n]+s[n+1:]
for i in range(len(s)):
  if s[i]<="Z":ans="WA"
print(ans)

Submission status: Wrong Answer

Solution code:
s=input();ans="AC"
if s[0]!="A":ans="WA"
s=s[1:]
if "C"in s[0]+s[-1]:ans="WA"
s=s[1:-1]
if not"C"in s:ans="WA"
n=s.find("C");s=s[:n]+s[n+1:]
for i in range(len(s)):
  if s[i]<="A":ans="WA"
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
c = 0
if s[0] != 'A':
    print("WA")
    exit()
for i in range(2,len(s)-1):
    if s[i] == 'C':
        c +=1
    elif s[i].istitle():
        print("WA")
        exit()
    else:
        continue
if c == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
c = 0
if s[0] != 'A':
    print("WA")
    exit()
for i in range(2,len(s)-1):
    if s[i] == 'C':
        c +=1
    elif s[i].istitle():
        print("WA")
        exit()
if c == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
s = stdin.readline().rstrip()
if s[2:-1].count('C') == 1:
    ic = s[2:-1].index('C')+2
    if ic>len(s):
      ic=len(s)-1
    if s[0].isupper() and (s[1:ic]+s[ic+1:]).islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
from sys import stdin
s = stdin.readline().rstrip()
if s[2:len(s)-1].count('C') == 1:
    ic = s[2:len(s)-1].index('C')+2
    if s[0].isupper() and (s[1:ic]+s[ic+1:]).islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
from sys import stdin
s = stdin.readline().rstrip()
if s[2:len(s)-2].count('C') == 1:
    ic = s[2:len(s)-2].index('C')+2
    if s[0].isupper() and (s[1:ic]+s[ic+1:]).islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input();print('WAAC'[s[0]=='A'and s.count('A')==1 and 'C' in s[2:-2] and s.count('C')==1 and s.replace('A','').replace('C','').islower()::2])

Submission status: Wrong Answer

Solution code:
s=input();print('WAAC'[s[0]=='A' and 'C' in s[2:-2] and s.count('C')==1 and s.replace('A','').replace('C','').islower()::2])

Submission status: Wrong Answer

Solution code:
large=list("BDEFGHIJKLMNOPQRSTUVWXYZ")
small=list("abcdefghijklmnopqrstuvwxyz")
s=list(input())
if s[0]!="A" or s.count("A")!=1:
  print("WA")
  exit()
t=s[3:len(s)-1]
if t.count("C")!=1:
  print("WA")
  exit()
for i in s:
  if i in large:
    print("WA")
    exit()
print("AC")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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 tmp.islower():
    flag=False

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import string

alp = string.ascii_uppercase

def main():
    S = input()
    len_s = len(S)

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

    for i in range(1, len_s-1):
        if S[i] == 'C':
            c_index = i
            break
        if i == len_s-2:
            print ('WA')
            return

    for i in range(2, len_s):
        if i == c_index:
            continue
        if S[i] in alp:
            print ('WA')
            return

    print ('AC')

main()

Submission status: Wrong Answer

Solution code:
import string

alp = string.ascii_uppercase

def main():
    S = input()
    len_s = len(S)

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

    for i in range(2, len_s-1):
        if S[i] == 'C':
            c_index = i
            break
        if i == len_s-2:
            print ('WA')
            return

    for i in range(2, len_s):
        if i == c_index:
            continue
        if S[i] in alp:
            print ('WA')
            return

    print ('AC')

main()

Submission status: Wrong Answer

Solution code:
import string

alp = string.ascii_uppercase

def main():
    S = input()
    len_s = len(S)

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

    for i in range(2, len_s-1):
        if S[i] == 'C':
            c_index = i
            break
        if i == len_s-2:
            print ('WA')
            return

    for i in range(2, len_s-1):
        if i == c_index:
            continue
        if S[i] in alp:
            print ('WA')
            return

    print ('AC')

main()

Submission status: Wrong Answer

Solution code:
s = raw_input()
if s[0] != 'A' or s[-1] == 'C' or not s[1].islower():
	print 'WA'
else:
	ss = s[2:-1]
	c = 0
	flag = True
	for sss in ss:
		if sss == 'C':
			c += 1
		else:
			if not sss.islower():
				flag = False
				break
	if c != 1:
		flag = False
	if flag:
		print 'AC'
	else:
		print 'WA'

Submission status: Wrong Answer

Solution code:
s = raw_input()
if s[0] != 'A' or s[-1] == 'C':
	print 'WA'
else:
	ss = s[2:-1]
	c = 0
	flag = True
	for idx, sss in enumerate(ss):
		if sss == 'C':
			c += 1
		else:
			if not sss.islower():
				flag = False
				break
		if c > 1:
			flag = False
			break
	if c == 0:
		flag = False
	if flag:
		print 'AC'
	else:
		print 'WA'

Submission status: Wrong Answer

Solution code:
s = raw_input()
if s[0] != 'A':
	print 'WA'
else:
	ss = s[2:-1]
	c = 0
	flag = True
	for idx, sss in enumerate(ss):
		if sss == 'C':
			c += 1
		else:
			if not sss.islower():
				flag = False
				break
		if c > 1:
			flag = False
			break
	if c == 0:
		flag = False
	if flag:
		print 'AC'
	else:
		print 'WA'

Submission status: Wrong Answer

Solution code:
import re; print('AC' if re.match(r'^A(([a-z]C[a-z]+)|([a-z]+C[a-z]))$', input()) else 'WA')

Submission status: Wrong Answer

Solution code:
def a(s) :
	if s[0] != 'A':
		return 'WA'
	count = 0
	for w in s[2:-2]:
		if w =='C':
			count += 1
	if count != 1:
		return 'WA'
	for w in s:
		if w != 'A' and w != 'C' and w.isupper() :
			return'WA'
	return 'AC'
print a(raw_input())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re; print('AC' if re.match(r'A[a-z]+C[a-z]+', input()) else 'WA');

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
flag = False

for i, charS in enumerate(S):
    if charS == "C" and (1 < i and i < N-1):
        flag = True
        numC = i
        break

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

if flag:
    text = [S[j] for j in range(N) if j != 0 and j != numC]
    text = ''.join(text)
    if not(text.islower):
        flag = False

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
S=list(input())
if S[0]=='A' and S[2:len(S)].count('C')==1:
    S[2:len(S)].remove('C')
    del S[0]
    if str(S).islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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 t == "C":
            continue
        if tc < a or tc > z:
            return False
    return True


if len(S) < 5:
    print("WA")
    exit()
if S[0] != "A":
    print("WA")
    exit()
if not hasC(S[2:-1]):
    print("WA")
    exit()
if not allLower(S[1:]):
    print("WA")
    exit()
print("AC")

Submission status: Wrong Answer

Solution code:
import re

r = input()
if r.startswith("A"):
  if len(re.findall("C",r[2:-1])) == 1:
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
ans=0
count=0
s=input()
if s[0]=="A":
        ans+=1
cut=s[2:-2]
if cut.count("C")==1:
        ans+=1
cap=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
for i in range(len(s)):
        if s[i] in cap:
                count+=1
if count==2:
        ans+=1
if ans==3:
        print("AC")
else:
        print("WA")

Submission status: Wrong Answer

Solution code:
S = str(input())
flag = False
count = 0
tmp_str = ""
if S.count("C") == 1 and S[0] == "A":
  flag = True
  for i in range(1,len(S),1):
    if S[i] == "C":
      count = i
    else:
      tmp_str += S[i]

if (flag == True) and (count > 1) and (count < len(S)-1):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = str(input())
flag = False
count = 0
tmp_str = ""
if S.count("C") == 1 and S[0] == "A":
  flag = True
  for i in range(1,len(S),1):
    if S[i] == "C":
      count = i
    else:
      tmp_str += S[i]

if (flag == True) and (count > 1) and (count < len(S)-1):
  print("Yes")
else:
  print("WA")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S=input()
ans='WA'
if S[0]=='A':
    if S[2:-1].count('C')==1:
        if S[1:S.index('C')].islower() and S[S.index('C')+1:].islower():
            ans='AC'
print('AC')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

	if S.islower():
		print('AC')
        
	else:
		print('WA')

else:
	print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

def isLowerWithoutAC(s):
    l = list(s)
    l.remove('A')
    l.remove('C')
    return ''.join(l).islower()

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

Submission status: Wrong Answer

Solution code:
s=input()
character=["q","w","e","r","t","y","u","i","o","p","l","k","j","h","g","f","d","s","a","z","x","c","v","b","n","m"]
flag=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            print("WA")
            exit()
    elif 2<=i or i<=len(s)-2:
        if flag==1 and s[i]=="C":
            print("WA")
            exit()
        elif flag==0 and s[i]=="C":
            flag=1
        elif flag==0 and not s[i] in character:
            print("WA")
            exit()
        elif flag==1 and not s[i] in character:
            print("WA")
            exit()
    else:
        if not s[i] in character:
            print("WA")
            exit()
if flag==0:
    print("WA")
    exit()
print("AC")

Submission status: Wrong Answer

Solution code:
def accepted(S: str)->bool:
    if S[0] != 'A':
        return False
    if sum(1 for c in S[2:-2] if c == 'C') != 1:
        return False

    sorted_s = ''.join(sorted(S)[2:])
    return sorted_s == sorted_s.lower()


if __name__ == "__main__":
    S = input()
    ac = accepted(S)
    print('AC' if ac else 'WA')

Submission status: Wrong Answer

Solution code:
s = input()
t = s.replace('A','c').replace('C','c')
if s[0]!='A' or 'C' not in s[1:len(s)-1] or s[1:len(s)-1].count('C') != 1 or t != t.lower():
    print('WA')
else:
    print('AC')

Submission status: Wrong Answer

Solution code:
S=input()

def solve():
  temp=0
  if S[0]!='A':
    print('WA')
    return
  if not 'a'<=S[1]<='z':
    print('WA')
    return
  for i in range(2,len(S)-1):
    if S[i]=='C':
      temp+=1
      if temp>1:
        print('WA')
        return
    if temp==0:
      print('WA')
      return
    
  if not 'a'<=S[len(S)-1]<='z':
    print('WA')
    return
  
  print('AC')

solve()

Submission status: Wrong Answer

Solution code:
S=input()

def solve():
  temp=0
  if S[0]!='A':
    print('WA')
    return
  if not 'a'<=S[1]<='z':
    print('WA')
    return
  for i in range(2,len(S)-1):
    if S[i]=='C':
      temp+=1
      if temp>1:
        print('WA')
        return
  if not 'a'<=S[len(S)-1]<='z':
    print('WA')
    return
  
  print('AC')

solve()

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] != 'A':
  print("WA")
else:
  if 'C' not in S[2:-1] or S[2:-1].count('C') > 1:
    print("WA")
  else:
    S[0:1].lower()
    i = S.find('C')
    S[i:i+1].lower()
    if S.islower():
      print("AC")
    else:
      print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] != 'A':
  print("WA")
else:
  if 'C' not in S[2:] or S[2:].count('C') > 1:
    print("WA")
  else:
    S[0:1].lower()
    i = S.find('C')
    S[i:i+1].lower()
    if S.islower():
      print("AC")
    else:
      print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())

if S[0] == "A":
    S2 = S[2:-1]
    count = S2.count("C")
    
    if count == 1:
        S.remove("A")
        S.remove("C")
        
        count2 = 0
        for i in range(len(S)):
           if S[i].islower():
               count2 += 1
               
        if count2 == len(S):
                   print("AC")

        else:
            print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())

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

    if count == 1:
        S.remove("A")
        S.remove("C")

        count2 = 0
        for i in range(len(S)):
           if S[i].islower():
               count2 += 1
               
        if count2 == len(S):
                   print("AC")

        else:
            print("WA")

Submission status: Wrong Answer

Solution code:
import re

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

Submission status: Wrong Answer

Solution code:
S=input()
ans='WA'
tmp=0
for i in range(2,len(S)-1):
  if S[i]=='C':
    tmp+=1
    
if S[0]=='A' and tmp==1:
  ans='AC'
  
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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
    return False

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

flg = True
if S[0] == 'A' and S[2] == 'C':
    others = S[1] + S[3:]
    for o in others:
        if not (ord('a') <= ord(o) <= ord('z')):
            flg = False
            break
else:
    flg = False

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

Submission status: Wrong Answer

Solution code:
S = input()
count_C = 0
index_C = 0
if S[0] == 'A':
  for i in range(2,len(S)-1):
    if S[i] == 'C':
      count_C+=1
      index_C = i
  if count_C == 1:
    s = S[1:index_C]+S[index_C+1:]
    if s.islower():
      print('AC')
  else:
    print('WA') 
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

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

if S[1]=='C':
    ans = 'WA'
    
for s in S[1:-1]:
    if s.isupper() and s!='C':
        ans = 'WA'
        
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

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

for s in S[1:-1]:
    if s.isupper() and s!='C':
        ans = 'WA'
        
print(ans)

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"
cnt = 0
for c in s[2:]:
    if c.isupper():
        cnt += 1
if cnt != 1:
    ans = "WA"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
if S[0]!='A':
  print('WA')
else:
  i = 2
  count = 0
  while i < len(S):
  	if S[i] == 'C':
      		count += 1
  	i += 1
  if count != 1:
    print('WA')
  S = S.replace('A','').replace('C','')
  if S.islower() == False:
    print('WA')
  else:
    print('AC')