Problem:


Score : 200 points

Problem Statement

You are given a string S. Each character of S is uppercase or lowercase English letter.
Determine if S satisfies all of the following conditions:

The initial character of S is an uppercase A.

There is exactly one occurrence of C between the third character from the beginning and the second to last character (inclusive).

All letters except the A and C mentioned above are lowercase.

Constraints

4 ≤ |S| ≤ 10 (|S| is the length of the string S.)

Each character of S is uppercase or lowercase English letter.

Input

Input is given from Standard Input in the following format:

S

Output

If S satisfies all of the conditions in the problem statement, print AC; otherwise, print WA.

Sample Input 1

AtCoder

Sample Output 1

AC

The first letter is A, the third letter is C and the remaining letters are all lowercase, so all the conditions are satisfied.

Sample Input 2

ACoder

Sample Output 2

WA

The second letter should not be C.

Sample Input 3

AcycliC

Sample Output 3

WA

The last letter should not be C, either.

Sample Input 4

AtCoCo

Sample Output 4

WA

There should not be two or more occurrences of C.

Sample Input 5

Atcoder

Sample Output 5

WA

The number of C should not be zero, either.



Sample input:
AtCoder


Sample output:
AC

Submission status: Wrong Answer

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):  # リストに重複した要素があるか判定（要素にリストがある場合）
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


s = list(map(str, input()))
# print(s)
for i in range(-1, 2):
    #print(i, s[i])
    if s[i] == 'C':
        print('WA')
        exit()

for c in s[1:]:
    if c == 'A':
        print('WA')
        exit()


def cnt(s):
    a = 0
    for i in range(2, len(s)-1):
        # print(i, s[i])
        if s[i] == 'C':
            a += 1
    if a == 1:
        return True
    else:
        return False


def remove(s):
    s.remove('A')
    s.remove('C')
    return s


def func(s):
    if s[0] == 'A':
        pass
    else:
        return False
    if cnt(s):
        pass
    else:
        return False
    return True


if func(s):
    s = remove(s)
    aa = 0
    for i in range(len(s)):
        if s[i].islower:
            aa += 1
    if aa == len(s):
        print('AC')
        exit()
print('WA')

Submission status: Wrong Answer

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):  # リストに重複した要素があるか判定（要素にリストがある場合）
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


s = list(map(str, input()))
# print(s)
for i in range(-1, 2):
    #print(i, s[i])
    if s[i] == 'C':
        print('WA')
        exit()


def cnt(s):
    a = 0
    for i in range(2, len(s)-1):
        # print(i, s[i])
        if s[i] == 'C':
            a += 1
    if a == 1:
        return True
    else:
        return False


def remove(s):
    s.remove('A')
    s.remove('C')
    return s


def func(s):
    if s[0] == 'A':
        pass
    else:
        return False
    if cnt(s):
        pass
    else:
        return False
    return True


if func(s):
    s = remove(s)
    aa = 0
    for i in range(len(s)):
        if s[i].islower:
            aa += 1
    if aa == len(s):
        print('AC')
        exit()
print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
flg1 = flg2 = flg3 = True
if not S[0] == 'A':
    flg1 = False
if not S.count('C', 2, -2) == 1:
    flg2 = False
j = len(S) + 1
for i in range(len(S)):
    if S[i] == 'C':
        j = i
for i in range(len(S)):
    if i == 0 or i == j:
        continue
    else:
        if S[i].islower() == False:
            flg3 = False
flg = flg1 * flg2 * flg3
print('AC' if flg else 'WA')

Submission status: Wrong Answer

Solution code:
#ABC104

s = input()

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

Submission status: Wrong Answer

Solution code:
s = list(input())

a = False
c = False
small = False
for i in range(len(s)):
    if i == 0 and s[i] == "A":
        a = True
    if a == True and i >= 2 and i < len(s) - 1 and s[i] == "C" and c == False:
        c = True
    elif s[i] >= "a" and s[i] <= "z":
        small = True
    else:
        small = False
        break

if a == True and c == True and small == True:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

