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()
flag = True
ko = ["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':
    pass
else:
    flag = False
cnt = 0
for i in range(2, len(s)-1):
    if s[i] == 'C':
        cnt += 1
        id = i
if cnt == 1:
    pass
else:
    flag = False
if flag:
    for i in range(1, len(s)):
        if s[i] != 'A' and s[i] == 'C' and id != i:
            if s[i] not in ko:
                flag = False
if flag:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()
flag = True
if S[0] != 'A':
    flag = False
if S.count('C') != 1 or 'C' not in S[2:-2]:
    flag = False
if S.replace('A', 'a').replace('C', 'c').islower() != True:
    flag = False
print('AC' if flag else 'WA')

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase

s = list(input())
ans = 'AC'

cnt = 0
for i, c in enumerate(s):
    if not c in ascii_lowercase:
        if i == 0 and c == 'A':
            continue
        if i >= 2 and i <= len(s) - 2:
            if c == 'C':
                cnt += 1
                if cnt <= 1:
                    continue
        ans = 'WA'
        
if cnt != 1:
    ans = 'WA'
        
print(ans)

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase

s = list(input())
ans = 'AC'

cnt = 0
for i, c in enumerate(s):
    if i == 0:
        if c != 'A':
            ans = 'WA'
            break
    elif not c in ascii_lowercase:
        if i >= 2 and i <= len(s) - 2:
            if c == 'C':
                cnt += 1
                if cnt > 1:
                    ans = 'WA'
                    break
            else:
                ans = 'WA'
        else:
            ans = 'WA'
        
print(ans)

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase

s = list(input())
ans = 'AC'

cnt = 0
for i, c in enumerate(s):
    if i == 0 and c != 'A':
        ans = 'WA'
        break
    if not c in ascii_lowercase:
        if i >= 2 and i <= len(s) - 2:
            if c == 'C':
                cnt += 1
                if cnt > 1:
                    ans = 'WA'
                    break
        else:
            ans = 'WA'
        
print(ans)

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase

s = list(input())
ans = 'AC'

if s[0] != 'A':
    ans = 'WA'

if s[2:-1].count('C') != 1:
    ans = 'WA'

cnt = 0
for i, c in enumerate(s):
    if i == 0 and c != 'A':
        ans = 'WA'
        break
    if not c in ascii_lowercase:
        if i >= 2 and i <= len(s) - 2:
            if c == 'C':
                cnt += 1
                if cnt > 1:
                    ans = 'WA'
                    break
        
print(ans)

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase

s = list(input())
ans = 'AC'

if s[0] != 'A':
    ans = 'WA'

if s[2:-1].count('C') != 1:
    ans = 'WA'

cnt = 0
for i, c in enumerate(s):
    if i == 0 and c != 'A':
        ans = 'WA'
        break
    if not c in ascii_lowercase:
        if i >= 3 and i <= len(s) - 2:
            if c == 'C':
                cnt += 1
                if cnt > 1:
                    ans = 'WA'
                    break
        
print(ans)

Submission status: Wrong Answer

Solution code:
S = str(input())
alp = "ABDEFGHIJKLMNOPQRSTUVWXYZ"
if S[0] == 'A' and S.count('C') == 1 and S[2:-1].count('C') == 1:
  for i in range(1,len(S)):
    if S[i] in alp:
      print(S[i])
      print("WA")
      exit()
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = str(input())
alp = "ABDEFGHIJKLMNOPQRSTUVWXYZ"
if S[0] == 'A' and S.count('C') == 1 and S[2:-1].count('C') == 1:
  for i in range(1,len(S)-1):
    if S[i] in alp:
      print("WA")
      exit()
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = str(input())
alp = "ABDEFGHIJKLMNOPQRSPUVWXYZ"
if S[0] == 'A' and S.count('C') == 1 and S[2:-1].count('C') == 1:
  for i in range(1,len(S)-1):
    if S[i] in alp:
      print("WA")
      exit()
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
S = str(input())
short_alp = "ABDEFGHIJKLMNOPQRSPUVWXYZ"
if S[0] == 'A' and S.count('C') == 1 and S[2:-2].count('C') == 1:
  for i in range(1,len(S)-1):
    if S[i] in short_alp:
      print("WA")
      exit()
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

ans = True if s[0] == 'A' else False
num = 0
for i in range(2, len(s)):
    if s[i] == 'C' and i != len(s) - 1:
        num += 1
    elif ord(s[i]) <= ord('Z') and ord(s[i]) >= ord('A'):
        ans = False
        break

if num != 1:
    ans = False

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

Submission status: Wrong Answer

Solution code:
s = input()

ans = True if s[0] == 'A' else False
num = 0
for i in range(2, len(s) - 1):
    if s[i] == 'C':
        num += 1
    elif ord(s[i]) <= ord('Z') and ord(s[i]) >= ord('A'):
        ans = False
        break

if num != 1:
    ans = False

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

Submission status: Wrong Answer

Solution code:
S = input()
L = [chr(i) for i in range(97, 97+26)]
if S[0] == "A" and S[2] == "C":
  T = "AC"
  for i in range(1,len(S)):
    if i != 2:
      if not S[i] in L:
        T = "WA"
        break
  print(T)
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
l = s[2:-2]
if s[0] == "A" and "C" in l:
    s.remove("A")
    s.remove("C")
    if str(s).islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
c = 0
flag = 0
if S[0] == "A":
    for i in range(len(S)-3):
        if S[2+i] == "C":
            c += 1
            this = 2+i
    if c == 1:
        S.pop(this)
        S.pop(0)

    for i in S:
        if ord(i) < 97:
            break
        else:
            flag = 1

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

Submission status: Wrong Answer

Solution code:
S = list(input())
c = 0
flag = 0
if S[0] == "A":
    for i in range(len(S)-3):
        if S[2+i] == "C":
            c += 1
            this = 2+i
    if c == 1:
        S.pop(this)
        S.pop(0)

        for i in S:
            if ord(i) < 97:
                break
            else:
                flag = 1

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

Submission status: Wrong Answer

Solution code:
s = list(input())

if s[0] == "A" and s[2:-1].count("C") == 1:
  s.remove("A")
  s.remove("C")
  for c in s:
    if c.isupper() == True:
      print(c)
      print("WA")
      exit()
    else:
      continue
  print("AC")

else:
  print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

alphabet = 'abcdefghijklmnopqrstuvwxy'

C_count = 0
ans = 'AC'
for i, c in enumerate(s):
    if i == 0 and c == 'A':
        pass
    else:
        if c in alphabet:
            pass
        else:
            if c == 'C' and i >= 2 and i <= len(s)-2 and C_count == 0:
                C_count += 1
            else:
                ans = 'WA'

print(ans if C_count == 1 else 'WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()
def atcoder(p):
    count = 0
    if p[0]=='A':
        count += 1
    
    count_C=0
    for i in range(len(p)-2):
        if p[i+2]=='C':
            count_C += 1
    if count_C == 1:
        count += 1
    
    count_c = 0
    for i in range(len(p)-1):
        if p[i].upper() ==p[i]:
            count_c+=1
    if p[len(p)-1]==p[len(p)-1].upper():
        count_c+=1
    if len(p)==3:
        count_c+=2
    if count_c ==2:
        count += 1
    
    
    if count ==3:
        print('AC')
    else:
        print('WA')
         
atcoder(a)

Submission status: Wrong Answer

Solution code:
a = input()
def atcoder(p):
    count = 0
    if p[0]=='A':
        count += 1
    
    count_C=0
    for i in range(len(p)-2):
        if p[i+2]=='C':
            count_C += 1
    if count_C == 1:
        count += 1
    
    count_c = 0
    for i in range(len(p)-1):
        if p[i].upper() ==p[i]:
            count_c+=1
    if p[len(p)-1]==p[len(p)-1].upper():
        count_c+=1
    if count_c ==2:
        count += 1
    
    if count ==3:
        print('AC')
    else:
        print('WA')
         
atcoder(a)

Submission status: Wrong Answer

Solution code:
a = input()
def atcoder(p):
    count = 0
    if p[0]=='A':
        count += 1
    
    count_C=0
    for i in range(len(p)-2):
        if p[i+2]=='C':
            count_C += 1
    if count_C == 1:
        count += 1
    
    count_c = 0
    for i in range(len(p)-1):
        if p[i].upper() ==p[i]:
            count_c+=1
    if count_c ==2:
        count += 1
    
    if count ==3:
        print('AC')
    else:
        print('WA')
         
atcoder(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()
def atcoder(p):
    count = 0
    if p[0]=='A':
        count += 1
    count_C=0
    for i in range(len(p)-2):
        if p[i+2]=='C':
            count_C += 1
    if count_C == 1:
        count += 1
    count_c = 0
    for i in range(len(p)-2):
        if p[i].upper() ==p[i]:
            count_c+=1
    if count_c ==2:
        count += 1
    if count ==3:
        print('AC')
    else:
        print('WA')
         
atcoder(a)

Submission status: Wrong Answer

Solution code:
a = input()
def atcoder(p):
    count = 0
    if p[0]=='A':
        count += 1
    count_C=0
    for i in range(len(p)-2):
        if p[i+2]=='C':
            count_C += 1
    if count_C == 1:
        count += 1
    count_c = 0
    for i in range(len(p)-2):
        if p[i].upper() ==p[i]:
            count_c+=1
    if count_c ==2:
        count += 1
    if count ==3:
        print('Yes')
    else:
        print('No')
         
atcoder(a)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':

	s = input()
	ans = 0
	flg = False
	
	if s[0] == "A":
		tmp = s[2:-1]
		if s.count("C") == 1 and tmp.count("C") == 1:
			tmp2 = s[1:-1]
			tmp2 = tmp2.replace("C","c")
			if tmp2.lower() == tmp2:
				flg = True

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':

	s = input()
	ans = 0

	if s[0] == "A":
		ans += 1

	tmp = s[2:-1]
	if tmp.count("C") == 1:
		ans += 2

	tmp2 = s[1:-1]
	if s.count("C") == 1:
		tmp2 = tmp2.replace("C","c")
		if tmp2.lower() == tmp2:
			ans += 4

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':

	s = input()
	ans = 0

	if s[0] == "A":	ans += 1

	tmp = s[2:-1]
	if tmp.count("C") == 1:
		ans += 2

	tmp2 = s[1:-1]
	tmp2 = tmp2.replace("C","c")
	if tmp2.lower() == tmp2:ans += 4

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s_list = list(input())
n = len(s_list)
c_count = 0
if s_list[0] == "A":
    for s in s_list[2:-1]:
        if s == "C":
            c_count += 1
    if c_count == 1:
        if all([s == "A" or "C" or s.islower() for s in set(s_list)]):
            print("AC")
            exit()
print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())
ans = "WA"

if S[0] == "A":
    C_num = 0
    for char in S[2:-1]:
        if char == "C":
            C_num += 1
    if C_num == 1:
        check_S = S[1:]
        C_index = check_S.index("C")
        del check_S[C_index]
        frag = True
        for char in check_S:
            if char.isupper():
                frag = False
                break
            if frag == True:
                ans = "AC"

print(ans)

Submission status: Wrong Answer

Solution code:
import re

S = input()
if('A' in S[0]):
    if('C' in S[2:-2]):
        if(len(re.findall('[A-Z]',S)) == 2):
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
if s[0]==s[0].upper()and s[2]==s[2].upper() and s[3:-1]==s[3:-1].lower()and s[1]==s[1].lower()and s[-1]==s[-1].lower():
    print("AC" , end="")
else:
    print("WA" , end="")

Submission status: Wrong Answer

Solution code:
s = input()
if s[0]==s[0].upper()and s[2]==s[2].upper() and s[3:-1]==s[3:-1].lower()and s[1]==s[1].lower()and s[-1]==s[-1].lower():
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

def resolve():
    S = input()
    if S[0] == "A" and S[2:len(S)].count("C") == 1:
         if S[1:].replace("C", "").islower():
             print("AC")
             return
    print("WA")

if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    s = input()
    count =0

    for i in range(len(s)):
        if s[0] != "A":
            count += 2
        if s[i] =="C" :
            if i < len(s)-1 and i >1:
                count +=1
            else:
                count+=2
        elif i>0 and ( ord(s[i]) <=97 or ord(s[i]) >=122):
            count += 2

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

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    s = input()
    count =0

    for i in range(len(s)):
        if s[0] != "A":
            count += 2
        if s[i] =="C" :
            if i < len(s)-1 and i >1:
                count +=1
            else:
                count+=2
        elif i>0 and  ord(s[i]) <=97 and ord(s[i]) >=122:
            count += 2

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

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    s = input()
    count =0

    for i in range(len(s)):
        if s[0] != "A":
            count += 2
        if s[i] =="C" :
            if i < len(s)-1 and i >1:
                count +=1
            else:
                count+=2
        elif ord(s[i]) <=97 and ord(s[i]) >=122:
            count += 2

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

Submission status: Wrong Answer

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    s = input()
    count =0

    for i in range(len(s)):
        if s[0] != "A":
            print("N0")
            break
        if s[i] =="C" :
            if i < len(s)-1 and i >1:
                count +=1
            else:
                count+=2
        elif ord(s[i]) <=97 and ord(s[i]) >=122:
            count += 2

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

Submission status: Wrong Answer

Solution code:
s = list(input())

bl = False
s1 = s[2:len(s)-1]
s2 = s[-1]

if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
    s1.remove('C')
    s1 = ''.join(s1)
    s2 = ''.join(s2)
    ss = s1+s2
    if ss.islower():
        bl = True

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

Submission status: Wrong Answer

Solution code:
s = list(input())

bl = False

if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
    s[2:len(s)-1].remove('C')
    s.remove('A')
    ss = ''.join(s)
    if ss.islower():
        bl = True

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

Submission status: Wrong Answer

Solution code:
s = list(input())

bl = True

if s[0] != 'A':
    bl = False
if s[2:len(s)-1].count('C') != 1:
    bl = False
if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
    s[2:len(s)-1].remove('C')
    s.remove('A')
    ss = ''.join(s)
    if ss.islower():
        bl = True

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

Submission status: Wrong Answer

Solution code:
S = str(input())
s = list(S)
u = s
p = 0
for i in range(2,len(s)-1):
        if s[i] == 'C':
            p = p + 1
for i in range(2,len(s)-1-p):
    if s[i] == 'C':
        del s[i]
if s[0] == 'A':
    del s[0]
    if p == 1:
        q = ''.join(s)
        if q.islower() == True:
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
from collections import Counter
s=list(input())
k=0
if s[0]=='A':
    for i in range(2,len(s)-1):
        if s[i]=='C':
            k+=1
    if k==1:
        if Counter(s)['A']==1 and Counter(s)['C']==1:print('AC')
        else:print('WA')
    else:print('WA')
else:print('WA')

Submission status: Wrong Answer

Solution code:
from collections import Counter
s=list(input())
k=0
if s[0]=='A':
    for i in range(2,len(s)-1):
        if s[i]=='C':
            k+=1
    if k==1:
        if Counter(s)['A']==1 and Counter(s)['C']==1:print('AC')
    else:print('WA')
else:print('WA')

Submission status: Wrong Answer

Solution code:
def check(s):
    if s[0].isupper() and s.count('C') == 1  and  2<= s.index('C') <= len(s) -2 :
        i = s.index('C')
        temp = s[1: i] + s[i+1: ]
        if temp.islower():
            return 'AC'
    return 'WA'


s= input()
print( check(s))

Submission status: Wrong Answer

Solution code:
def check(s):
    if s[0].isupper() and s.count('C') == 1  and  2<= s.index('C') <= len(s) -1:
        i = s.index('C')
        temp = s[1: i] + s[i+1: ]
        if temp.islower():
            return 'AC'
    return 'WA'


s= input()
print( check(s))

Submission status: Wrong Answer

Solution code:
def check(s):
    if s[0].isupper() and s.count('C') == 1  and  2<= s.index('C') < len(s) -1:
        i = s.index('C')
        temp = s[1: i] + s[i+1: ]
        if temp.islower():
            return 'AC'
    return 'WA'


s= input()
print( check(s))

Submission status: Wrong Answer

Solution code:
def check(s):
    if s[0].isupper() and s.count('C') == 1  and  2<= s.index('C') < len(s) -1:
        temp = s[1: s.index('C')] + s[s.index('C')+1: ]
        if temp.islower():
            return 'AC'
    return 'WA'


s= input()
print( check(s))

Submission status: Wrong Answer

Solution code:
def check(s):
    if s[0].isupper() and s.count('C') == 1  and  3<= s.index('C') < len(s) -1:
        temp = s[1: s.index('C')] + s[s.index('C')+1: ]
        if temp.islower():
            return 'AC'
    return 'WA'


s= input()
print( check(s))

Submission status: Wrong Answer

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

alpha = 'ABDEFGHIJKLMNOPQRSTUVWXYZ'
s = input()
n = len(s)
if s[0] != 'A':
    print('WA')
    quit()
cnt = 0
for i in range(2,n-1):
    if s[i] == 'C':
        cnt += 1
    elif s[i] in alpha:
        print('WA')
        quit()
if cnt != 1:
    print('WA')
    quit()
if s[1] in alpha:
    print('WA')
    quit()
print('AC')

Submission status: Wrong Answer

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

alpha = 'BDEFGHIJKLMNOPQRSTUVWXYZ'
s = input()
n = len(s)
if s[0] != 'A':
    print('WA')
    quit()
cnt = 0
for i in range(2,n-1):
    if s[i] == 'C':
        cnt += 1
    elif s[i] in alpha:
        print('WA')
        quit()
if cnt != 1:
    print('WA')
    quit()
if s[1] in alpha:
    print('WA')
    quit()
print('AC')

Submission status: Wrong Answer

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
s = input()
n = len(s)
if s[0] != 'A':
    print('WA')
    quit()
cnt = 0
for i in range(2,n-1):
    if s[i] == 'C':
        cnt += 1
        continue
    elif s[i] in alpha:
        print('WA')
        quit()
if cnt != 1:
    print('WA')
    quit()
if s[1] in alpha:
    print('WA')
    quit()
print('AC')

Submission status: Wrong Answer

Solution code:


def solve():
    s = list(input())
    if s[0] == "A" and s[2:-1].count("C") == 1:
        s.remove("A")
        s.remove("C")

        if "".join(s).islower:
            print("AC")
            exit()

    print("WA")


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:


def solve():
    s = list(input())
    if s[0] == "A" and"C" in s[2:-1]:
        s.remove("A")
        s.remove("C")

        if "".join(s).islower:
            print("AC")
            exit()

    print("WA")


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:

def AcCepted(s):

    ans = "WA"

    if s[0] == "A" and s[2:-2].count("C") == 1:
        s = s.replace("C" , "c")
        if s[1:].islower():
            ans = "AC"

    return ans

def main():
    s = str(input())
    print(AcCepted(s))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

def AcCepted(s):

    ans = "WA"

    if s[0] == "A" and s[1:-2].count("C") == 1:
        s = s.replace("C" , "c")
        if s[1:].islower():
            ans = "AC"

    return ans

def main():
    s = str(input())
    print(AcCepted(s))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()
ans = 1

if s[0] == "A":
    ans += 1
    
part = s[2:-1]
if part.count("C") == 1:
    ans += 1
      
for i in range(len(s)):
    if ord(s[i]) != 65 and ord(s[i]) != 65 and ord(s[i]) < 67:
        ans -= 1
        
print("AWCA"[ans<3::2])

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
if s[0] == "A":
    if "C" in s[2: n - 1]:
        cntA = 0
        cntC = 0
        for i in s:
            if i == "A":
                cntA += 1
            if i == "C":
                cntC += 1
        if cntA == 1 or cntC == 1:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
if s[0] == "A":
    if "C" in s[2: n - 1]:
        cntA = 0
        cntC = 0
        for i in s:
            if i == "A":
                cntA += 1
            if i == "C":
                cntC += 1
        if cntA == 1 and cntC == 1:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = "AC"

if s[0] == "A" and "C" in s[2:-1] and s[1].islower():
    for i in range(3, len(s)):
        if not s[i].islower():
            ans = "WA"
            break
else:
    ans = "WA"

print(ans)