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 sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        s=input()
        if s[0]=='A' and s[2:-1].count('C')==1:
            for i in range(2,len(s)-1):
                if s[i]!='C' and s[i].isupper():
                    return 'WA'
            if s[1].isupper() and s[-1].isupper():
                return 'WA'
            return 'AC'

        else:
            return 'WA'
    print(main())
resolve()

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        s=input()
        if s[0]=='A' and s[2:-1].count('C')==1:
            for i in range(2,len(s)-1):
                if s[i]!='C' and s[i].isupper():
                    return 'WA'
            if s[1].islower() and s[-1].islower():
                return 'AC'
        else:
            return 'WA'
    print(main())
resolve()

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        s=input()
        if s[0]=='A' and s[2:-1].count('C')==1:
            for i in range(2,len(s)):
                if s[i]!='C' and s[i].isupper():
                    return 'WA'
            if s[1].islower() and s[-1].islower():
                return 'AC'
        else:
            return 'WA'
    print(main())
resolve()

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    s=input()
    if s[0]=='A' and s[2:-1].count('C')==1:
        for i in range(2,len(s)):
            if s[i]!='C' and s[i].isupper():
                print('WA')
        if s[1].islower() and s[-1].islower():
            print('AC')
    else:
        print('WA')
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()


def check(w):
    if w[0] != 'A':
        return False
    n = len(w)
    count = 0
    for a in range(2, n):
        if w[a] == 'C':
            count += 1
    if count != 1:
        return False
    upper = 0
    for a in range(0, n):
        if w[a] >= 'A' and w[a] <= 'Z':
            upper += 1

    if upper != 2:
        return False
    return True

if check(s):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
def f(s):
  u = 0
  for c in s:
    if c.isupper:
      u += 1
  return u == 1
s = input()
if s[0] == 'A' and s[2:-1].count('C') == 1 and f(s[1:]):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
def f(s):
  u = 0
  for c in s:
    if c.isupper:
      u += 1
  return u == 1
s = input()
if s[0] == 'A' and s[2:-1].count('C') == 1 and f(s):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
S=input()
first=S[0]
second=S[1]
last=S[len(S)-1]
cnt=0
moji=[i for i in "abcdefghijklmnopqrstuvwxyz"]
# print(len(moji))

if first=="A":
  for i in range(2,len(S)-1):
    print(i)
    if S[i]=="C":
      cnt+=1
    else:
      if (S[i] in moji)==False:
        print("WA")
        sys.exit()

  if cnt==1 and ((last in moji)==True) and ((second in moji)==True):
    print("AC")
  else:
    print("WA")
        
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
import sys
S=input()
first=S[0]
last=S[len(S)-1]
cnt=0
moji=[i for i in "abcdefghijklmnopqrstuvwxyz"]
# print(len(moji))

if first=="A":
  for i in range(2,len(S)):
    if S[i]=="C":
      cnt+=1
    else:
      if (S[i] in moji)==False:
        print("WA")
        sys.exit()

  if cnt==1 and ((last in moji)==True):
    print("AC")
  else:
    print("WA")
        
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
import sys
S=input()
first=S[0]
last=S[len(S)-1]
cnt=0
moji=[i for i in "abcdefghijklmnopqrstuvwxyz"]
# print(len(moji))

if first=="A":
  for i in range(2,len(S)-1):
    if S[i]=="C":
      cnt+=1
    else:
      if (S[i] in moji)==False:
        print("WA")
        sys.exit()

  if cnt==1 and ((last in moji)==True):
    print("AC")
  else:
    print("WA")
        
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
import sys
S=input()
first=S[0]
cnt=0
moji=[i for i in "abcdefghijklmnopqrstuvwxyz"]

if first=="A":
  for i in range(2,len(S)-1):
    if S[i]=="C":
      cnt+=1
    else:
      if (S[i] in moji)==False:
        print("WA")
        sys.exit()

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

Submission status: Wrong Answer

Solution code:
import sys
S=input()
first=S[0]
cnt=0
moji=[i for i in "abcdefghijklmnopqrstuvwxyz"]

if first=="A":
  for i in range(2,len(S)-1):
    if S[i]=="C":
      cnt+=1
    else:
      for j in moji:
        if S[i] in moji == False:
          print("WA")
          sys.exit()
          
  if cnt==1:
    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 and s.count('A')==1 and s.count('C')==1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import copy