LETTERS_A = "BCDEFGHIJKLMNOPQRSTUVWXYZ"
LETTERS_C = "ABDEFGHIJKLMNOPQRSTUVWXYZ"
count = 0
is_ok = None
c1, c2 = False, False
for i in range(len(s)):
    if i == 0:
        c1 = (s[i] == "A")
        if s[i] in LETTERS_A:
            is_ok = False
    if (2 <= i) and (i <= len(s)-2):
        if s[i] == "C":
            count += 1
            c2 = (count == 1)
        if s[i] in LETTERS_C:
            is_ok = False
        
if c1 and c2 and (is_ok is not False):
    is_ok = True
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
j= 2
count = 0
if not s[0] == 'A':
    print('WA')
    exit()

for i in s[2:-1]:
    if i == 'C':
        count += 1
        tmp = j
    j += 1
if not count == 1:
    print('WA')
    exit()

del s[0]
del s[tmp-1]
s = ''.join(s)

if s.isupper():
    print('WA')
    exit()

print('AC')

Submission status: Wrong Answer

Solution code:
s = list(input())
j= 0
count = 0
if not s[0] == 'A':
    print('WA')
    exit()

for i in s[2:-1]:
    if i == 'C':
        count += 1
        tmp = j
    j += 1
if not count == 1:
    print('WA')
    exit()

del s[0]
del s[tmp-1]
s = ''.join(s)
if s.isupper():
    print('WA')
    exit()

print('AC')

Submission status: Wrong Answer

Solution code:
S = input()
s = list(S)
j= 0
count = 0
if not s[0] == 'A':
    print('WA')
    exit()

for i in s[2:-1]:
    if i == 'C':
        count += 1
        tmp = j
    j += 1
if not count == 1:
    print('WA')
    exit()

del s[0]
del s[tmp-1]

if S.isupper():
    print('WA')
    exit()

print('AC')

Submission status: Wrong Answer

Solution code:
# coding: utf-8

def isValid(target:str):
    if target[0] != "A":
        return False
    if target.count("A") != 1:
        return False
    if target.count("C") != 1:
        return False
    if target[2:len(target)-1].count("C") != 1:
        return False
    if len([i for i in target if i != "A" and i != "C" and (i <= "a" or i >= "z") ]) != 0:
        return False
    return True


if isValid(input().rstrip()):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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


S_list=list(input().strip())
sub_S = S_list[2:-1]

if S_list[0] != "A"  or  sub_S.count("C") != 1:
    print("WA")
    sys.exit()

check_S = S_list[:]
del check_S[ 2 + sub_S.index("C") ]
del check_S[0]

if ("".join(check_S)).islower:
    print("AC")
else:
    print("WA")
    sys.exit()

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] != 'A':
    print('WA')
    exit(0)
if s[2:-1].count('C') != 1:
    print('WA')
    exit(0)
for i in range(1,len(s)):
    if i >= 2 and i < len(s)-1 and s[i] == 'C':
        continue
    if not (ord('a') <= ord(s[i]) and ord(s[i]) <= ord('z')):
        print(i)
        print('WA')
        exit(0)
print('AC')

Submission status: Wrong Answer

Solution code:
s = input()
flag = 0
C_count = 0
flag_2 = 0
mode = 0
k = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
if len(s) == 4:
  mode = 1
  if s[0] == "A":
    flag += 1
  if s[2] == "C":
    flag += 1
  if s[1] in k and s[3] in k:
    flag += 1
else:
  mode = 2
  if s[0] == "A":
    flag += 1
  for i in range(2,len(s)-1):
    if s[i] == "C":
      C_count += 1
      continue
    else:
      if s[i] in k:
        continue
      else:
        flag_2 += 1
        break
  if flag_2 == 0 and C_count == 1:
    flag += 1
if mode == 1:
  if flag == 3:
    print("AC")
  else:
    print("WA")
else:
  if flag == 2:
    print("AC")
  else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
flag = 0
C_count = 0
flag_2 = 0
k = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
if len(s) == 4:
  if s[0] == "A":
    flag += 1
  if s[2] == "C":
    if s[1] in k and s[3] in k:
      flag += 1
else:
  if s[0] == "A":
    flag += 1
  for i in range(1,len(s)):
    if s[i] == "C":
      C_count += 1
      continue
    else:
      if s[i] in k:
        continue
      else:
        flag_2 += 1
        break
  if flag_2 == 0 and C_count == 1:
    flag += 1
if flag == 2:
  print("AC")

