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()
judge='AC'
cnt = 0
for i, s in enumerate(S):
    if i == 0:
        if s != 'A':
            judge = 'WA'
            break
    elif i > 1 and i < len(s) - 2:
        if s == 'C':
            cnt += 1
            continue
    if s.isupper():
        judge = 'WA'
        break

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
S = list(input())
N = len(S)
cnt = 0
for i in S:
    cnt += i.isupper()
if cnt != 2:
    print("WA")
    sys.exit()
if S[0] != "A":
    print("WA")
    sys.exit()
if "C" not in S[2:N]:
    print("WA")
    sys.exit()
print("AC")

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
S = list(input())
N = len(S)
cnt = 0
for i in S:
    cnt += i.isupper()
if cnt != 2:
    print("WA")
    sys.exit()
if S[0] != "A":
    print("WA")
    sys.exit()
if "C" not in S[2:N-1]:
    print("WA")
    sys.exit()
print("AC")

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
S = list(input())
N = len(S)
cnt = 0
for i in S:
    cnt += i.isupper()
if cnt != 2:
    print("WA")
    sys.exit()
if S[0] != "A":
    print("WA")
    sys.exit()
if "C" not in S[2:N-1]:
    print("WA")
print("AC")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

count = 0
for i in range(1, len(S) - 1):
        if S[i].isupper():
                if (i == 1) or (i == len(S) - 1) or (S[i] != 'C'):
                        ans = "WA"
                count += 1
        
if count != 1:
        ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

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

count = 0
for i in range(1, len(S) - 1):
        if S[i].isupper():
                if i == 1 or i == len(S) -1 or S[i] != 'C':
                        ans = "WA"
                count += 1
        
if count != 1:
        ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
import re

ptn = re.compile(r'A[a-z]C[a-z]+')
print('AC' if re.fullmatch(ptn, input()) else 'WA')

Submission status: Wrong Answer

Solution code:
import sys
S = input()


if S[0] == "A":
    C = S[2:-1]
    count = 0
    for c in C:
        if c == "C":
            count = count + 1
        if count==2:
            print("WA")
            sys.exit()
    if count==0:
        print("WA")
        sys.exit()
    S = S[1:]

    for s in S:
        if (ord("z") >= ord(s) and ord("a") <= ord(s)):
            continue
        elif s=="C":
            continue
        else:
            print("WA")
            sys.exit()
    print("AC")
print("WA")

Submission status: Wrong Answer

Solution code:
import sys
S = input()


if S[0] == "A":
    C = S[2:-1]
    count = 0
    for c in C:
        if c == "C":
            count = count + 1
        if count==2:
            print("WA")
            sys.exit()
    if count==0:
        print("WA")
        sys.exit()
    S = S[1:]

    for s in S:
        if (ord("z") >= ord(s) and ord("a") <= ord(s)):
            continue
        elif s=="C":
            continue
        else:
            print("WA")
            sys.exit()
    print("AC")

Submission status: Wrong Answer

Solution code:
import sys
S = input()


if S[0] == "A":
    C = S[2:-2]
    count = 0
    for c in C:
        if c == "C":
            count = count + 1
        if count==2:
            print("WA")
            sys.exit()
    if count==0:
        print("WA")
        sys.exit()
    S = S[1:]

    for s in S:
        if (ord("z") >= ord(s) and ord("a") <= ord(s)):
            continue
        elif s=="C":
            continue
        else:
            print("WA")
            sys.exit()
    print("AC")

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] != "A":
    print("WA")
else:
    l = [x for x in S[2:-2] if x == "C"]
    if len(l) != 1:
        print("WA")
    else:
        i = S.index("C")
        for x in S[1:i]+S[i+1:]:
            if not x.islower():
                print("WA")
                exit()
        else:
            print("AC")

Submission status: Wrong Answer

Solution code:
T = input()
if not T[0].isupper():
	print("WA")
	exit()
if( not "C" in T[2:-1]):
	print("WA")
	exit()
cnt=0
for i in range(len(T)):
	if(T[i].isupper()):
		cnt+=1
if(cnt>2):
	print("WA")
else:
	print("AC")

Submission status: Wrong Answer

