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":
    print("WA")
elif "C" not in s[2:] or s[2:].count("C")!=1:
    print("WA")
elif s[1:].strip("C")==str.lower(s[1:].strip("C")):
    print("AC")
    
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
res = "AC"
for i in s:
    if (i!="A" and i!="C" and i.isupper() == True):
        res = "WA"
        break;
        
if (res == "AC" and s[0]=="A" and s.count("C")==1 and s.count("a") ==0 and s.count("c") == 0 and s.index("C")>1 and s.index("C")<len(s)-1 ):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
S = input()
if S[0] == 'A' and 'C' in S[2:-2] and S[1:S.find('C')].islower() is True and S[S.find('C')+1:].islower() is True:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
print('Yes' if s[0]=='A' and s[2]=='C' and str.islower(s[1]+s[3:]) else 'No')

Submission status: Wrong Answer

Solution code:
s = list(input())

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

else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())

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

    s.remove("A")
    s.remove("C")
    
    if "".join(s).lower() == "".join(s):
        print("AC")

else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","c")

        if s.isupper()=="False":

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

Submission status: Wrong Answer

Solution code:
s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","b")
        if s.isupper()==False:
            print(s.isupper())
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","b")
        if s.isupper()==False:
            print(s.isupper())
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","")
        s=s.replace("C","")
        if s.isupper()==False:
            print(s.isupper())
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","")
        s=s.replace("C","")
        if s.isupper()==False:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:

s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","")
        s=s.replace("C","")
        if s.isupper()==False:
            print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
print(s[2:len(s)-1])
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)] and s[0]=="A":
        s=s.replace("A","")
        s=s.replace("C","")
        if s.isupper()==False:
            print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1]:
        s=s.replace("A","")
        s=s.replace("C","")
        if s.isupper()==False:
            print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())
count = 0
if S[0] == 'A':
    for i in range(2,len(S)-1):
        if S[i] == 'C':
            count += 1
    if count == 1:
        print('AC')
    else:
        print('WA')
else:
    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[0].replace('A', 'a') + S[2 : -1].replace('C', 'c') + S[-1] == S.lower():
            ans = 'AC'
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
ans = 'WA'
if S[0] == 'A':
    if S[2 : -1].count('C') == 1:
        for s in S:
            if s != 'A' and s != 'C' and s == s.lower():
                ans = 'AC'
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] != "A":
  print("WA")
  exit()
if S[1] == "C":
  print("WA")
  exit() 
if "C" not in S:
  print("WA")
  exit()
x = S.index("C")
if "C" in S[x+1:]:
  print("WA")
  exit()
if S[1:x]+S[x+1:] != (S[1:x]+S[x+1:]).lower():
  print("WA")
  exit()

print("AC")

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] != "A":
  print("WA")
  exit()
if "C" not in S:
  print("WA")
  exit()
x = S.index("C")
if "C" in S[x+1:]:
  print("WA")
  exit()
if S[1:x]+S[x+1:] != (S[1:x]+S[x+1:]).lower():
  print("WA")
  exit()

print("AC")

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] != "A":
  print("WA")
  exit()
if "C" not in S:
  print("WA")
  exit()
x = S.index("C")
if S[1:x]+S[x+1:] != (S[1:x]+S[x+1:]).lower():
  print("WA")
  exit()

print("AC")

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] != "A":
  print("WA")
  exit()
if S[2] != "C":
  print("WA")
  exit()
if S[1]+S[3:] != (S[1]+S[3:]).lower():
  print("WA")
  exit()

print("AC")

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] != "A":
  print("WA")
  exit()
if S[2] != "C":
  print("WA")
  exit()
if S[1]+S[2:] != (S[1]+S[2:]).lower():
  print("WA")
  exit()

print("AC")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18
# ----------------------------------------------------------- #

s = S()
if s[0] == 'A' and s[2:-2].count('C') == 1:
    t = list(s[1:])
    t.remove('C')
    if all(x.islower() for x in t):
        print('AC')
        exit()