Submission status: Wrong Answer

Solution code:
s = list(input())

#chr(ord('a')

ans = True
if s[0] != "A":
    print("WA")
elif s[2:-2].count("C") != 1:
    print("WA")
else:
    s.remove("A")
    s.remove("C")
    if not str(s).islower():
        print("WA")
    else:
        print("AC")

Submission status: Wrong Answer

Solution code:

a=list(str(input()))

if a[0]!='A':
            print('WA')
            exit()
else:
            b=a[2:-1].count('C')
            if b!=1:
                        print('WA')
                        exit()
            else:
                        for i in range(1,len(a)):
                                    if a[i]=='C':
                                                if "".join(a[1:i]).isupper() or "".join(a[i:]).isupper():
                                                            print('WA')
                                                            exit()
                                                            
print('AC')

Submission status: Wrong Answer

Solution code:

a=list(str(input()))

if a[0]!='A':
            print('WA')
            exit()
else:
            b=a[2:-1].count('C')
            if b!=1:
                        print('WA')
                        exit()
            else:
                        for i in range(1,len(a)):
                                    if a[i]=='C':
                                                if "".join(a[1:i]).isupper() and "".join(a[i:]).isupper():
                                                            print('WA')
                                                            exit()
                                                            
print('AC')

Submission status: Wrong Answer

Solution code:
S=input()
print('WAAC'[S[0]=='A' and S.count('C',2,-2)==1 and len(list(filter(lambda x: x.isupper(),list(S))))==2::2])

Submission status: Wrong Answer

Solution code:
s = list(input())
if s[0].isupper() and s[2:-1].count('C') == 1:
    s.pop(0)
    s.pop(s.index('C'))
    cnt = 0
    for si in s:
        if si.islower():
            cnt += 1
    if cnt == len(s):
        print('AC')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S=input()

abc=set([chr(ord('a')+i) for i in range(26)])

if S[0]=='A':
    cnt=0
    for s in S[2:-1]:
        if s=='C':
            cnt+=1
    if cnt==1:
        for s in S[1:2]:
            if s not in abc:
                print('WA')
                exit()
        for s in S[-2:]:
            if s not in abc:
                print('WA')
                exit()
        print('AC')
        exit()

print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
OK = False
if S[0] == 'A' and S[2] == 'C':
    if S[1].islower() and S[3:].islower():
        OK = True
# print(S[3:], S[3:].islower())
if S[0] == 'A' and S[-2] == 'C':
    if S[1:-2].islower() and S[-1].islower():
        OK = True

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

Submission status: Wrong Answer

Solution code:
S = input()
OK = False
if S[0] == 'A' and S[2] == 'C':
    if S[1].islower() and S[3:].islower():
        OK = True
# print(S[3:], S[3:].islower())
if S[0] == 'A' and S[-2] == 'C':
    if S[1:-3].islower() and S[-1].islower():
        OK = True

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

Submission status: Wrong Answer

Solution code:
S = input()
OK = False
if S[0] == 'A' and S[2] == 'C':
    if S[1].islower() and S[3:].islower():
        OK = True
# print(S[3:], S[3:].islower())
if S[0] == 'A' and S[-3] == 'C':
    if S[1:-3].islower() and S[-2:].islower():
        OK = True

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

Submission status: Wrong Answer

Solution code:
S = input()
flag = 0
flag_of_flag = 0
now = 0
komoji = 0
k = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
if S[0] == "A":
  flag += 1
for i in range(2,len(S)-1):
  if S[i] == "C":
    now += 1
  elif S[i] in k:
    komoji += 1
if now == 1:
  flag += 1
if S[1] in k and S[len(S)-2] in k and S[len(S)-1] in k:
  komoji += 3
if flag == 2:
  if komoji == len(S)-2:
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
flag = 0
flag_of_flag = 0
now = 0
komoji = 0
k = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
if S[0] == "A":
  flag += 1
for i in range(2,len(S)-2):
  if S[i] == "C":
    now += 1
  elif S[i] in k:
    komoji += 1
if now == 1:
  flag += 1
if S[1] in k and S[len(S)-2] in k and S[len(S)-1] in k:
  komoji += 3
if flag == 2:
  if komoji == len(S)-2:
    print("AC")
  else:
    print("WA")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = list(input())
