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()
flg = 1
if (s[0] != 'A'):
    flg = 0
cnt = 0
for i in s[2:-2]:
    if (i == 'C'): cnt+= 1
if (cnt != 1):
    flg = 0 

cap = 0
for i in s:
    if ('A' <= i <= 'Z'): cap += 1
if (cap != 2):
    flg = 0
if (flg): print("AC")
else: print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
import sys

S = str(input())
flag = 0
if S[0] != "A":
  print("WA")
else:
  S = S[1:]
  S = list(S)
  if S[0] != "C" and S[-1+len(S)] != "C":
    for i in range(1, -1+len(S)):
      if S[i] == "C":
        flag = flag + 1
  else:
    print("WA")
    sys.exit()
if flag != 1:
  print("WA")
  sys.exit()
else:
  S.remove('C')
  flag = 0
  for i in range(len(S)):
    if ord(S[i]) < 97:
      flag = flag + 1
if flag != 0:
  print("WA")
else:
  print("AC")

Submission status: Wrong Answer

Solution code:
S = input()

def word_check(S):
    if S[0] == "A":
        if S[1] not in ["A", "C"] and S[-1] not in ["A", "C"]:
            count_C = 0
            for s in S[2: -1]:
                if s == "C":
                    count_C += 1
            if count_C == 1:
                return "AC"
    return "WA"

print(word_check(S))

Submission status: Wrong Answer

Solution code:
S=input()
cnt=0
if S[0]!='A':
    print('WA')
else:
    for a in S[2:-1]:
        if a=='C':
            cnt+=1
    if cnt==1:print('AC')
    else:print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] != 'A':
  print('WA')
  exit()
s = s[1:]
ccnt = 0
for i in s[1:-1]:
  if i == 'C':
    ccnt += 1
  elif ord(i) < ord('a') or ord('z') < ord(i):
    print('WA')
    exit()
if ccnt != 1 or (ord(s[-1]) < ord('a') or ord('z') < ord(s[-1])):
  print('WA')
  exit()
else:
  print('AC')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import sys
s = str(input())

ch = s[0]

test_st = s[2:-1]
#print(test_st)
count = 0
if ch == 'A':
    for i in range(len(test_st)):
        if test_st[i] == 'C':
            count += 1
            if count == 1:
                test_stx = test_st[:i]+test_st[i+1:]
    if count == 1 and test_stx.islower():
        #print(test_stx,test_st)
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import sys
s = str(input())

ch = s[0]

test_st = s[2:-1]
#print(test_st)
count = 0
if ch == 'A':
    for i in range(len(test_st)):
        if test_st[i] == 'C':
            count += 1
            if count == 1:
                test_stx = test_st[:i]+test_st[i+1:]
    if count == 1 and test_stx.islower():
        print(test_stx,test_st)
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
import sys
s = str(input())

ch = s[0]

test_st = s[1:-1]
#print(test_st)
count = 0
if ch == 'A':
    for i in range(len(test_st)):
        if test_st[i] == 'C':
            count += 1
            if count == 1:
                test_stx = test_st[:i]+test_st[i+1:]
    if count == 1 and test_stx.islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import sys
s = str(input())

ch = s[0]+s[2]

test_st = s[1]+s[3:]
#print(test_st)
if ch == 'AC' and 'C' not in test_st:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == "A":
    if S.count("C") == 1:
        if S[2:-1].count("C") == 1:
            S = S.replace("A", "")
            S = S.replace("C", "")
            if S.islower():
                exit()

print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
import sys
S = list(input())
C_cnt,low,upp = 0,0,0
if S[0] != "A" or S[-1].isupper() or S[1] == 'C':
  print("WA")
  sys.exit()
for i in range(2,len(S)-1):
  if S[i] == "C":
    C_cnt += 1
  elif S[i].islower():
    low += 1
  elif S[i].isupper():
    upp += 1
if C_cnt == 1 and low == len(S)-4 and upp == 0:
  print("AC")