print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
if s[0]=="A" and s[2:-2].count("C")==1:
    l = []
    for si in s:
        if si=="C" or si=="A":
            pass
        else:
            l.append(si.islower())
    if all(l):
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0]=="A" and s[2:-2].count("C")==1:
    l = []
    for si in s[2:-2]:
        if si=="C":
            pass
        else:
            l.append(si.islower())
    if all(l):
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] != 'A':
  print('WA')
  exit()
sho = ord('a')
ok = 0
for i in s[2: len(s) - 1]:
  if ord(i) < sho:
    if ord(i) == ord("C"):
      ok += 1
    else:
      print("WA")
      exit()
if ord(s[0]) < sho or ord(s[1]) < sho or ord(s[len(s) - 1]) < sho:
  print("WA")
  exit()
if ok == 1:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] != 'A':
  print('WA')
  exit()
sho = ord('a')
ok = 0
for i in s[2: len(s) - 1]:
  if ord(i) < sho:
    if ord(i) == ord("C"):
      ok += 1
    else:
      print("WA")
      exit()
if ok == 1:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)

inf = 10 ** 15
mod = 10 ** 9 + 7

s = input()
if s[0] == 'A':
    tmp = s[2:]
    count = 0
    if s[1].isupper():
        print('WA')
        sys.exit()
    for c in tmp:
        if c.isupper():
            if c == 'C':
                count+=1
            else:
                print('WA')
                sys.exit()
    if count == 1:
        print('AC')
    else:
        print('WA')

else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
if S[0] != 'A':
    print('WA')
    exit()
if len([s for s in S[3:-2] if s == 'C']) != 1:
    print('WA')
    exit()
SL = [s for s in S if s not in ['A', 'C']]
if not all([sl.islower() for sl in SL]) or len(SL) + 2 != len(S):
    print('WA')
    exit()
print('AC')

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
import sys
s=input()
c=0
if s[0]=="A":
    for i in range(2,len(s)-2):
        if s[i]=="C":
            c+=1
            C_nobasyo=i
    #print(c)=1
    if c==1:
        text=s
        #print(text)
        text=text.replace("C","")
        text=text.lstrip("A")
        #print(text)
        if text.islower()==True:
            print("AC")
        else:
            print("WA")
            sys.exit()
    else:
        print("WA")
        sys.exit()
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import sys
s=input()
c=0
if s[0]=="A":
    for i in range(2,len(s)-2):
        if s[i]=="C":
            c+=1
            C_nobasyo=i
        else:
            print("WA")
            sys.exit()
    #print(c)=1
    if c==1:
        text=s
        #print(text)
        text=text.replace("C","")
        text=text.lstrip("A")
        #print(text)
        if text.islower()==True:
            print("AC")
        else:
            print("WA")
            sys.exit()
    else:
        print("WA")
        sys.exit()
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = str(input())
count = 0
ansFlg = 0

if s[0] == "A":
    s = "a" + s[1:]
    ansFlg += 1

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

if s.islower():
    ansFlg += 1

if ansFlg == 3:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=str(input())
temp=list(s)
if temp[0]=="A":
  del temp[len(s)-1]
  del temp[1]
  del temp[0]
  if "C" in temp:
    s=s.replace("A","")
    s=s.replace("C","")
    if s.islower()==True:
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
ans = "AC"

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

cnt = 0

for i in range(1, len(S)):
    s = S[i]
    if s.isupper():
        if s != "C":
            ans = "WA"
        cnt += 1

if cnt != 1:
    ans = "WA"

print(ans)

Submission status: Wrong Answer

Solution code:
import re;print("AC" if re.fullmatch("A[b-z]+C[b-z]+", input()) is not None else "WA")

Submission status: Wrong Answer

Solution code:
s = str(input())

flag = 0