Solution code:
T = input()
if not T[0].isupper():
	print("WA")
	exit()
if( not "C" in T[2:len(T)-2]):
	print("WA")
	exit()
cnt=0
for i in range(len(T)):
	if(T[i].isupper()):
		cnt+=1
if(cnt>2):
	print("WA")
else:
	print("AC")

Submission status: Wrong Answer

Solution code:
T = input()
if not T[0].isupper():
	print("WA")
	exit()
if( not "C" in T[2:len(T)-1]):
	print("WA")
	exit()
cnt=0
for i in range(len(T)):
	if(T[i].isupper()):
		cnt+=1
if(cnt>2):
	print("WA")
else:
	print("AC")

Submission status: Wrong Answer

Solution code:
s = input()
check = True
for i in range(len(s)):
    if i == 0:
        if not (s[i] == "A"):
            check = False
    elif i == 2:
        if not (s[i] == "C"):
            check = False
    else:
        if not(s[i].islower()):
            check = False
if check:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()


def check(s):
    if not s[0] == "A":
        return False
    if not s[2:-2].count("C") == 1:
        return False
    count = 0
    for c in s[1:]:
        if not c.lower() == c:
            count += 1
            if count > 1:
                return False
    return True


print("AC" if check(S) else "WA")

Submission status: Wrong Answer

Solution code:
S = input()
count = 0
for i in S:
    if i == S[0] and i != 'A':
        print('WA')
        break
    if i == 'C' and i in S[2:-1]:
        if count == 1:
            count += 1
            print('WA')
            break
        else:
            count+= 1
    if i != 'A' and i != 'C' and i.istitle():
        print('WA')
        count += 100
        break
if count == 1:
    print('AC')

Submission status: Wrong Answer

Solution code:
S = input()
count = 0
for i in S:
    if i == S[0] and i != 'A':
        print('WA1')
        break
    if i == 'C' and i in S[2:-1]:
        if count == 1:
            count += 1
            print('WA')
            break
        else:
            count+= 1
    if i != 'A' and i != 'C' and i.istitle():
        print('WA2')
        count += 100
        break
if count == 1:
    print('AC')

Submission status: Wrong Answer

Solution code:


S = input()

ans = 'WA'

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

Submission status: Wrong Answer

Solution code:
S = input()

ans = 'WA'

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

Submission status: Wrong Answer

Solution code:
w=input()
flag=0
if w[0]=='A' and w[2]=='C'and w[1].lower()==w[1]:
    flag+=0
else:
    flag=1    
if w[3:].lower()==w[3:]:
    flag+=0
else:flag=1
if flag:print('WA')
else:print('AC')

Submission status: Wrong Answer

Solution code:
w=input()
flag=0
if w[0]=='A' and w[2]=='C'and w[1].lower()==w[1]:
    flag+=0
else:
    flag=1    
if w[3:].lower()==w[:3]:
    flag+=0
else:flag=1
if flag:print('WA')
else:print('AC')

Submission status: Wrong Answer

Solution code:
w=input()
flag=0
if w[0]=='A' and w[2]=='C':
    flag+=0
else:
    flag=1    
w=w.replace('A','a').replace('C','c')
if w.lower()==w:
    flag+=0
else:flag=1
if flag:print('WA')
else:print('AC')

Submission status: Wrong Answer

Solution code:
w=input()
flag=0
if w[0]=='A' and w[2]=='C':
    flag+=0
else:
    flag=1    
w=w.replace('A','a').replace('C','c')
if w.lower()==w:
    flag=0
else:flag+=1
if flag:print('WA')
else:print('AC')

Submission status: Wrong Answer

Solution code:
w=input()
flag=0
if w[0]=='A' and w[2]=='C':
    flag+=0
else:
    flag+=1    
w=w.replace('A','a').replace('C','c')
if w.lower()==w:
  flag+=0
else:flag+=1
if flag:print('WA')
else:print('AC')

Submission status: Wrong Answer

Solution code:
w=input()
flag=0
if w[0]=='A' and w[2]=='C' and w[1].lower()==w[1]:
    flag+=0
else:
    flag+=1    
