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: Runtime Error

Solution code:
S = input()
count = 0
answer = "WA"

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

if count == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)

Submission status: Runtime Error

Solution code:
S = input()
count = 0
answer = "WA"

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

if count == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) > 1:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)

Submission status: Runtime Error

Solution code:
S = input()
count1 = 0
count2 = 0
answer = "WA"

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

if count1 == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) > 1:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)

Submission status: Runtime Error

Solution code:
S = input()
count1 = 0
count2 = 0
answer = "WA"

if S[0] == 'A':
    exception = [0]
    for i in range(2,len(S)-1):
        print(i)
        if S[i] == 'C':
            count1 += 1

if count1 == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) > 1:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)

Submission status: Runtime Error

Solution code:
s = input()
if s[0] == 'A':
    s = s[1:]
    if s[1:-2].cont('C') == 1:
        s.remove('C')
        if s == s.lower():
            print('AC')
            exit()
print('WA')

Submission status: Runtime Error

Solution code:
s=input()
l=[]
for i in range(2,len(s)-1):
    l.append(s[i])

k=s[1:s.index("C")]+s[s.index("C")+1:]

if s[0]=="A" and l.count("C")==1 and k==k.lower():
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
ans = "WA"
s = list(input())
if s[0] == "A":
  if s[2:-1].count("C") == 1:
    c = s[2:-1].index("C")
    if all([ list[i].islower() for i in range(1,len(s)) if i != c]):
      ans = "AC"
print(ans)

Submission status: Runtime Error

Solution code:
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
Slist = list(S)
L = len(S)
if S[0] == 'A' and 'C' in S[1:L-1] and Slist.count('C') == 1:
    Slist.remove('A', 'C')
    flag = True
    for s in Slist:
        if s.isupper():
            flag = False
    if flag:
        print('AC')
        exit()
print('WA')

Submission status: Runtime Error

Solution code:
s = input()

flg = "AC"

if s[0] != "A":
    flg ="WA"

if {"C"}  <= set(list(s)[2:-2]):
    pass
elif list(s)[2:-2].count("C") !=1
    flg = "WA" 
else:
    flg ="WA"

a = [chr(i) for i in range(97, 97+26)]
a.append("A")
a.append("C")
if  set(list(s)) <= set(a):
    pass
else:
    flg == "WA"
    
print(flg)

Submission status: Runtime Error

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("WA")
        exit()
    else:
        number = s.index("C")
else:
    print("WA")
    exit()

s.remove(0)
s.remove(number)

for j in s:
    c = j.lower()
    if c == j:
        continue
    else:
        print("WA")
        exit()
print("AC")

Submission status: Runtime Error

Solution code:
from collections import Counter
s=input()
a=len(s)
counter = Counter(s[2:a-2])
if s[0]!="A":
  print("WA")
  break
else:
  if counter("C")!=1:
    print("WA")
else:
  s.replace("A","a",1)
  s.replace("C","c",1)
  if s.islower()==False:
    print("WA")
  else:
    print("AC")

Submission status: Runtime Error

Solution code:

S = input()
alp = "abcdefghijklmnopqrstuvwxyz"
alpC = "abcdefghijklmnopqrstuvwxyzC"

ans = "AC"
if S[0] != "A":
    ans = "WA"
countC = 0
for i in S[2:-1]:
    if i == "C":
        countC += 1
    if not i in alpC:
        ans = "WA"
if countC != 1:
    ans = "WA"
if not S[1] in alp:
    ans = "WA"
if not S[-1] in alp:
    ans = "WA"
pirnt(ans)

Submission status: Runtime Error

Solution code:
S = input()
alp = "abcdefghijklmnopqrstuvwxyzC"
ans = "AC"
if S[0] != "A":
    ans = "WA"
flag = 0
for C in S[2:-1]:
    if C == "C":
        flag+=1
    if not c in alp:
        ans = "WA"
if flag != 1:
    ans = "WA"
if not S[1] in alp[:-1]:
    ans = "WA"
if not S[-1] in alp[:-1]:
    ans = "WA"

print(ans)

Submission status: Runtime Error

Solution code:
S = input()
alp = "abcdefghijklmnopqrstuvwxyzAC"
ans = "AC"
if S[0] != "A":
    ans = "WA"
flag = 0
for C in S[2:-1]:
    if C == "C":
        flag = 1
if flag == 0:
    ans = "WA"
for c in S:
    if alp.index(c) == -1:
        ans = "WA"
print(ans)

Submission status: Runtime Error