s=list(input())
if s[0]=='A' and 'C' in s[2:len(s)] :
  t=copy.copy(s)
  s.remove('A')
  s.remove('C')
  result=''.join(s)
  if len(s)==len(t)-2 and result.islower()==True:
    print('AC')
  else:
    print('WA')
    
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
import copy
s=list(input())
if s[0]=='A' and 'C' in s[2:len(s)] :
  t=copy.copy(s)
  s.remove('A')
  s.remove('C')
  result=''.join(s)
  if len(s)==len(t)-2 and result.islower==True:
    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:
    S2 = S[1] + S[2:-1].replace('C', '')
    if S2 == S.lower():
        print('AC')
        exit()
print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
cnt1 = 0
cnt2 = 0
if S[0] == 'A':
    for i in range(2, len(S)-1, 1):
        ord_c = ord(S[i])

        ###Cだったら
        if ord_c == 67:
            cnt1 += 1

        ###C以外の大文字があったら
        elif 65 <= ord_c and ord_c <= 90:
            cnt2 += 1

    if cnt1 == 1 and cnt2 == 0:
        print('AC')
    else:
        print('WA')
elif S[0] != 'A':
    print('WA')
elif 65 <= ord(S[1]) and ord(S[1]) <= 90:
    print('WA')
elif 65 <= ord(S[-1]) and ord(S[-1]) <= 90:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
cnt1 = 0
cnt2 = 0
if S[0] == 'A':
    for i in range(2, len(S)-1, 1):
        ord_c = ord(S[i])

        ###Cだったら
        if ord_c == 67:
            cnt1 += 1

        ###C以外の大文字があったら
        elif 65 <= ord_c and ord_c <= 90:
            cnt2 += 1

    if cnt1 == 1 and cnt2 == 0:
        print('AC')
    else:
        print('WA')
elif 65 <= ord(S[1]) and ord(S[1]) <= 90:
    print('WA')
elif 65 <= ord(S[-1]) and ord(S[-1]) <= 90:
    print('WA')
elif S[0] != 'A':
    print('WA')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
S = input()
if S[0] == "A":
    ans2 = "AC"
else:
    ans2 = "WA"
list = list(S)

del list[1]
del list[0]
del list[-1]
ans1 = "WA"
if list.count("C") == 1:
    ans1 = "AC"
else:
    ans1 = "WA"

if ans1 == "AC" and ans2 == "AC":
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
lenlen=len(s)
count=0
if s[0]=="A":
  t=s[2:lenlen-1]
  for i in range(0,len(t)):
    if t[i]=="C":
      count+=1
  if count==1:
    tttt=0
    for j in range(0,lenlen):
      if not 97<=ord(s[j])<=122:
        tttt+=1
    if tttt==2:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0]!='A' or s[2:-1].count('C')!= 1:
  print('WA')
  exit()
  
for c in s[1:]:
  if not('a'<= c <= 'z') or c=='C':
    print('WA')
    break
else:
  print('AC')

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline
MOD = 1000000007

S = input()[:-1]

S = list(S)

if S[0] == 'A':
    if 'C' in S[2:-1] and  S.count('C') == 1:
        cnt = 0
        for i in range(1,len(S)):
            if S[i].isupper() and S[i] == 'C':
                continue
            else:
                cnt+=1
        #print(x)
        if cnt == len(S)-2:
            print("AC")
            exit()

print("WA")

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline
MOD = 1000000007

S = input()[:-1]
if S[0] !='A':
    print("WA")
    exit()

if 'C' not in S[2:-1] or (S.count('C') > 1) :
    print("WA")
    exit()


if ('c'  in S) or ('a' in S)  :
    print("WA")
    exit()

print("AC")

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline
MOD = 1000000007

S = input()[:-1]
if S[0] !='A':
    print("WA")
    exit()

if 'C' not in S[2:-2] or (S.count('C') > 1) :
    print("WA")
    exit()


if ('c'  in S) or ('a' in S)  :
    print("WA")
    exit()

print("AC")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline
S=list(input())
print("AC" if S[0]=="A" and S[-1]!="C" and S.count("C") == 1 and S[1] != "C" else "WA" )

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline
S=list(input())
print("AC" if S[0]=="A" and S[-1]!="C" and S.count("C") == 1 else "WA")

Submission status: Wrong Answer

Solution code:
s=input()
flag=0
if s[0]=="A":
    ss=s[2:-1]
    if ss.count("C")==1:
        for i,j in enumerate(ss):
            if j=="C":
                ss=ss.replace("C","c",1)
                if ss.islower() and s[1].islower():
                    print("AC")
                    flag=1