for i in range(3, len(w)):
    if w[i].lower()==w[i]:
        flag+=0
    else:
        flag+=1
if flag:print('WA')
else:print('AC')

Submission status: Wrong Answer

Solution code:
s = input()

ls_flag = [0, 1, 1]

for i in range(len(s)):
    if (s[i] != "A") or (s[i] != "C"):
        if s[i].isupper is True:
            ls_flag[0] = 1
            break

if s[0] == "A" and ("A" not in s[1:] is True):
    ls_flag[1] = 0

if s[2:-1].count("C") == 1 and s.count("C") == 1:
    ls_flag[2] = 0
    
if sum(ls_flag) == 0:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

ls_flag = [0, 1, 1]

for i in range(len(s)):
    if s[i].isupper is True:
        if (s[i] != "A") or (s[i] != "C"):
            ls_flag[0] = 1
            break

if s[0] == "A" and ("A" not in s[1:] is True):
    ls_flag[1] = 0

if s[2:-1].count("C") == 1 and s.count("C") == 1:
    ls_flag[2] = 0
    
if sum(ls_flag) == 0:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

ls_flag = [0, 1]

for i in range(len(s)):
    if s[i].isupper is True:
        if (s[0] != "A") or (s[i] != "C"):
            ls_flag[0] = 1
            break

if s[2:-1].count("C") == 1 and s.count("C") == 1:
    ls_flag[1] = 0
    
if sum(ls_flag) == 0:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

ls_flag = [0, 0, 1]

for i in range(len(s)):
    if s[i].isupper is True:
        if (s[i] != "A") or (s[i] != "C"):
            ls_flag[0] = 1
            break

if s[0] != "A":
    ls_flag[1] = 1

if s[2:-1].count("C") == 1 and s.count("C") == 1:
    ls_flag[2] = 0
    
if sum(ls_flag) == 0:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

ls_flag = [0, 0, 1]

for i in range(len(s)):
    if (s[i].isupper is True) and ((s[i] != "A") or (s[i] != "C")):
        ls_flag[0] = 1
        break

if s[0] != "A":
    ls_flag[1] = 1

if s[2:-1].count("C") == 1 and s.count("C") == 1:
    ls_flag[2] = 0
    
if sum(ls_flag) == 0:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

ls_flag = [0, 0, 1]

for i in range(len(s)):
    if (s[i].isupper is True) and ((s[i] != "A") or (s[i] != "C")):
        ls_flag[0] = 1
        break

if s[0] != "A":
    ls_flag[1] = 1

if s[2:-2].count("C") == 1 and s.count("C") == 1:
    ls_flag[2] = 0
    
if sum(ls_flag) == 0:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!='A' or s[1]=='C' or s[-1]=='C' or s[1].isupper() or s[2:-1].count('C')!=1:
  print('WA')
  exit()
  
s=''.join([c for c in s[1:-1] if c!='C'])
if s.islower():
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!='A' or s[1]=='C' or s[-1]=='C' or s[1].isupper() or s[2:-1].count('C')!=1:
  print('WA')
  exit()
  
s=''.join([c for c in s[2:-1] if c!='C'])
if s.islower():
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
import copy

s = list(input())
s_t = copy.deepcopy(s)
##if s[0] =="A" and "C" in s[2:-2]:
#    if
counter = 0
 
if s[0] != "A":
    print("WA")
    exit()
 
if not "C" in s[2:-1]:
    print("WA")
    exit()
 

c = False
komojo = True

for i in range(len(s)):
    if  2 <= i <= len(s)-2:
        if s[i] == "C":
            if c == True:
                print("WA")
                exit()
            elif c != True:
                c = True
            #continue
        elif i != 0 and not s[i].islower():
            komojo = False

if c and komojo:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import copy

s = list(input())
s_t = copy.deepcopy(s)
##if s[0] =="A" and "C" in s[2:-2]:
#    if
counter = 0
 
if s[0] != "A":
    print("WA")
    exit()
 
if not "C" in s[2:-1]:
    print("WA")
    exit()
 

c = False
komojo = True

for i in range(len(s)):
    if  2 <= i <= len(s)-2:
        if s[i] == "C":
            if c == True:
                print("WA")
                exit()
            elif c != True:
                c = True
            #continue
        elif i != 1 and not s[i].islower():
            komojo = False