else :
  print("WA")

Submission status: Wrong Answer

Solution code:
import sys
S = list(input())
C_cnt,low,upp = 0,0,0
if S[0] != "A" or S[-1].isupper() or S[1] == 'C':
  print("WA")
  sys.exit()
for i in range(2,len(S)-1):
  if S[i] == "C":
    C_cnt += 1
  elif S[i].islower():
    low += 1
  elif S[i].isupper():
    upp += 1
if C_cnt == 1 and low == len(S)-3 and upp == 0:
  print("AC")
else :
  print("WA")

Submission status: Wrong Answer

Solution code:
import sys
S = list(input())
C_cnt,low,upp = 0,0,0
if S[0] != "A" or S[-1].isupper():
  print("WA")
  sys.exit()
for i in range(1,len(S)-1):
  if S[i] == "C":
    C_cnt += 1
  elif S[i].islower():
    low += 1
  elif S[i].isupper():
    upp += 1
if C_cnt == 1 and low == len(S)-3 and upp == 0:
  print("AC")
else :
  print("WA")

Submission status: Wrong Answer

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

def main():
    s = input()
    flag = False
    count = 0
    
    for i in range(len(s)):
        if (i == 0 and s[i] == "A"):
            flag = True
        
        if (2 <= i < len(s)-1):
            if (s[i] == "C"):
                count += 1
                
    if count != 1:
        flag = False

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S=input()
chk = [False, False, False]
if S[0]=="A":
    chk[0]=True

ind = 0
for i in range(2, len(S)):
    if S[i]=="C":
        chk[1]=True
        ind=i

chk[2]=True
for i in range(len(S)):
    if i==ind or i==0:
        continue
    if S[i].isupper():
        chk[2]=False

if chk[0] and chk[1] and chk[2]:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
ok = True
if s[0] != 'A': ok = False
c_counter = 0
p = -1
for i in range(2,n-2):
    if s[i] == 'C':
        c_counter += 1
        p = i
if c_counter != 1: ok = False
if ok == 0: 
    print('WA')
    exit()
for i in range(n):
    if i == 0 or i == p: continue
    if ord(s[i]) < 97: ok = False
if ok: print('AC')
else: print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
res = []
if s[0] == 'A':
  if s.find('C') >= 2 and s.find('C') < n-2:
    for i in s:
      if i == 'A' or i == 'C':
        res.append(i)
    if res == ['A', 'C']:
      print('AC')
    else:
      print('WA')
  else:
    print('WA')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
res = []
ans = 0
for i in s:
      if i == 'A' or i == 'C':
        res.append(i)
if s[0] == 'A':
  ans += 1
if s.find('C') >= 2 and s.find('C') < n-2:
  ans += 1
if res == ['A', 'C']:
  ans += 1
if ans == 3:
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
res = []
if s[0] == 'A':
  if s.find('C') >= 2 or s.find('C') < n-2:
    for i in s:
      if i == 'A' or i == 'C':
        res.append(i)
    if res == ['A', 'C']:
      print('AC')
    else:
      print('WA')
  else:
    print('WA')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    flag = True
    cnt = 0
    for i in range(len(S)):
        if i == 0:
            if S[i] != 'A':
                print("WA")
                return
        elif 2 <= i <= len(S)-1 and S[i] == 'C':
            cnt += 1
        elif S[i].isupper():
            print("WA")
            return
    if cnt == 1:
        print("AC")
    else:
        print("WA")
            
main()

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    flag = True
    cnt = 0
    for i in range(len(S)):
        if not(i == 0 and S[i] == 'A'):
            print("WA")
            return
        elif 2 <= i <= len(S)-1 and S[i] == 'C':
            cnt += 1
        elif S[i].isupper():
            print("WA")
            return
    if cnt == 1:
        print("AC")
    else:
        print("WA")
            