if flag==0:
    print("WA")

Submission status: Wrong Answer

Solution code:
# B
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ok = True

ok &= s[0] == 'A'
ok &= s[1].islower()
ok &= s[2:-1].count('C') == 1
ok &= all(c.islower() for c in s[2:-1] if c != 'C')
ok &= s[-1].islower()

print('AC' if ok else 'No')

Submission status: Wrong Answer

Solution code:
s = input()
count1 = 0
count2 = 0
count3 = 0
count4 = 0
if s[0] == 'A'and s[1].islower() == True:
    count1 += 1
for i in range(2, len(s) - 2):
    if (s[i] == 'C'):
        count2 += 1
for i in range(len(s) - 2, len(s)):
    if s[i].islower() == True:
        count3 += 1
if count1 != 1 or count2 != 1 or count3 != 2:
    print('WA')
else:
    print('AC')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
d = [chr(ord('A')+i) for i in range(26)]
first = S[0] == 'A'
second = sum([1 if i == 'C' else 0 for i in S[2:-2] ])
third = sum([1 if i in d else 0 for i in S])
if first and second == 1 and third == 2:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
d = [chr(ord('A')+i) for i in range(26)]
first = S[0] == 'A'
second = sum([1 if i == 'C' else 0 for i in S[2:-2] ])
third = sum([1 if i in d else 0 for i in S ])
if first and second and third == 2:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
d = [chr(ord('A')+i) for i in range(26)]
first = S[0] == 'A'
second = sum([1 if i == 'C' else 0 for i in S[2:-2] ])
third = sum([1 if i in d else 0 for i in S ])
print(first, second, third)
if first and second and third == 2:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
ans = 'AC'

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

tmp = 0
for s in S:
    if s != 'A' and s != 'C':
        tmp += 1


if tmp != (len(S) - 2):
    ans = 'WA'

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == 'A'\
   and any(s[i] == 'C' and s[-i].islower()
       	   for i in (2, -2))\
   and (s[1]+s[3:-2]+s[-1]).islower():
      print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
ans = 'WA'
if s[0] == 'A' and (s[3] == 'C' or s[-2] == 'C') and s[3]+s[-2] != 'CC' and s.islower():
  ans = 'AC'
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
out = False
if s[0] != 'A':
    out = True
C = False

for ss in s[2:-1]:
    if ss == 'C':
        if C:
            out = True
        C = True
    elif s.isupper():
        out = True

if not C or s[-1].isupper():
    out = True

if out:
    print('WA')
else:
    print('AC')

Submission status: Wrong Answer

Solution code:
s=input()
a=True
if s[0]!='A':
#Sの先頭の文字は大文字の A である。
    a=False

s2=s[2:-1]
if s2.count('C')!=1:
#Sの先頭から3文字目と末尾から2文字目の間（両端含む）に
# 大文字の C がちょうど1個含まれる
    a=False

s3=s2.replace('C','c',1)
if s3.islower()==False:
#以上の A, C を除くSのすべての文字は小文字
    a=False

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

Submission status: Wrong Answer

Solution code:
s = input()

flag = True

if s[0] != 'A' or s.count('C') != 1 or s[2:-2].count('C') != 1:
    flag = False
else:
    for i in range(1, len(s)):
        if s[i] != 'C' and s[i].isupper():
            flag = False

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

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)

if s[0] == "A":
    if s[2:l - 1].count("C") == 1:
        if s.count("A") == 1:
            s.replace("A", "a")
            s.replace("C", "c")
            if s.islower == True:
                print("AC")
                exit()
print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)

if s[0] == "A":
    if s[2:l - 1].count("C") == 1:
        s.replace("A", "a")
        s.replace("C", "c")
        if s.islower == True:
            print("AC")
            exit()
print("WA")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=str(input())
s[0] == "A"
if 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=str(input())
s[0] == "A"
print(s[2:-1])
if 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:
num = list(input())
count_c = num[2:-1].count("C")

if num[0] != "A":
  print("WA")
else:
  if count_c > 1:
    print("WA")
  else:
    if "C" in num[2:-1]:
      num.remove("C")
      jadge = "".join(num)
      if jadge:
        suuzi = "false"
        for i in range(len(num)):
          if num[i].isdecimal():
            suuzi = "true"
        if(suuzi == "false"):
          print("AC")
        else:
          print("WA")
      else:
        print("WA")
    else:
      print("WA")