if c and komojo:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import copy

s = list(input())
s_t = copy.deepcopy(s)
##if s[0] =="A" and "C" in s[2:-2]:
#    if
counter = 0
 
if s[0] != "A":
    print("WA")
    exit()
 
if not "C" in s[2:-1]:
    print("WA")
    exit()
 

c = False
komojo = True

for i in range(len(s)):
    if  2 <= i <= len(s)-2:
        if s[i] == "C":
            if c == True:
                c = False
            elif c != True:
                c = True
            #continue
        elif i != 1 and not s[i].islower():
            komojo = False

if c and komojo:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import copy

s = list(input())
s_t = copy.deepcopy(s)
##if s[0] =="A" and "C" in s[2:-2]:
#    if
counter = 0
 
if s[0] != "A":
    print("WA")
    exit()
 
if not "C" in s[2:-1]:
    print("WA")
    exit()
 
s.pop(0)
c = False
komojo = True

for i in range(len(s)):
    if  2 <= i <= len(s)-2:
        if s[i] == "C":
            if c == True:
                c = False
            elif c != True:
                c = True
            #continue
        elif not s[i].islower():
            komojo = False

if c and komojo:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import copy

s = list(input())
s_t = copy.deepcopy(s)
##if s[0] =="A" and "C" in s[2:-2]:
#    if
counter = 0
 
if s[0] != "A":
    print("WA")
    exit()
 
if not "C" in s[2:-1]:
    print("WA")
    exit()
 

c = False
komojo = True

for i in range(len(s)):
    if  2 <= i <= len(s)-2:
        if s[i] == "C":
            if c == True:
                c = False
            elif c != True:
                c = True
            #continue
        elif not s[i].islower():
            komojo = False

if c and komojo:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import copy

s = list(input())
s_t = copy.deepcopy(s)
##if s[0] =="A" and "C" in s[2:-2]:
#    if
counter = 0
 
if s[0] != "A":
    print("WA")
    exit()
 
c = False
komojo = True

for i in range(len(s)):
    if  2 <= i <= len(s)-2:
        if s[i] == "C":
            if c == True:
                c = False
            elif c != True:
                c = True
            #continue
        elif not s[i].islower():
            komojo = False

if c and komojo:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import copy

s = list(input())
s_t = copy.deepcopy(s)
##if s[0] =="A" and "C" in s[2:-2]:
#    if
counter = 0
 
if s[0] != "A":
    print("WA")
    exit()
 
c = False
komojo = True

for i in range(len(s)):
    if  2 <= i <= len(s)-2:
        if s[i] == "C":
            if c == False:
                c = True
            #continue
        elif not s[i].islower():
            komojo = False

if c and komojo:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import copy

s = list(input())
s_t = copy.deepcopy(s)
##if s[0] =="A" and "C" in s[2:-2]:
#    if
counter = 0
 
if s[0] != "A":
    print("WA")
    exit()
 
c = False
komojo = True

for i in range(len(s)):
    if  2 <= i <= len(s)-2:
        if s[i] == "C":
            c = True
            #continue
        elif not s[i].islower():
            komojo = False

if c and komojo:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == "A" and S[2:-1].count("C") == 1:
  ans = ""
  for i in S[1:]:
    if i.islower() == True:
      ans = "AC"
      pass
    elif i == "C":
      pass
    else:
      ans = "WA"
  print(ans)
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == "A" and S[2:-1].count("C") == 1:
  ans = ""
  for i in S[1:]:
    if i.islower() == True or i == "C":
      ans = "AC"
      pass
    else:
      ans = "WA"
  print(ans)
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == "A" and S[2:-2].count("C") == 1:
  ans = ""
  for i in S[1:]:
    if i.islower() == True or i == "C":
      ans = "AC"
      pass
    else:
      ans = "WA"
  print(ans)
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
l = s.find("C")
r = s.rfind("C")
a = s[1:]
a = a.replace("C","")
if s[0] != "A" or s[-1] == "C" or l != r or 2 > l or not a.islower:
  print("WA")
else:
  print("AC")