main()

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    flag = True
    if S[0] == 'A':
        cnt = 0
        pos = -1
        for i in range(2, len(S)-1):
            if S[i] == 'C':
                cnt += 1
                pos = i
            elif S[i].isupper():
                flag = False
        if flag and cnt == 1:
            print("AC")
            return
    print("WA")
    
main()

Submission status: Wrong Answer

Solution code:
s=input()

if s[0] == 'A' and 'C' in s[2:] and s.count('C') == 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 = list(s)
    S[0] ='a'
    for i in range(2,len(S)-2):
        if S[i] == 'C':
            S[i] = 'c'
    news = ''.join(S)
    if news.islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = list(input())
c = 0
if s[0] != 'A':
    print('WA')
else:
    s[0] = 'a'
    for i in range(2,len(s)-2):
        if s[i] == 'C':
            s[i] = 'c'
            c += 1
    news = ''.join(s)
    if news.islower() and c == 1:
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
s = list(input())
c = 0
if s[0] != 'A':
    print('WA')
else:
    s[0] = 'a'
    for i in range(2,len(s)-2):
        if s[i] == 'C':
            s[i] = 'c'
            c = 1
    news = ''.join(s)
    if news.islower() and c == 1:
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
ans="WA"
if s[0]=="A":
    if s[2:-1].count("C")==1:
        s=list(s)
        s.remove("A")
        s.remove("C")
        for j in range(len(s)):
            if ord(s[j])>ord("z"):
                break
        else:
            ans="AC"
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
if n==4:
    x=s[2]
else:
    x=s[2:n-2]
    
if s[0]!='A':
    print('WA')
    
elif x.count('C')!=1:
    print('WA')
    
else:
    i=x.find('C')
    s=list(s)
    s.pop(i+2)
    s.pop(0)
    s=''.join(s)
    if s.islower()==True:
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
if n==4:
    x=s[2]
else:
    x=s[2:n-2]
if s[0]!='A':
    print('WA')
elif x.count('C')!=1:
    print('WA')
else:
    i=s.find('C')
    s=list(s)
    s.pop(i)
    s.pop(0)
    s=''.join(s)
    if s.islower()==True:
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
x=s[2:n-2]
if s[0]!='A':
    print('WA')
elif x.count('C')!=1:
    print('WA')
else:
    i=s.find('C')
    s=list(s)
    s.pop(i)
    s.pop(0)
    s=''.join(s)
    if s.islower()==True:
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

f = False
ans = True
for i in range(1,n):
    if 'a' <= s[i] <= 'z': continue

    if not f and i>1 and i<n-1 and s[i] == 'C':
        f = True
        continue

    ans = False
    break

if ans and f:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
strs=input()
che=True
c=True
coun=False
for i in range(0,len(strs)) :
    if(i==0):
        c=True if strs[i]=="A" else False
    else :
        if(strs[i].isupper()):
            if( (not coun) and i>=2 and i<=len(strs)-3 and strs[i]=='C'):
                coun=True
            else:
                che=False
print("AC") if che and coun and c else print("WA")

Submission status: Wrong Answer

Solution code:

strs=input()
che=True
c=True
coun=False
for i in range(0,len(strs)) :
    if(i==0):
        c=True if strs[i]=="A" else False
    else :
        if(strs[i].isupper()):
            if( (not coun) and i>=2 and i<=len(strs)-3 and strs[i]=='C'):
                coun=True
            else:
                che=False
print("AC") if che and coun and c else print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
strs=input()
che=True
c=True
coun=True
for i in range(0,len(strs)-1) :
    if(i==0):
        c=True if strs[i]=="A" else False
    else :
        if(strs[i].isupper()):
            if(coun and i>=2 and i<=len(strs)-3 and strs[i]=='C'):
                coun=False
            else:
                che=False
print("AC") if che and (not coun) and c else print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

result = 'WA'
count = 0
tmp = ''
if s[0] == 'A':
    for i in range(2,len(s)-1):
        if s[i] == 'C':
            count += 1
        elif s[i] != 'A':
            tmp += s[i]

    if count == 1 and tmp.islower():
        result = 'AC'