if s[0] == 'A':
    s = s[0].lower() + s[1:]
    print(s)

    for i  in range(2, len(s)-1):
        if s[i]  == 'C':
            flag += 1
            s = s[:(i-1)] + s[i].lower() + s[i+1:]
            print(s)
            break
    
    if s.islower():
        flag += 1


if flag == 2:
    print('AC')
else:
    print('WC')

Submission status: Wrong Answer

Solution code:
import sys
s = input()

l = len(s)
if s[0] != "A":
    print("WA")
    sys.exit()
ss =  s[2:l-1]
if ss.count("C") != 1:
    print("WA")
    sys.exit()

cidx = ss.find("C")+2
sss = s[1:cidx]+s[cidx+1:]
print(sss)
if sss.islower():
    print("AC")
    sys.exit()

print("WA")

Submission status: Wrong Answer

Solution code:
import sys
s = input()

l = len(s)
if s[0] != "A":
    print("WA")
    sys.exit()
ss =  s[2:l-1]
if ss.count("C") != 1:
    print("WA")
    sys.exit()

cidx = ss.find("C")+2
sss = s[1:cidx]+s[cidx+1:-1]

if sss.islower():
    print("AC")
    sys.exit()

print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
flag = 1
if s[0] == "A":
    tmp = s[2:-2].find("C")
    if tmp >= 0:
        tmp2 = s[1]
        tmp2 += s[2:tmp+2]
        tmp2 += s[tmp+3:]
        if tmp2 == tmp2.lower():
            flag = 0
if flag == 0:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
flag = 1
if s[0] == "A":
    tmp = s[2:-2].find("C")
    if tmp >= 0:
        tmp2 = s[1]
        tmp2 += s[tmp+3:]
        if tmp2 == tmp2.lower():
            flag = 0
if flag == 0:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
def inpl(): return list(map(int, input().split()))
S = input()
ok = False
if S[0] == "A" and S[2:-2].count("C") == 1:
    u = 0
    for s in S[1:]:
        u += s.isupper()
    if u == 1:
        ok = True
if (ok):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

S = input().rstrip()
trimed_S = S[3:-2].replace('C', '', 1)

ans = 'AC'
if S[0] != 'A':
  ans = 'WA'
elif not trimed_S.islower() or len(S) - len(trimed_S) != 1:
  ans = 'WA'

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
s_len = len(s)
if s[0] == "A":
    if s[2:s_len-1].count("C") == 1:
        dum = s.index("C")
        s = s[1:dum]+s[dum+1:s_len]
        if s == s.lower():
            print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
yn=0
if s[0]=="A" and ord(s[2])>95 and ord(s[len(s)-1])>95 and s.count("C")==1:
    for i in range(len(s)-3):
        if s[i+2]!="C" and ord(s[i+2])<92:
            yn=1
    if yn==1:
        print("WA")
    else:
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
yn=0
if s.count("C")==1 and s[0]=="A" and s[1]!="C" and s[len(s)-1]!="C":
    for i in range(2,len(s)-1):
        if ord(s[i])<96:
            if s[i]!="C":
                yn=1
    if yn==1:
        print("WA")
    else:
        print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
yn=0
if s.count("C")==1 and s[0]=="A" and s[1]!="C" and s[len(s)-1]!="C":
    for i in range(2,len(s)-1):
        if ord(s[i])<96:
            if s[i]!="C":
                yn=1
    if yn==1:
        print("No")
    else:
        print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
yn=0
num=0
count=0
for i in range(len(s)):
    num=ord(s[i])
    if i==0:
        if num!=65:
            yn=1
            break
    elif i==1 or i==(len(s))-1:
        if num==67:
            yn=1
            break
    else:
        if num==67:
            count+=1
        elif num<93:
            yn=1
            break
if yn==1:
    print("WA")