Submission status: Wrong Answer

Solution code:
S = input()

SLEN = (len(S))

A = list(S)



small = 0

for i in range(SLEN):
    if A[i].islower() == True:
        small = small + 1

big = (SLEN - small) 

Check= S[2:SLEN-2]
CNUM=Check.count("C")

if A[0] == "A" and  big == 2 and CNUM == 1 and A[-1] != "C":  
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

SLEN = (len(S))

A = list(S)



small = 0

for i in range(SLEN):
    if A[i].islower() == True:
        small = small + 1

big = (SLEN - small) 

Check= S[2:SLEN-2]
CNUM=Check.count("C")

if A[0] == "A" and  big == 2 and CNUM == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
cheack1 = False
cheack2 = False
cheack3 = False
count = 0

if S[0]=='A':
    cheack1=True
    S = S.replace("A", "a")

if S[1]=="C" or S[int(len(S))-1]=="C":
    cheack2==False
else:
    for i in range(2, int(len(S))-1):
        if S[i]=="C":
            count += 1

    if count==1:
        cheack2=True
        S = S.replace("C","c")

cheack3 = S.islower()

print(str(cheack1)+" "+str(cheack2)+" "+str(cheack3))
if cheack1 and cheack2 and cheack3:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
A = False
B = False
C = False
ans = 'WA'
if S[0] == 'A':
  A = True
if S[2:-1].find('C') == S[2:-1].rfind('C'):
  B = True
  S = S.lstrip('A')
  D = S[S.find('C')+1:]
  E = S[:S.find('C')]
  if D.islower() == True and E.islower() == True:
    C = True
if A == True and B == True and C == True:
  ans = 'AC'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())

if (s[0] == 'A'
    and len([i for i in s[2:-1] if i == 'C']) == 1
    and str([i for i in s[2:-1] if i != 'C']).islower
    and s[1].islower
    and s[-1].islower):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = str(input())

if (s[0] == 'A'
    and len([i for i in s[2:-1] if i == 'C']) == 1
    and str([i for i in s[1:] if i != 'C']).islower
    and s[1] != 'C'
    and s[-1] != 'C'):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = str(input())

if (s[0] == 'A'
    and len([i for i in s[2:-1] if i == 'C']) == 1
    and str([i for i in s[1:] if i != 'C']).islower):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S=input()
L=len(S)
if S[0]=='A':
  for i in range(2,L-1):
    if S[i]=='C':
      for j in range(2,L):
        if str.isupper(S[j]):
          if i!=j:
            break
      else:
        print('AC')
        break
  else:
    print('WA')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] != "A":
    print("WA")
    exit()
num_C = 0
pos_C = 0
for i in range(2, len(S)):
    if S[i] == "C":
        num_C += 1
        pos_C = i
if num_C != 1:
    print("WA")
    exit()
for i in range(1, len(S)):
    if i == pos_C:
        continue
    if S[i].isupper():
        print("WA")
        exit()
print("AC")

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
if S[0]!='A':
    print('WA')
else:
    cnt = 0
    for i in range(2,N-2+1):
        if S[i]=='C':
            cnt += 1
    if cnt != 1:
        print('WA')
    else:
        D=(S[0].isupper()>0)
        flg=0
        for i in range(1,N-1):
            if D==(S[i].isupper()>0):
                flg+=1
        if flg==1:
            print('AC')
        else:
            print('WA')

Submission status: Wrong Answer

Solution code:
import sys
import re


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

Submission status: Wrong Answer

Solution code:
import sys
import re


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

Submission status: Wrong Answer

Solution code:
import sys
import re


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

Submission status: Wrong Answer

Solution code:
import sys
import re


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

Submission status: Wrong Answer

Solution code:
import sys
import re


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

Submission status: Wrong Answer

Solution code:
import sys
import re


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

Submission status: Wrong Answer

Solution code:
import sys
import re


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

Submission status: Wrong Answer

Solution code:
S=input()
flag1=False
flag2=False
flag3=False
pos=-1

if S[0]=='A':
    flag1=True

if S[2:-1].count('C')==1:
    flag2=True
    pos=S.find('C')
     