Solution code:
import re
S = list(input())
ans=0
cou=2
Ccou=0
A=S.count('A')
C=S.count('C')
jud = len(re.findall('[a-z]', S))
rep=len(S)-2
if S[0]=='A':
    ans=+1
rep=len(S)-2
for i in range(1,rep):
    if S[cou]=='C':
        Ccou=Ccou+1
    cou=cou+1
if Ccou == 1:
    ans=ans+1
if ans ==2 and A==1 and C==1 and jud==2:
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
S = input()
flag = True
if S[0] != 'A' or S[2:-2].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:
  flag = False
for i in range(2,len(S)-1):
  if s[i] != 'C' and s[i].lower() != s[i]:
    flag = False
print('AC' if flag else 'WA')

Submission status: Runtime Error

Solution code:
S = input()
flag = True
if S[0] != 'A' or S[2:-2].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:
  flag = False
for i in range(2,len(S)-1):
  if s != 'C' and s.lower() != s:
    flag = False
print('AC' if flag else 'WA')

Submission status: Runtime Error

Solution code:
S = input()
lead = S[0]
sub = S[2:-1]
C = sub.count('C')
if lead == 'A' and C == 1:
  for x,i in enumerate(1,len(S)):
    if i =='C' and ( 2<= x < len(S)-2):
      pass
    else:
      if i.islower():
        pass
      else:
        print('WA')
        exit()
  print('AC')
  exit()
else:
  print('WA')

Submission status: Runtime Error

Solution code:
input_a = input()

if input_a[0]　!= 'A':
    print("WA")
elif input_a.count('C')==0:
    print("WA")
elif input_a.count('C')>1:
    print("WA")
elif input_a.index('C') ==1:
    print("WA")
elif input_a.index('C') ==len(input_a)-1:
    print('WA')
elif input_a.count('C') ==1:
    if input_a.strip("A").strip('C').islower():
        print('AC')
    else:
        print('WA')

Submission status: Runtime Error

Solution code:
def resolve():
s = input()

f = True

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

ss = s[1:2] + s[3:-2] + s[-1:]
for i in range(len(ss)):
    if ss[i] < "a" or ss[i] > "z":
        f = False

if (s[2] == "C" and s[-2] == "C"):
    f = False
if (s[2] != "C" and s[-2] != "C"):
    f = False

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

Submission status: Runtime Error

Solution code:
def count_apper(str) :
    n = 0
    for c in str :
        if c.isuppper() :
            n = n+1
    return n

str = input()
if (str[0] == "A") && (str.count("C") == 1) && (2 < str.find("C") < len(str)-1) && (count_apper(str) == 2) :
                print("AC")
                exit()
print("WA")

Submission status: Runtime Error

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

array = S[3:-1]
if array.count("C")==1:
  array.remove("C")
  S = S[:3]+array+S[-1]
else:
  cnt += 1

if S[0]=="A":
  del S[0]
else:
  cnt += 1

s = "".join(S)
if s.islower == False:
  cnt += 1
print("AC" if cnt==0 else "WA")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input();b=a[1:].replace('C','');print('WAAC'[a[0]=="A"and1==a[2:-1].count("C")and b.lower()==b::2])

Submission status: Runtime Error

Solution code:
S=map(str,input().split())
if S[0]==A and S[2]==C:
    print("AC")
else:print("WA")

Submission status: Runtime Error

Solution code:
import re

string  = input()

m = re.match('A[a-z]+C[a-z]+',string)
if m.group() == string:
  
  print('AC')
else:
  print('WA')

Submission status: Runtime Error