if (s[0] == "A") and (s[2:-2].count("C")==1):
    s[0] = "a"
    s[s[2:-2].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
if (s[0] == "A") and (s[2:-2].count("C")==1):
    print("aa")
    s[0] = "a"
    s[s[2:-2].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
#(s[2:-2])
if (s[0] == "A") and (s[2:-2].count("C")):
    s[0] = "a"
    s[s[2:-2].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
cnt = 0
if s[0] == 'A' and s[1].islower() and s[-1].islower():
    for i in range(len(s)-4):
        if s[i+2] == 'C':
            cnt += 1
        elif s[i+2].islower():
            continue
        else:
            cnt = None
            break
if cnt == 1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
s = list(input())
if s[0] == 'A' and s[2] == 'C':
    del s[2]
    del s[0]
    s = ''.join(s)
    if s.islower():
        print("AC")
        sys.exit()
print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
cnt = 0
for s in S[2:-1]:
    if s == 'C':
        cnt += 1
    elif s.isupper():
        print('WA')
        break
else:
    if S[0] == 'A' and cnt == 1:
        print('AC')
    else:
        print('WA')

Submission status: Wrong Answer

Solution code:
S=input()
ans = "WA"
if S[0] == "A" and ("a" <= S[1] <= "z") and ("a" <= S[-1] <= "z"):
  s0 = S[2:-1]
  f = 0
  for i in range(len(s0)):
    if s0[i] == "C":
      if f != 0:
        ans = "NG"
      else:
        ans = "AC"
        f = 1

print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
ans = "WA"
if S[0] == "A" and ("a" <= S[1] <= "z") and ("a" <= S[-1] <= "z"):
  s0 = S[2:-2]
  for i in range(len(s0)):
    if s0[i] == "C":
      if ans == "AC":
        ans = "NG"
      else:
        ans = "AC"

print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
ans = "WA"
if S[0] == "A" and ("a" <= S[1] <= "z") and ("a" <= S[-1] <= "z"):
  s0 = S[2:-2]
  if "C" in s0:
    ans = "AC"
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == 'A' and S[2] == 'C' and S[-2] == 'C':
    S_list = list(S)
    del S_list[0]
    del S_list[1]
    del S_list[-2]
    new_S = ''.join(S_list)
    small_s = new_S.lower()
    if small_s == new_S:
        print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    S = input()

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
count=0
if S[0]=="A":
	if S[2:-2].count("C")==1 and S[1]!="C"and S[-1]!="C":
		P=S.replace("A","")
		Q=P.replace("C","")
		if Q.islower():
			print("AC")
		else:
			print("WA")
	else:
		print("WA")
else:
	print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
t = 0

for i in range(0, len(s)):
  if(s[i].isupper()):
    t = t + 1
  else:
    pass

try:
  if 2 <= s.index('C') and s.index('C') <= len(s)-2:
    if t == 2:
      print('AC')
    else:
      print('WA')
  else:
    print('WA')

except ValueError:
  print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
t = 0

for i in range(0, len(s)):
  if(s[i].isupper()):
    t = t + 1
  else:
    pass

try:
  if 2 <= s.index('C') and s.index('C') <=len(s)-1:
    if t == 2:
      print('AC')
    else:
      print('WA')
  else:
    print('WA')

except ValueError:
  print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
t = 0

for i in range(0, len(s)):
  if(s[i].isupper()):
    t = t + 1
  else:
    pass

try:
  if 2 <= s.index('C') and s.index('C') <=len(s)-1:
    if t == 2:
      print('AC')
  else:
    print('WA')

except ValueError:
  print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
flag1 = True
flag2 = True
flag3 = True

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

count = 0
for i in range(2, len(s)-1):
  if s[i] == 'C':
    count+=1
if count != 1:
  flag2 = False
  
for i in range(1, len(s)):
  if s[i] != 'A' or s[i] !='C':
    if not s[i].islower():
      flag = False
      break
if flag1 and flag2 and flag3:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
flag1 = True
flag2 = True
flag3 = True

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

count = 0
for i in range(2, len(s)-1):
  if s[i] == 'C':
    count+=1
if count != 1:
  flag2 = False
  
for i in range(len(s)):
  if s[i] != 'A' or s[i] !='C':
    if not s[i].islower():
      flag = False
      break
if flag1 and flag2 and flag3:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S='AtCoder'
if S[0]=='A' and S[2:-1].count('C')==1:
    s=list(S)
    s.remove('C')
    S=''.join(s)
    if S.istitle()==True:
        print('AC')
        exit()
print('WA')

Submission status: Wrong Answer

Solution code:
word=input()
cflg=True
if word[0]!='A':
  cflg=False
  print(cflg)
elif word[2:-2].count('C')!=1:
  cflg=False
cnt=0
for l in word[1:]:
  if l.isupper():
    cnt+=1
else:
  if cnt!=1:
    cflg=False
  
if cflg:
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
word=input()
cflg=True
if word[0]!='A':
  cflg=False
  print(cflg)
elif word[2:-1].count('C')!=1:
  cflg=False
cnt=0
for l in word[1:]:
  if l.isupper():
    cnt+=1
else:
  if cnt!=1:
    cflg=False
  
if cflg:
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
word=input()
cflg=True
if word[0]!='A':
  cflg=False
  print(cflg)
elif word[2:-1].count('C')!=1:
  cflg=False
cnt=0
for l in word[1:]:
  if l.isupper():
    cnt+=1
else:
  if cnt!=1:
    cflg=False
  
if cflg:
  print('AC')
else:
  print('WC')

Submission status: Wrong Answer

Solution code:
word=input()
cflg=True
if word[0]!='A':
  cflg=False
  print(cflg)
elif word[2:-2].count('C')!=1:
  cflg=False
cnt=0
for l in word[1:]:
  if l.isupper():
    cnt+=1
else:
  if cnt!=1:
    cflg=False
  
if cflg:
  print('AC')
else:
  print('WC')

Submission status: Wrong Answer

Solution code:
word=input()
cflg=True
if word[0]!='A':
  cflg=False
elif word[2:-2].count('C')!=1:
  cflg=False
cnt=0
for l in word[1:-1]:
  if l.isupper():
    cnt+=1
else:
  if cnt!=1:
    cflg=False
  
if cflg:
  print('AC')
else:
  print('WC')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 

l = list(input())
#print(l)
m = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
#print(m)

a = 0
for i in range(2,len(l)-1):
    if l[i] == 'C':
        a += 1
if a == 1 and l[0] == 'A':
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
# 

l = list(input())
#print(l)
m = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
#print(m)

a = 0
for i in range(2,len(l)-1):
    if l[i] in m:
        a += 1
if a == 1 and l[0] == 'A':
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
inp = input()

#print(inp.startswith("A"))
#print(inp[2:len(inp)-1].count("C") ==  1)
#print(inp[1:inp.find("C", 0, len(inp) - 1)] == inp[1:inp.find("C", 0, len(inp) - 1)].lower())
#print(inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)] == inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)].lower())

if inp.startswith("A") and inp[2:len(inp)-2].count("C") ==  1 and inp[1:inp.find("C", 0, len(inp) - 1)] == inp[1:inp.find("C", 0, len(inp) - 1)].lower() and inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)] == inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)].lower():
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
inp = input()