print(result)

Submission status: Wrong Answer

Solution code:
#n=int(input())
#a,b=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
s=list(input())
chk=list("abcdefghijklmnopqrstuvwxyz")
flag="WA"
n=len(s)

if s[0]=="A":
    temp=s[2:n-1]
    if temp.count("C")==1:
        ind=temp.index("C")
        ind+=2
        del s[0]
        del s[ind-1]
        for st in s :
            if st in chk:
                pass
            else:
                break
            flag="AC"
print(flag)

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(1,len(s)):
    if s[i]=='C':
        continue
    if s[i].isupper() == True:
        print('WA')
        exit()
print('AC')

Submission status: Wrong Answer

Solution code:
s = list(input())
if s[0] != "A" or s[2:-2].count("C") >= 2 or s[2:-2].count("C") == 0:
  print("WA")
  exit()
else:
  s[0] = "a"
  for i in range(2,len(s)-2):
    if s[i] == "C":
      s[i] = "c"
  for i in s:
    if i != i.lower():
      print("WA")
      exit()
      
print("AC")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())
if s[0] != "A" or (s[2] != "C" and s[-1] != "C"):
  print("WA")
  exit()
elif s[0] == "A" and s[2] == "C":
  s.pop(0)
  s.pop(1)
  for i in s:
    if i != i.lower():
      print("WA")
      exit()
elif s[0] == "A" and s[-1] == "C":
  s.pop(0)
  s.pop(-1)
  for i in s:
    if i != i.lower():
      print("WA")
      exit()
      
print("AC")

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] != "A" or (s[2] != "C" and s[-1] != "C"):
  print("WA")
  exit()
elif s[0] == "A" and s[2] == "C":
  s = list(s)
  s.pop(0)
  s.pop(1)
  for i in s:
    if i != i.lower():
      print("WA")
      exit()
elif s[0] == "A" and s[-1] == "C" and s[2] != "C":
  s = list(s)
  s.pop(0)
  s.pop(-1)
  for i in s:
    if i != i.lower():
      print("WA")
      exit()
      
print("AC")

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] != "A" or (s[2] != "C" and s[-1] != "C"):
  print("WA")
  exit()
elif s[0] == "A" and s[2] == "C":
  s = list(s)
  s.pop(0)
  s.pop(1)
  for i in s:
    if i != i.lower():
      print("WA")
      exit()
elif s[0] == "A" and s[-1] == "C":
  s = list(s)
  s.pop(0)
  s.pop(-1)
  for i in s:
    if i != i.lower():
      print("WA")
      exit()
      
print("AC")

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] != "A" or (s[2] != "C" and s[-1] != "C"):
  print("WA")
elif s[0] == "A" and s[2] == "C":
  s = list(s)
  s.pop(0)
  s.pop(1)
  for i in s:
    if i != i.lower():
      print("WA")
      exit()
elif s[0] == "A" and s[-1] == "C":
  s = list(s)
  s.pop(0)
  s.pop(-1)
  for i in s:
    if i != i.lower():
      print("WA")
      exit()
      
print("AC")

Submission status: Wrong Answer

Solution code:
s = input()

if s[0] != "A" or (s[2] != "C" and s[-1] != "C"):
  print("WA")
elif s[0] == "A" and s[2] == "C":
  s = list(s)
  s.pop(0)
  s.pop(1)
  for i in range(len(s)):
    if s[i] != s[i].lower():
      print("WA")
      exit()
elif s[0] == "A" and s[-1] == "C":
  s = list(s)
  s.pop(0)
  s.pop(-1)
  for i in range(len(s)):
    if s[i] != s[i].lower():
      print("WA")
      exit()
      
print("AC")

Submission status: Wrong Answer

Solution code:
s = input()

judge = True
if s[0] != "A":
  judge = False
cnt = 0
cnt += (s[2] == "C") + (s[-2] == "C")
if cnt != 1:
  judge = False