Submission status: Wrong Answer

Solution code:
num = list(input())
count_c = num[2:-1].count("C")

if num[0] != "A":
  print("WA")
else:
  if count_c > 1:
    print("WA")
  else:
    if "C" in num[2:-2]:
      num.remove("C")
      jadge = "".join(num)
      if jadge:
        suuzi = "false"
        for i in range(len(num)):
          if num[i].isdecimal():
            suuzi = "true"
        if(suuzi == "false"):
          print("AC")
        else:
          print("WA")
      else:
        print("WA")
    else:
      print("WA")

Submission status: Wrong Answer

Solution code:
num = list(input())
count_c = num[2:-1].count("C")

if num[0] != "A":
  print("WA")
else:
  if count_c > 1:
    print("WA")
  else:
    if "C" in num[2:-2]:
      num.remove("C")
      jadge = "".join(num)
      if jadge:
        print("AC")
      else:
        print("WA")
    else:
      print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] != 'A': print('WA')
else:
    c_cnt = 0
    end_p = len(s)-2
    for i in range(1,len(s)):
        
        # C判定
        if 2 <= i < end_p and s[i] == 'C':
            c_cnt += 1
        
        # 小文字かどうか
        elif s[i] != s[i].lower():
            print('WA')
            exit()

    if c_cnt != 1:
        print('WA')
    else:
        print('AC')

Submission status: Wrong Answer

Solution code:
s=input()
def AcCepted(str1):
    if str1[0]!='A':
        return False
    str2=str1[1:-1]
    if str2.count('C')!=1:
         return False
    else:
        str3=str2.strip('C')
        if str3.islower ==False:
            return False
    return True

if AcCepted(s)==True:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
a=True
if s[0]!='A':
    a=False
s2=s[2:-1]
if s2.count('C')!=1:
    a=False
s3=s2.strip('C')
if s3.islower()==False:
    a=False
if a==True:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
a=True
if s[0]!='A':
    a=False
s2=s[2:-1]
if s2.count('C')!=1:
    a=False
s3=s2.strip('C')
a=s3.islower()

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

Submission status: Wrong Answer

Solution code:
s=input()
def AcCepted(str1):
    if str1[0]!='A':
        return False
    str2=str1[2:-1]
    if str2.count('C')!=1:
         return False
    str3=str2.strip('C')
    if str3.islower ==False:
       return False
    return True

if AcCepted(s)==True:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
def AcCepted(str1):
    if str1[0]!='A':
        return False
    str2=str1[2:-1]
    if str2.count('C')!=1:
         return False
    else:
        str3=str2.strip('C')
        if str3.islower ==False:
            return False
    return True

if AcCepted(s)==True:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    L, R = 2, len(S) - 2
    cnt = 0
    for i in range(len(S)):
        if S[i] == 'A' and i == 0:
            continue
        if S[i] == 'C' and L <= i <= R:
            cnt += 1
            continue
        if S[i].isupper():
            print('WA')
            exit()

    if cnt != 1:
        print('WA')
    else:
        print('AC')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s=list(input())
cnt=0
if s[0]!='A':
    print('WA')
    exit()
for i in range(2,len(s)-1):
    if s[i]=='C':
        cnt+=1
if 2<=cnt or cnt==0:
    print('WA')
    exit()
if 3<=s.count('[A-Z]'):
    print('WA')
else:
    print('AC')

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    L, R = 2, len(S) - 2

    if L > R:
        L, R = R, L
    cnt = 0
    for i in range(len(S)):
        if S[i] == 'A' and i == 0:
            continue
        if S[i] == 'C' and L <= i < R:
            cnt += 1
            continue
        if S[i].isupper():
            print('WA')
            exit()

    if cnt != 1:
        print('WA')
    else:
        print('AC')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = list(input())
L = S[2:len(S)-1]
a = 0
for i in range(len(S)):
    if 64 < (ord(S[i])) <= 90:
        a = a+1

if L.count("C") == 1 and S[0] == "A" and a == 1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
l=len(s)

ans='AC'
c=0
cp=0
if s[0]!='A':
  ans='WA'
for i in range(2, l-1):
  if s[i]=='C':
    c+=1
    cp=i
if c!=1:
  ans='WA'
ls = s[1:cp] + s[cp+1:l]
if not ls.islower:
  ans='WA'
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

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

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


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

Submission status: Wrong Answer

Solution code:
S = input()

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

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


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

Submission status: Wrong Answer

Solution code:
S = input()

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

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