#print(inp.startswith("A"))
#print(inp[2:len(inp)-2].count("C") ==  1)
#print(inp[1:inp.find("C", 0, len(inp) - 1)] == inp[1:inp.find("C", 0, len(inp) - 1)].lower())
#print(inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)] == inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)].lower())

if inp.startswith("A") and inp[2:len(inp)-2].count("C") ==  1 and inp[1:inp.find("C", 0, len(inp) - 1)] == inp[1:inp.find("C", 0, len(inp) - 1)].lower() and inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)] == inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)].lower():
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s=str(input())
f=s[0]=="A" and s[2:-1].count("C")==1
g=(s[:2]+s[2:-1].replace("A","a").replace("C","c")+s[-1]).islower()
h=f and g
print("AC" if h is True else "WA")

Submission status: Wrong Answer

Solution code:
import  re
s = input()
print(s[0] == "A" and s[2:-2:].count("C") ==1 and len(re.findall("[a-z]",s)) == len(s)-2 \
        and "AC" or "WA")

Submission status: Wrong Answer

Solution code:
s = input()

if(s[0] == "A" and s.count("A") == 1):
    if(s[2:len(s)-1].count("C") == 1 and s.count("C") == 1):
        s.strip("C")
        s.strip("A")
        if(s.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.count("A") == 1):
    if(s[2:len(s)-1].count("C") == 1 and s.count("C") == 1):
        s.strip("C")
        s.strip("A")
        if(s.islower):
            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:len(s)-1].count("C") == 1 and s.count("C") == 1):
        s.strip("C")
        s.strip("A")
        if(s.islower):
            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:len(s)-1].count("C") == 1):
            a = s.strip("C")
            a = s.strip("A")
            if(a.islower):
                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:len(s)-1].count("C") == 1):
            s.strip("C")
            s.strip("A")
            if(s.islower):
                print("AC")
            else:
                print("WA")
    else: 
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