for i, c in enumerate(s):
  if i == 0 and c == "A": continue
  if (i == 2 or i == len(s)-2) and c == "C": continue
  if c.isupper(): judge = False
print("AC" if judge else "WA")

Submission status: Wrong Answer

Solution code:
s = input()

judge = True
if s[0] != "A":
  judge = False
cnt = 0
cnt += (s[2] == "C") + (s[-2] == "C")
if cnt != 1:
  judge = False
for i, c in enumerate(s):
  if i == 0 and c == "A": continue
  if (i == 2 or i == len(s)-3) and c == "C": continue
  if c.isupper(): judge = False
print("AC" if judge else "WA")

Submission status: Wrong Answer

Solution code:
import re
s = input()

s1 = re.fullmatch(r"A([a-z])C([a-z]*)", s)
s2 = re.fullmatch(r"A([a-z])*C([a-z])", s)

if len(s) == 4:
    if s1 == None:
        print("WA")
    else:
        print("AC")
else:
    if s1 == None and s2 == None:
        print("WA")
    elif s1 != None and s2 != None:
        print("WA")
    else:
        print("AC")

Submission status: Wrong Answer

Solution code:
import re
s = input()

s1 = re.fullmatch(r"A([a-z])C([a-z]*)", s)
s2 = re.fullmatch(r"A([a-z])*C([a-z])", s)

if s1 == None and s2 == None:
    print("WA")
elif s1 != None and s2 != None:
    print("WA")
else:
    print("AC")

Submission status: Wrong Answer

Solution code:
s = list(input())
s1 = [i for i in s]
for j in range(len(s)):
    s1[j] = str.lower(s1[j])
s1[0] = "A"
s1[2] = "C"
if s == s1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
s1 = [i for i in s]
s1[0] = "A"
s1[2] = "C"
for j in range(len(s)):
    if j != 0 or j != 2:
        s1[j] = str.lower(s1[j])
if s == s1:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s=list(input())
flag=1
if s[0]!='A':
    flag=0
if 'C' not in s[2:-2]:
    flag=0
if s.count('C')!=1:
    flag=0
if 'A' in s:
    s.remove('A')
if 'C' in s:
    s.remove('C')
s=''.join(s)
if s.islower():
    pass
else:
    flag=0
if flag==1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
ls=len(s)
c1=s[0]=="A"
c2=list(s[2:ls-1]).count("S")==1
if c1 and c2:
  s=s.replace("A", "a")
  s=s.replace("S", "s")
  if s.islower():
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(input())
s1=s[2:-1]
f=True
if s[0]!='A':
	f=False
elif 'C' not in s1:
	f=False
else:
	s1.remove('C')
	if str(s1).islower():
		pass
	else:
		f=False
if f:
	print('AC')
else:
	print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
flag = 1
if S[0] != "A":
	flag = 0
elif S[2:-2].count("C") != 1:
	flag = 0
else:
	idx = S[2:-2].find("C")
	S2 = S[1:idx+2]+ S[idx + 3:]
	if not S2.islower():
		flag = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