if pos!=-1 and S[2].islower and S[2:pos+1].islower and S[pos+1:-1].islower and S[-2:].islower:
    flag3=True

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

Submission status: Wrong Answer

Solution code:
S = list(input())
S = S[2:-1]
cnt = 0
for c in S:
    if c == "C":
        cnt += 1
if cnt == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
print("WA")

Submission status: Wrong Answer

Solution code:
A = list(input())
k = False
if A[0] == 'A' and A[1].islower() == True and  A[-1].islower() == True:
  A.pop(0)
  A=str(A)
  A = A.replace('C', 'c', 1)
  k = A.islower()
if k:
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
A = list(input())
k = False
if A[0] == 'A' and A[2] == 'C':
  A.pop(0)
  A.pop(1)
  k = str.islower(str(A))
if k:
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == "A" and "C" in S[2:-1]:
  a = list(S)
  a.remove("A")
  a.remove("C")
  count = 0
  if len(a) == len(S) - 2:
    for i in range(len(a)):
      if a[i].islower:
        count += 1
        if count == len(a):
          ans = "AC"
else:
  ans = "WA"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = "AC"
if s[0]!="A":
    ans ="WA"

n = len(s)
a = 0
for i in range(1,n-1):
    x = ord(s[i])
    if x==ord("C") and i!=1:
        a+=1
        continue
    
    if ord("a")<=x and x <= ord("z"):
        continue
    else:
        ans ="WA"
if a!=1:
    ans ="WA"
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ss=s[1:-1]

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

Submission status: Wrong Answer

Solution code:
s=input()
ss=s[1:-1]
sss=[]
for i in s:
      if i !="A" and i!="C":
            sss.append(i)

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

Submission status: Wrong Answer

Solution code:
s=input()
ss=s[1:-1]
sss=[]
for i in ss:
      if i !="A" and i!="C":
            sss.append(i)

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

Submission status: Wrong Answer

Solution code:
s=input()
ss=s[1:-2]
sss=[]
for i in ss:
      if i !="A" and i!="C":
            sss.append(i)

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

Submission status: Wrong Answer

Solution code:
S = str(input())
j_count = 0
X = []

for s in S:
    X.append(s)

if X[0] == 'A':
    j_count += 1
    if X[1:len(X)-1].count('C') == 1:
        j_count += 1
        X.remove('A')
        X.remove('C')
        S_n = ''.join(X)
        if S_n.islower():
            j_count += 1

if j_count == 3:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = str(input())
j_count = 0
n = len(S)

for n in range(2,n-1):
    if S[n] == 'C':
        j_count += 1
        if S[1:n].islower() and S[n+1:-1].islower():
            j_count += 1
            break
    j_count = 0


if S[0] == 'A':
    j_count += 1

if j_count == 3:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
must=s[2:-1]
cnt=0
if s[0]=='A':
  cnt+=1
if must.count('C')==1:
  cnt+=1
a=0
for l in s:
  if l.isupper():
    a+=1
    if a==2:
      cnt+=1
if cnt==3:
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
must=s[2:-1]
cnt=0
if s[0]=='A':
  cnt+=1
if must.count('C')==1:
  cnt+=1
a=0
for l in s:
  if s.islower():
    a+=1
    if len(s)-a==2:
      cnt+=1
if cnt==3:
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
print(S)
small = [chr(i) for i in range(97,97+26)]
print(small)
count = 0
ans = 'AC'
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            ans = 'WA'
            break
    elif i == 1:
        if S[i] not in small:
            ans = 'WA'
            break
    elif i != len(S)-1:
        if S[i] == 'C':
            count += 1
        elif S[i] not in small:
            ans = 'WA'
            break
    else:
        if S[i] not in small:
            ans = 'WA'
if ans == 'AC' and count != 1:
    ans = 'WA'
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
import string
if s[0] == "A" :
    for i in range(2,len(s)-1) :
        if s[i] != "C" :
            continue
        elif s[i] == "C" :
            if (set(s[1:i]) <= set(string.ascii_lowercase)) and (set(s[i+1:]) <= set(string.ascii_lowercase)) :
                print("WA")
                break
    else :
        print("WA")
else :
    print("WA")