Solution code:
# ABC104B - AcCepted
s = input().rstrip()
if (
    s[0] == "A"
    and s[2:-1].count("C") == 1
    and s.translate(str.maketrans({"A": None, "C": None}).islower()
):
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
S = input()
flag = True
if S[0] != 'A':
    flag = False
elif 'C' in S[2:len(S)-1]:
    s2 = S.replace('C', '', 1)
    if 'C' in s2:
        flag = False
if flag:
    s2 = s2.replace('A', '', 1)
    if s2.islower():
        flag = True
    else:
        flag = False
if flag:
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
s = input()
j = len(s)-2

if s.index('A')==0 and s[2:-1].count('C')==1:
    for i in s:
        j -= i.islower()

if j > 0:
    print('WA')
else:
    print('AC')

Submission status: Runtime Error

Solution code:
S = list(input("Enter :"))
ans = 0
C_location = 0
for i in range(2,len(S)-1):
  if S[i] == "C":
    ans += 1
	S[i].lower()
if all(S[0]=="A" and ans==1):
  S.swapcase(S[0])
  if S.islower():
	print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
S=input()
if(S[0]=="A" and S[2,-1].count("C")==1):
    cnt=0
    for i in S:
        if(97<=ord(i) and ord(i)<=122):
            cnt+=1
    if(cnt==2):
            print("AC")
    else :
            print("WA")
else :
    print("WA")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

if str.islower():
    flag=False

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=input()
s=abcdefghijklmnopqrstuvwxyz
c=0
if S[0]=="A" and "C" in S[2:len(S-1)]:
  i=S.find("C")
  S=S[1:i]+S[i+1:]
  if S.islower():
    c=1
print("AC" if c==1 else "WA")

Submission status: Runtime Error

Solution code:
S = input()
flag = True

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

for i in range(2, len(S)-1):
    if S[i] == 'C':
        break
else:
    flag = False

if flag:
    copy = []
    for j in range(1, len(S)):
        if j == i:
            continue
        copy += S[j]

if not(''.join(copy).islower()):
    flag = False

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

Submission status: Runtime Error

Solution code:
S = input()
flag = True

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

for i in range(2, len(S)-1):
    if S[i] == 'C':
        break
else:
    flag = False

if flag:
    copy = []
    for j in range(1, len(S)):
        if j == i:
            continue
        copy += S[j]

if not(''.join(copy).islower()):
    flag = False
    
print("AC" if flag else "WA")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = input()

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

if s[1].isupper() or s[-1].isupper():
    print("WA")
    exit()

count = 0
for i in s[2:]:
    if s[i].isupper():
        if s[i] == "C":
            count += 1
        else:
            print("WA")
            exit()
        

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
cnt = 0
for i in s[2:-1]:
    if i.isupper() and i!='C':
        ans ="WA"
    elif i=='C':
        cnt +=1

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
hoge=input()
no=0
if(hoge[0]=="A"):
  hoge.strip("A")
else:
  no=1

if(hoge[0].islower()):
  hoge.strip(hoge[0])
else:
  no=1

if(hoge[0]=="C"):
  hoge.strip("C")
else:
  no=1
  
if(hoge.islower()==false):
  no=1
  
if(no==0):
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

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

S = input()
re = len(list(filter( lambda x: x == 'C', a[2:-1])))
if re == 1:
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#B AcCepted
b = input()
a = list(b)
c=z = len(b)
d =""
if a[0] == "A":
    a[0] = "a"
    c = 10000
for i in range(2,c):
    if a[i] == "C":
        a[i]="c"
        c+=1
for i in a:
    d+=i
if d.islower() and c == 10001:
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<iostream>
using namespace std;
int main() {
    string s;
    cin >> s;
    //cout << s << endl;
    if (s[0] != 'A') {
        //cout << "1" << endl;
        cout << "WA" << endl;
        return 0;
    } else {
        int cnt = 0;
        int j;
        for (int i = 1; i < s.length(); i++) {
            if (i >= 2 && i <= s.length() - 2 && s[i] == 'C') { //front 3, end 2
                cnt++;
                j = i;
            }
            //cout << "i " << i << " cnt " << cnt << endl;
            if ((s[i] < 'a' || s[i] > 'z') && i != j) {
                //cout << "2" << endl;
                cout << "WA" << endl;
                return 0;
            }
        }
        if (cnt == 1) {
            cout << "AC" << endl;
        }
    }
}

Submission status: Runtime Error

Solution code:
s = input()

c1, c2, c3 = False, False, True

if s[0] == 'A':
    c1 = True

if s[2:-2].count('C') == 1:
    c2 = True

index = [i for i in range(1, len(s))]
for i, st in enumerate(s[1:]):
    if st == 'C':
        index.pop(i)

for idx in index:
    if s[idx].islower():
        continue
    else:
        c3 = False
        break

if c1 and c2 and c3:
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
S = input()

count = 0
tf = True
if S[0] != "A" or S[1] == "C" or S[-1] == "C":
    tf = False

for i in range(len(S)):
	if tf:
		break
    if i == 0:
        continue
    if S[i] == "C":
        count += 1
    elif not S[i].islower():
        tf = False

if tf and count == 1:
    print("AC")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
s = input()
t = list(s)
x = 0
y = 0
z = 0
r = []

if t[0] == "A":
  x = 1
  
r.append(t[1])
r.append(t[len(t) - 1])

for i in range(2,len(t) - 1): 
  if t[i] == "C":
    y += 1
  else:
    r.append(t[i])

for j in r:
  if j.isupper():
    z = 1

if x = 1 and y = 1 and z = 0:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
S = list(input())
if 'C' in S[2:-1]:
    Cj = True
else:
    Cj = False

if S[0] == 'A':
    Aj = True
else:
    Aj = false

Supper = [s for s in S if s.isupper()]
if Supper == ['A','C']:
    SupperJ = True
else:
    SupperJ = False

if(Cj and Aj and SupperJ):
        print("AC")
else:
    print("WA")

Submission status: Runtime Error

Solution code:
S = list(input())
if(S[0]=='A' and 'C' in S[2:-1]):
    del S[0]
    S[2:-1].remove('C')
    if [s for s in S if s.isupper()] == []:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
sa = s.index("A")
sc = s.index("C")
scr = s.rindex("C")
if sa == 1 and sc == scr and 2 <= sc <= len(s) - 3

Submission status: Runtime Error

Solution code:
S=input()
flag=0
if S[0]!='A':flag=1
if not 'C' in S[2:-1]:flag=2
else:
    S_=[i for i in S]
    S_.remove('A')
    S_.remove('C')
    for i in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':
        if i in S_:flag=i
if flag==0:
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
s = input()
if s[0] == "A":
  C = []
  for i in range(3, len(s)-2):
    if s[i] == "C":
      C.append(i)
  if len(C) != 1:
    print("WA")
    break 
  else:
    up = False
    for j in range(1,len(s)):
      if j == C[0]:
        pass
      elif s[j].isupper:
        up = True
    if up:
      print("WA")
    else:
      print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

void func(void){
  cout<<"WA";
  exit(0);
}

int main(void){
  string S;
  cin >> S;
  if(S[0]!='A'){
    func();
  }
  string abc="abcdefghijklmnopqrstuvwxyz";
  int ctC=0;
  int i;
  int index;
  for(i=2;i<S.size()-1;i++){
    if(S[i]=='C'){
      ctC++;
      index=i;
    }
    if(ctC!=1){
      func();
    }
  }
  int j;
  for(i=1;i<=S.size();i++){
    if(i==index)  continue;
    int flag=0;
    for(j=0;j<=abc.size();j++){
      if(abc[j]==S[i])  flag++;
    }
    if(flag==0){
      func();
    }
  }
  cout<<"AC";
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=input()
char_list=list(S)
if char_list[0]=="A":
	j=0
	del char_list[0]
	for i in range(1,len(char_list)-2):
		if char_list[i]=="C":
			del char_list[i]
			j=j+1
		
	if j==1:
		
		k=0	
		for i in range(0,len(char_list)):	
			if char_list[i].islower():
				k=k+1
			
		if k==len(char_list):
			print("AC")
		else:
			print("WA")			
	else:
		print("WA")		
else:
	print("WA")

Submission status: Runtime Error

Solution code:
s = input()
a = False
b = False
c = False
cnt = 0
k = 0

if s[0] == 'A':
	a = True

for c in range(s[2],s[-1]):
	if c == 'C':
		cnt += 1
if cnt == 1:
	b = True

for c in s:
	if c != 'A' or c != 'C':
		if c.islower() == True:
			k += 1

if k == s.length():
	c = True


if a == b == c == True:
	print("AC")
else:
	print("WC")

Submission status: Runtime Error

Solution code:

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    length = len(s)

    n = 1
    for check_char in s[1:]:
        #print(check_char)
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
                break
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    length = len(s)

    n = 1
    for check_char in s[1:]:
        print(check_char)
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
                break
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:
s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    length = len(s)

    n = 1
    for check_char in s[1:-1]:
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
                break
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:
"""
B - AcCepted
文字列 S が与えられます。S のそれぞれの文字は英大文字または英小文字です。 S
が次の条件すべてを満たすか判定してください。

S の先頭の文字は大文字の A である。
Sの先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1
個含まれる。
以上の A, C を除く S のすべての文字は小文字である。
"""

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    length = len(s)

    n = 1
    for check_char in s[1:-1]:
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:
"""
B - AcCepted
文字列 S が与えられます。S のそれぞれの文字は英大文字または英小文字です。 S
が次の条件すべてを満たすか判定してください。

S の先頭の文字は大文字の A である。
Sの先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1
個含まれる。
以上の A, C を除く S のすべての文字は小文字である。
"""

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    length = len(s)

    n = 1
    for check_char in s[2:-1]:
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:
"""
B - AcCepted
文字列 S が与えられます。S のそれぞれの文字は英大文字または英小文字です。 S
が次の条件すべてを満たすか判定してください。

S の先頭の文字は大文字の A である。
Sの先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1
個含まれる。
以上の A, C を除く S のすべての文字は小文字である。
"""

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    length = len(s)

    for n in range(1, length):
        check_char = s[n]
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
            
            cnt_C += 1

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:
"""
B - AcCepted
文字列 S が与えられます。S のそれぞれの文字は英大文字または英小文字です。 S
が次の条件すべてを満たすか判定してください。

S の先頭の文字は大文字の A である。
Sの先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1
個含まれる。
以上の A, C を除く S のすべての文字は小文字である。
"""

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    for n in range(1, len(s)):
        check_char = s[n]
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (len(s) - 1):
                ans = False
            
            cnt_C += 1

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:
"""
B - AcCepted
文字列 S が与えられます。S のそれぞれの文字は英大文字または英小文字です。 S
が次の条件すべてを満たすか判定してください。

S の先頭の文字は大文字の A である。
Sの先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1
個含まれる。
以上の A, C を除く S のすべての文字は小文字である。
"""

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    for n in range(1, len(s)):
        check_char = s[n]
    
        if (check_char.islower() is False
                and check_char == "C"
                and 2 <= n
                and n < (len(s) - 1)):
            cnt_C += 1
        else:
            ans = False
            break

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:
"""
B - AcCepted
文字列 S が与えられます。S のそれぞれの文字は英大文字または英小文字です。 S
が次の条件すべてを満たすか判定してください。

S の先頭の文字は大文字の A である。
Sの先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1
個含まれる。
以上の A, C を除く S のすべての文字は小文字である。
"""

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    for n in range(1, len(s)):
        check_char = s[n]
        
        if check_char.islower():
            pass
        else:
            if check_char == "C" and 2 <= n and n < (len(s) - 1):
                cnt_C += 1
            else:
                ans = False
                break

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:
"""
B - AcCepted
文字列 S が与えられます。S のそれぞれの文字は英大文字または英小文字です。 S
が次の条件すべてを満たすか判定してください。

S の先頭の文字は大文字の A である。
Sの先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1
個含まれる。
以上の A, C を除く S のすべての文字は小文字である。
"""

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    for n in range(1, len(s)):
        check_char = s[n]
        
        if check_char.islower():
            pass
        else:
            if check_char == "C" and 2 <= n and n < len(s) - 1:
                cnt_C += 1
            else:
                ans = False
                break

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

Solution code:
"""
B - AcCepted
文字列 S が与えられます。S のそれぞれの文字は英大文字または英小文字です。 S
が次の条件すべてを満たすか判定してください。

S の先頭の文字は大文字の A である。
Sの先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1
個含まれる。
以上の A, C を除く S のすべての文字は小文字である。
"""

s = input()

ans = True
if s[0] != "A":
    ans = False
    print("s[0] is not A")
else:
    cnt_C = 0
    for n in range(1, len(s)):
        check_char = s[n]
        
        if check_char.islower():
            pass
        else:
            if check_char == "C" and 2 <= n and n < len(s) - 1:
                cnt_C += 1
            else:
                ans = False
                break

if cnt_C != 1:
    ans = False

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A=list(input())
n=len(A)
if(A[0]!="A"):print("WA")
elif(A.count("C")!=1):print("WA")
elif(A.index("C")<2 or A.index("C")>n-2):print("WA")
else:
  A.pop(A.index("C"))
  A.pop(0)
  if(A.islower()):print("AC")
  else:print("WA")

Submission status: Runtime Error

Solution code:
S = input()
if S[0] == 'A' and S[2:-1].count('C')==1 and sum([for c in S c.isupper()])==2 :
  print('AC')
else:
  print('WA')

Submission status: Runtime Error

Solution code:
S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1 and sum([c.isupper for c in S]) == 2:
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
if s[0]=="A" and s.count("C")==1 and s[-1]!="C" and s[1]!="C" and all(x not in s for x  in"ABDEFGHIJKLMNOPQRSTUVWXYZ"):print "AC"
else:print "WA"

Submission status: Runtime Error

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

count_c = 0

if(s[0] == "A"):
    for i in range(1, len(s)):
        if(s[i]=="C" and i >= 2 and i <= len(s)-2):
            count_c += 1
        elif(i.isupper):
            print("WA")
            sys.exit()
            
        
    if(count_c != 1):
        print("WA")
    else:
        print("AC")
else:
    print("WA")