for i in range(2,len(S)):
    if i != S.index('C') or i == len(S):
        if not S[i].islower():
            print('WA')
            exit()

print('AC')

Submission status: Wrong Answer

Solution code:
S = input()

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

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

for i in range(2,len(S)):
    if i != S.index('C'):
        if not S[i].islower():
            print('WA')
            exit()

print('AC')

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == 'A':
    count = 0
    for i in range(2,len(S)):
        if S[i] == 'C':
            count += 1
            a = i

        if count > 1:
            print('WA')
            exit()

    if count == 1:
        for i in S[1:]:
            if i != S[a]:
                if not i.islower():
                    print('WA')
                    exit()
    else:
        print('WA')
        exit()
else:
    print('WA')
    exit()

print('AC')

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == 'A':
    count = 0
    for i in range(2,len(S)):
        if S[i] == 'C':
            count += 1
            a = i

        if count > 1:
            print('WA')
            exit()

    if count == 1:
        for i in S[1:]:
            if i != S[a]:
                if not i.islower():
                    print('WA')
                    exit()
    else:
        print('WA')
        exit()

print('AC')

Submission status: Wrong Answer

Solution code:
S = input()

ans = 'AC'

if S[:1] != 'A':
    print('WA')
    exit()

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

X = S[1:].split('C')
for x in X:
    if x.islower:
        pass
    else:
        print('WA')
        exit()

print('AC')

Submission status: Wrong Answer

Solution code:
S = input()

ans = 'AC'

if S[:1] == 'A':
    if S[2:-1].count('C') == 1:
        tmp = S[1:].split('C')
        for x in tmp:
            if x.islower:
                pass
            else:
                ans = 'WA'
    else:
        ans = 'WA'
else:
    ans = 'WA'
print(ans)

Submission status: Wrong Answer

Solution code:
s = list(input())
alpha = [chr(i) for i in range(97, 97+26)]

flag = True
if s[0] != "A" or (not "C" in s[2:-1]):
  flag = False
  
else:
  cin = s.index("C")
  for i in range(len(s)):
    if i == 0 or i == cin:
      continue

    if (not s[i] in alpha):
      flag = False
      break
    
print("AC" if flag else "WC")

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,operator,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
S = S()
condition1 = S[0]=='A'
condition2 = S[2:-2].count('C')==1
S = S.replace('A','a',1)
S = S.replace('C','c',1)
condition3 = S.islower()
print('AC' if condition1 and condition2 and condition3 else 'WA')

Submission status: Wrong Answer

Solution code:
icase=0
if icase==0:
    s=input()
    yn=""
    if s[0]!="A":
        yn="WA"
    elif not s[1].islower():
        yn="WA"
    else:
        icnt=0
        for i in range(2,len(s)):
            if s[i]=="C":
                icnt+=1
            elif not s[i].islower():
                yn="WA"
                break
        if icnt!=1:
            yn="WA"                
    if yn=="WA":
        print("WA")
    else:
        print("AC")

Submission status: Wrong Answer

Solution code:
icase=0
if icase==0:
    s=input()
    yn=""
    if s[0]!="A":
        yn="WA"
    elif not s[1].islower():
        yn="WA"
    else:
        icnt=0
        for i in range(2,len(s)):
            if s[i]=="C":
                icnt+=1
            elif not s[i].islower():
                yn="WA"
                break
            if icnt!=1:
                yn="WA"                
    if yn=="WA":
        print("WA")
    else:
        print("AC")

Submission status: Wrong Answer

Solution code:
# abc104_b.py
S = input()
upper_cnt=0
print(S[2:-1])
for i,c in enumerate(S):
    if (i==0 and c!="A") or S[2:-1].count("C")!=1 or (i==1 and not c.islower()):
        print('WA')
        exit()
    if i>=1 and c.isupper():
         upper_cnt+=1
    if upper_cnt >1:
        print('WA')
        exit()
print('AC')

Submission status: Wrong Answer

Solution code:
print("AC")

Submission status: Wrong Answer

Solution code:
print("Yes")

Submission status: Wrong Answer

Solution code:
# abc104_b.py
S = input()
upper_cnt=0
for i,c in enumerate(S):
    if (i==0 and c!="A") or S[2:-2].count("C")!=1 or (i==1 and not c.islower()):
        print('WA')
        exit()
    if i>=1 and c.isupper():
         upper_cnt+=1
    if upper_cnt >1:
        print('WA')
        exit()
print('AC')