elif count==0 or count>1.5:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
s=input()
yn=0
num=0
count=0
for i in range(len(s)):
    if i==0:
        if s[0]!="A":
            yn=1
            break
    elif i==1 or i==(len(s))-1:
        if s[i]=="C":
            yn=1
            break
    else:
        num=ord(s[i])
        if s[i]=="C":
            count+=1
        elif num<93:
            yn=1
            break
if yn==1:
    print("WA")
elif count==0 or count>1.5:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
s=input()
yn=0
num=0
count=0
for i in range(len(s)):
    if i==0:
        if s[0]!="A":
            yn=1
            break
    elif i==1 or i==(len(s))-1:
        if s[i]=="C":
            yn=1
            break
    else:
        if s[i]=="C":
            count+=1
        num=ord(s[i])
        if num<93:
            yn=1
            break
if yn==1:
    print("WA")
elif count==0 or count>1:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
s=input()
yn=0
num=0
for i in range(len(s)):
    if i==0:
        if s[0]!="A":
            yn=1
            break
    elif i==2:
        if s[2]!="C":
            yn=1
            break
    else:
        num=ord(s[i])
        if num<93:
            yn=1
            break
if yn==1:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 16:16:15 2020

@author: shinba
"""
import sys

s = list(input())

if s[0] != "A":
    print("WA")
    sys.exit()
else:
    s = s[1:]

t = s[1:len(s)-1]

if t.count("C") != 1:
    print("WA")
    sys.exit()
else:
    t.remove("C")

t.append(s[-1])

if "".join(t) == "".join(t).lower():
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
s = list(s)
s[0] = 'a'
f = 0
for i in range(2,len(s)-1):
    if s[i] == "C":
        if f:
            ans = "WA"
        else:
            f = 1
            s[i] = "c"

if not f:
    ans = "WA"
for si in s:
    if si not in "abcdefghijklmnopqrstuvwxyz":
        print(si, 1)
        ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())

if S[0] != 'A':
    print('WC')
elif S[2:-1].count('C') != 1:
    print('WC')
else:
    S = list(S[1:])
    S.remove('C')
    S = ''.join(S)
    if S.islower():
        print('AC')
    else:
        print('WC')

Submission status: Wrong Answer

Solution code:
S = list(input())

if S[0] != 'A':
    print('WC')
elif 'C' not in S[2:-1]:
    print('WC')
else:
    S.remove('A')
    S.remove('C')
    S = ''.join(S)
    if S.islower():
        print('AC')
    else:
        print('WC')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

def main():
    S = input()

    flag1 = False
    if S[0] == 'A':
        flag1 = True
    
    flag2 = False
    cnt = 0
    for i in S[2:-2]:
        if i == 'C':
            cnt += 1
    if cnt == 1:
        flag2 = True
    
    flag3 = False
    cnt = 0
    for i in S:
        if i.isupper():
            cnt += 1
    if cnt == 2:
        flag3 = True

    if flag1 == flag2 == flag3 == True:
        print('AC')
    else:
        print('WA')


main()

Submission status: Wrong Answer

Solution code:
import sys
S = input()
if S[0] != 'A':
    print('WA')
    sys.exit()
    
n = len(S)
ct = 0
for i in range(1, n):
    if S[i].islower():
        if i == 1 or i == n - 1 or S[i] != 'C':
            print('WA')
            sys.exit()
        ct += 1
if ct == 1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import sys
S = input()
n = len(S)
for i in range(2, n-1):
    if S[i] == 'C':
        print('AC')
        sys.exit()
print('WA')

Submission status: Wrong Answer

Solution code:
s = input().strip()
list_s = list(s)


def judge(s):
    if s[0] != 'A':
        return False
    list_s[0] = 'a'
    count = 0
    for idx, c in enumerate(s):
        if 2 <= idx and idx <= len(s) - 3 and c == 'C':
            count += 1
            list_s[idx] = 'c'

    if count != 1:
        return False

    return ''.join(list_s) == s.lower()


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

Submission status: Wrong Answer

Solution code:
s = list(input())

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

frag = True
for i in range(2,len(s)-2):
  if s[i]=='C':
    frag = False
    del s[i]
    break

if frag:
  print("WA")
  exit()
  
if not "".join(s[1:]).islower():
  print("WA")
else:
  print("AC")

Submission status: Wrong Answer

Solution code:
from re import fullmatch
s = input()
print("AC" if fullmatch("A[a-z]+C[a-z]{2,}", s) is not None else "WA")

Submission status: Wrong Answer

Solution code:
S = input()

ans = "AC"

if S[0] != 'A' or S[2:-1].count('C') != 1 or S[-1] == 'C' or S[1] == 'C':
  ans = "WA"
for i in range(1, len(S)):
  if S[i].isupper == True and S[i] != '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 or S[-1] == 'C':
  ans = "WA"
for i in range(1, len(S)):
  if S[i].isupper == True and S[i] != '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 i in range(1, len(S)):
  if S[i].isupper == True and S[i] != 'C':
    ans = "WA"
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

ans = "AC"

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

Submission status: Wrong Answer

Solution code:
S = input()

ans = "AC"

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

Submission status: Wrong Answer

Solution code:
S = list(input())
A_check = []
C_check = []
lower_check = []

for i in range(len(S)):
    if S[i] == 'A':
        A_check.append(i)
    
    if S[i] == 'C':
        C_check.append(i)
    
    if S[i].islower():
        lower_check.append(i)
        

if len(A_check) != 1 or len(C_check) != 1 or len(lower_check) != (len(S) - 2):
    print('WA')
elif A_check[0] != '0' or C_check[0] == len(S) - 1 or C_check[0] < 2:
    print('WA')
else:
    print('AC')

Submission status: Wrong Answer

Solution code:
S = list(input())
A_check = []
C_check = []
lower_check = []

for i in range(len(S)):
    if S[i] == 'A':
        A_check.append(i)
    
    if S[i] == 'C':
        C_check.append(i)
    
    if S[i].islower():
        lower_check.append(i)
        

if len(A_check) != 1 or len(C_check) != 1 or len(lower_check) != (len(S) - 2):
    print('No')
elif A_check[0] != '0' or C_check[0] == len(S) - 1 or C_check[0] < 2:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
def main():
    S = input()

    if S[0] != 'A':
        print('WA')
        exit()
    S = 'a'+S[1:]
    if S.count('C', 2, len(S)-2) != 1:
        print('WA')
        exit()
    tmp = S[2:len(S)-2].find('C') + 2
    S = S[:tmp] + 'c' + S[tmp+1:]
    if S != S.lower():
        print('WA')
        exit()
    print('AC')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()
flag = True

if S[0] != "A":
  flag = False
elif S[2:-2].count("C") != 1:
  flag = False
else:
  tmp = ""
  for s in S:
    if s != "A" and s != "C":
      tmp += s
  if not tmp.islower() or len(tmp) != len(S) - 2:
    flag = False
print("AC" if flag else "WA")

Submission status: Wrong Answer

Solution code:
def isA(S):
    return S[0] == 'A'


def isC(S):
    count = 0
    for s in S[2:-2]:
        if s == 'C':
            count += 1

    return count == 1


def isAllLower(S):
    all_lower = True
    for s in S[1:]:
        if s == 'C':
            continue

        if s.isupper():
            all_lower = False

    return all_lower


S = input()

if isA(S) and isC(S) and isAllLower(S):
    print('AC')
else:
    print('WA')

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 s[2:-1]:
                if i!='C' and i.isupper()==True:
                    return 'WA'
            if s[1].isupper()==True and s[-1].isupper()==True:
                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 s[2:-1]:
                if i!='C' and i.isupper():
                    return 'WA'
            if s[1].isupper() and s[-1].isupper():
                return 'WA'
            return 'AC'
        else:
            return 'WA'
    print(main())
resolve()