t = 'a'
for i in range(1, len(s)):
    t += s[i]
    if s[i] == 'C':
        t += 'c'

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

Submission status: Wrong Answer

Solution code:
s = list(input())
flg = True

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

count = 0
for i in s[2:-1]:
    if i == "C":
        count += 1

if count != 1:
    flg = False

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

Submission status: Wrong Answer

Solution code:
s = input()
length = len(s)
cnt = 0

if s[0] != 'A':
    print('WA')
    exit()
if s[length-1].isupper():
    print('WA')
    exit()

if length == 4:
    if s[2] != 'C':
        print('WA')
        exit()
    else:
        cnt = 1
else:
    for i in range(2, length-1):
        if s[i].isupper():
            if s[i] != 'C':
                print('WA')
                exit()
            else:
                cnt += 1

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

print('AC')
exit()

Submission status: Wrong Answer

Solution code:
s = input()
length = len(s)
cnt = 0

if s[0] != 'A':
    print('WA')
    exit()
if s[length-1].isupper():
    print('WA')
    exit()

for i in range(2, length-1):
    if s[i].isupper():
        if s[i] != 'C':
            print('WA')
            exit()
        else:
            cnt += 1

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

print('AC')
exit()

Submission status: Wrong Answer

Solution code:
s = input()
length = len(s)
cnt = 0

if s[0] != 'A':
    print('WA')
    exit()
'''
if s[length-1].isupper():
    print('WA')
    exit()
'''
for i in range(2, length):
    if s[i].isupper():
        if s[i] != 'C':
            print('WA')
            exit()
        else:
            cnt += 1

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

print('AC')
exit()

Submission status: Wrong Answer

Solution code:
s = input()
length = len(s)
cnt = 0

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

for i in range(2, length-1):
    if s[i].isupper():
        if s[i] != 'C':
            print('WA')
            exit()
        else:
            cnt += 1

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

print('AC')
exit()

Submission status: Wrong Answer

Solution code:
s = input()
length = len(s)
cnt = 0

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

for i in range(2, length-1):
    if s[i].isupper() == True and s[i] != 'C':
        print('WA')
        exit()
    if s[i] == 'C':
        cnt += 1

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

print('AC')
exit()

Submission status: Wrong Answer

Solution code:
import re

S = input()

if (re.match(r"^A[a-z]+C[a-z]+", S)):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
def main():

    test = input()
    if test[0] != "A":
        print("WA")
        return

    if test[:-1][2:].count("C") != 1:
        print("WA")
        return

    for i in range(2, len(test) - 1):
        if test[i] == "C": continue

        if test[i].lower() != test[i]:
            print("WA")
            return

    print("AC")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np

def main():

    test = input()

    if test[0] != "A":
        print("WA")
        return

    if ((1 if test[2] == "C" else 0) + test[-3:][:2].count("C")) != 1:
        print("WA")
        return

    for i in range(len(test)):
        if test[i] == "A" and i == 0: continue
        if test[i] == "C" and i == 2: continue
        if test[i] == "C" and i == len(test) - 3: continue
        if test[i] == "C" and i == len(test) - 2: continue

        if test[i].lower() != test[i]:
            print("WA")
            return

    print("AC")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()
flag = False
c = S[2]+S[-2]
if S[0] == "A":
    if c != "CC":
        if "C" in c:
            flag = True
            for i in range(len(S)):
                if i != 0:
                    if i != 2:
                        if i != (len(S)-2):
                            a = ord(S[i])
                            if a <= 90:
                                flag = False
if flag:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

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