if S[0].isupper() and S[2:-1].count("C") == 1 and S[1].islower and S[-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 and S[1].islower():
    for s in S[2:]:
        if s!="C":
            if s.islower():
                print("AC")
                exit()
print("WA")

Submission status: Wrong Answer

Solution code:
S=input()
if S[0]=="A" and S[1:-1].count("C")==1:
    for s in S[1:]:
        if s!="C":
            if s.islower():
                print("AC")
                exit()
print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ac = True
c = True
if s[0] != "A":
  ac = False
if not ord("a") <= ord(s[1]) <= ord("z"):
  ac = False
if not ord("a") <= ord(s[-1]) <= ord("z"):
  ac = False
for i in range(2, len(s)-1):
  if s[i] == "C":
    if c:
      c = False
    else:
      ac = False
  else:
    if not ord("a") <= ord(s[i]) <= ord("z"):
      ac = False
if c:
  ac == False
if ac:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
ac = True
c = True
if s[0] != "A":
  ac = False
if not ord("a") <= ord(s[1]) <= ord("z"):
  ac = False
if not ord("a") <= ord(s[-1]) <= ord("z"):
  ac = False
for i in range(2, len(s)-1):
  if s[i] == "C":
    if c:
      c = False
    else:
      ac = False
  else:
    if not ord("a") <= ord(s[i]) <= ord("z"):
      ac = False
if ac:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
count=0
if S[0]=="A":
  for i in range(2,max([len(S)-2,3]),1):
    if S[i]=="C":
      count+=1
      idx=i
  if count==1:
    s=S[1:idx]+S[idx+1:]
    if s==s.lower():
      print("AC")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

S = list(input())

print("AC" if (S[0] == 'A' and len(list(filter(lambda x : x == 'C', S[2:]))) == 1 and S[1] != 'C' and S[-1] != 'C') else "WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
a_flag = 0
c_flag = 0
c_count = 0
flag2 = 0
if S[0] == 'A':
    a_flag += 1
for i in range(2, len(S)-1):
    if S[i] == 'C' and i == 2:
        c_flag += 1
        c_count += 1
    elif S[i] == 'C':
        c_flag += 1
        c_count += 1
    elif S[i].isupper():
        flag2 += 1

if S[len(S) - 1].isupper():
    flag2 += 1
if a_flag == 1 and c_flag == 1 and flag2 == 0 and c_count == 1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
a_flag = 0
c_flag = 0
flag2 = 0
if S[0] == 'A':
    a_flag += 1
for i in range(2, len(S)-1):
    if S[i] == 'C' and i == 2:
        c_flag += 1
    elif S[i] == 'C':
        c_flag += 1
    elif S[i].isupper():
        flag2 += 1

if S[len(S) - 1].isupper():
    flag2 += 1
if a_flag == 1 and c_flag == 1 and flag2 == 0:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
flag = 0
flag2 = 0
if S[0] == 'A':
    flag += 1
    for i in range(2, len(S)-1):
        if S[i] == 'C' and i == 2:
            flag += 1
        elif S[i].isupper():
            flag2 += 1

if S[len(S) - 1].isupper():
    flag2 += 1
if flag == 2 and flag2 == 0:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
flag = 0
flag2 = 0
if S[0] == 'A':
    flag += 1
for i in range(2, len(S)-1):
    if S[i] == 'C' and i == 2:
        flag += 1
    elif S[i] == 'C':
        flag2 += 1
    elif S[i].isupper():
        flag2 += 1

if S[len(S) - 1].isupper():
    flag2 += 1
if flag == 2 and flag2 == 0:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())
flag = 0
flag2 = 0
if S[0] == 'A':
    flag += 1
for i in range(2, len(S)-1):
    if S[i] == 'C':
        flag += 1
    elif S[i].isupper():
        flag2 += 1

if S[len(S) - 1].isupper():
    flag2 += 1
if flag == 2 and flag2 == 0:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())
ans = 0
if s[0] == 'A':
    for i in range(3, len(s)-1):
        if s[i] == 'C':
            ans += 1
        if s[i].isupper():
            print('WA')
            exit()
        if s[1].isupper():
          print('WA')
          exit()
    
    if ans == 1:
        print('AC')
        exit()
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = str(input())
ans = 0
if s[0] == 'A':
    for i in range(3, len(s)-1):
        if s[i] == 'C':
            ans += 1
        if s[i].isupper():
            print('WA')
            exit()
    
    if ans == 1:
        print('AC')
        exit()
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]!="A":
    print("WA")
elif "C" not in s[2:len(s)-1] or s[2:len(s)-1].count("C")!=1:
    print("WA")
elif s[1]==str.upper(s[1]):
    print("WA")
elif s[2:].strip("C")==str.lower(s[2:].strip("C")):
    print("AC")
else:
    print("WA")