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_1 = False
flag_2 = False
flag_3 = False

if S[0] == 'A': flag_1 = True
if S[2:-1].count('C') == 1: flag_2 = True

S = S[1:]
count = 0
for i in range(len(S) -1):
    if S[i].isupper():
        count += 1
if count == 1: flag_3 = True
if flag_1 == True and flag_2 == True and flag_3 == True:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
flag_1 = False
flag_2 = False
flag_3 = False

if S[0] == 'A':
    flag_1 = True

count_C = 0
for i in range(len(S) - 1):
    if 2 <= i <= len(S) - 1 - 1:
        if S[i] == 'C':
            count_C += 1
if count_C == 1: flag_2 = True

count_upper = 0
if flag_1 == True and flag_2 == True:
    for i in range(len(S) - 1):
        if S[i].isupper():
            count_upper += 1
    if count_upper == 2:
        flag_3 = True

if flag_1 == True and flag_2 == True and flag_3 == True:
    print('AC')
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 = s.strip("A")
        s = s.replace("C","")
        if s == s.lower():
            print('AC')
        else:
            print('WC')
    else:
        print('WC')
else:
    print('WC')

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import copy

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    S = inputs[0]
    if S[0] != 'A':
        return 'WA'

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

    return 'WA'


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == 'A':
    index = S.find('C')
    new_S = S[:index] + S[(index + 1):]
    if 1 < index < len(new_S) and not 'C' in new_S:
        print('AC')
        exit()

print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == 'A':
    if 1 < S.find('C') < len(S) - 1:
        S.strip('C')
        if not 'C' in S:
            print('AC')
            exit()

print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

if S[0] == 'A' and 1 < S.find('C') < len(S) - 1:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] != "A":
    print("WA")
    exit()
if not s[1].islower():
    print("WA")
    exit()
if not s[-1].islower():
    print("WA")
    exit()
s = list(s)
judge = s[2:-1]
if "C" not in judge:
    print("WA")
    exit()
else:
    judge.remove("C")

if "".join(judge).islower():
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()

for i in range(len(s)):
    if i == 0:
        if s[i] != "A":
            print("WA")
            exit()
    elif i == 2:
        if s[i] != "C":
            print("WA")
            exit()
    else:
        if s[i].isupper():
            print("WA")
            exit()
print("AC")

Submission status: Wrong Answer

Solution code:
def solve():
    s = input()
    c0 = s[0] == "A"
    c1 = s[2:-2].count("C") == 1
    c2 = sum([1 for c in s if c.isupper()]) == 2
    return "AC" if c0 and c1 and c2 else "WA"


if __name__ == "__main__":
    print(solve())

Submission status: Wrong Answer

Solution code:
def wa_exit():
    print('WA')
    exit()


s = input()

if s[0] != 'A':
    wa_exit()
if 'C' not in s[2:-2]:
    wa_exit()
for i, c in enumerate(s):
    if i == 0 or i == s.index('C'):
        continue
    if c.isupper():
        wa_exit()

print('AC')

Submission status: Wrong Answer

Solution code:
import sys

S = list(input())

if S[0] == "A":
    S.remove("A")
else:
    print("WA")
    sys.exit()

if S[1:-2].count("C") == 1:
    S.remove("C")
else:
    print("WA")
    sys.exit()

if "".join(S).islower():
    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("C")
    s.pop(0)
    print(s)
    s_ = "".join(s)
    if s_.islower() == True:
        print("AC")
        exit()
print("WA")

Submission status: Wrong Answer

Solution code:
S = list(input())

ans = "AC"
tmp = S[2:-2]

if S[0] != "A":
  ans = "WA"
else:
  S.remove("A")
  
count = 0
for item in tmp:
  if item == "C":
    count += 1
    
if count != 1:
  ans = "WA"
else:
  S.remove("C")

if "".join(S).lower() != "".join(S):
  ans = "WA"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main(S):
    if not S[0] == 'A' or S[1] == 'C':
        return 'WA'
    if S.endswith('C'):
        return 'WA'

    count_C = 0

    for s in S[2:]:
        if s == 'C':
            if count_C == 1:
                return 'WA'
            else:
                count_C += 1
                continue
        elif not s.islower():
            return 'WA'

    if count_C == 0:
        return 'WA'

    return 'AC'


if __name__ == '__main__':
    S = input()
    print(main(S))

Submission status: Wrong Answer

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

    # S の先頭の文字は大文字の A である。
    if not S[0] == 'A':
        return 'WA'
    if S.endswith('C'):
        return 'WA'

    count_c = 0
    count_c += S[2:-1].count('C')
    count_c += S[2:-1].count('c')

    if not count_c == 1 or S[2:-1].count('C') == 0:
        return 'WA'

    for s in S[1:]:
        if s == 'C':
            continue
        elif not s.islower():
            return 'WA'

    return 'AC'


if __name__ == '__main__':
    S = input()
    print(main(S))

Submission status: Wrong Answer

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

if S[0] == 'A':
    score += 1

if len(S) == 4:
    if S[2] == 'C':
        score += 1

    for i,v in enumerate(S):
        if i != 0 and i !=2: 
            if v.islower() != True:
                break
            if i == len(S) -1:
                score += 1


else:
    if S[2] == 'C' and S[-2] != 'C':
        score += 1

    elif S[2] != 'C' and S[-2] == 'C':
        score += 1

    for i,v in enumerate(S):
        if i != 0 and i != 2 and i != len(S)-2:
            if v.islower() != True:
                break
            if i == len(S) -1:
                score += 1

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

Submission status: Wrong Answer

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

s = input().strip()
if s[0] == "A":
    if s[2:-1].count("C") == 1:
        tmp = s[2:-1].replace("C","",1)
        s = s[1:2] + tmp
        b = True
        for c in s:
            if c < "a":
                b = False
                break
        if b:
            print("AC")
            exit()
print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(input())
print(s[2:-1])

def check(S):
    if not S[0]=="A":
        return False
    if not S[2:-1].count("C")==1:
        return False
    NG=[0, S.index("C")]
    for i,s in enumerate(S):
        if i in NG:
            continue
        if s.isupper():
            return False
    return True

print("AC") if check(s) else print("WA")

Submission status: Wrong Answer

Solution code:
s=list(input())

def check(s):
    if s[0]=="A":
        s[0]='a'
        if s[2:-1].count('C')==1:
            i=s.index('C')
            s[i]='c'
            for i in s:
                if not i.islower():
                    return False
                return True
    return False

if check(s):
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
low = ""
if (s[0] == "A") and (s[2:-1].count("C") == 1):
    for x in s:
        if x != "A" and x != "C":
                low = ''.join(x) 

print("AC") if low.islower() else print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
temp_s = s[1:-1]
#print(temp_s)

if (s[0]=="A")and("C" in temp_s):
  s.remove("A")
  s.remove("C")
  if len(set(s) - set(list("".join(s).lower())))==0:
    print("AC")
  else:
    print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = list(input())
temp_s = s[1:-1]
print(temp_s)

if (s[0]=="A")and("C" in temp_s):
  s.remove("A")
  s.remove("C")
  if len(set(s) - set(list("".join(s).lower())))==0:
    print("AC")
  else:
    print("WA")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
S = input()

count = 0
hantei = 0

if S[0] == "A":
    count += 1

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

for i in range(1,len(S)):
    if "C"!= S[i] and S[i].isupper == 1:
        hantei = 1
        break


if count == 2 and S.count("C") == 1 and hantei == 0:
    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 = s[1:]
    s.remove('C')
    new_s = []
    for i in range(len(s)):
        new_s.append(s[i].lower())
    if s == new_s:
        print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    cList = []
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    for i,j in enumerate(S[1:-2]):
        if j=='C':
            cList.append(i+1)
    if len(cList)==1:
        flag1=True
        S.pop(cList[0])
        
    if ''.join(S).islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('AC')
    else:
        print('WA')


    
if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    c1 = S.pop(1)
    c2 = S.pop(-2)
    other = ''.join(S)
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    if (c1=='C' or c2=='C') and c1!=c2:
        flag1 = True
    
    if other.islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('AC')
    else:
        print('WA')


    
if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    c1 = S.pop(1)
    c2 = S.pop(-2)
    other = ''.join(S)
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    if (c1=='C' or c2=='C') and c1!=c2:
        flag1 = True
    
    if other.islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('CA')
    else:
        print('WA')


    
if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    c1 = S.pop(1)
    c2 = S.pop(-2)
    other = ''.join(S)
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    if c1=='C' or c2=='C' and c1!=c2:
        flag1 = True
    
    if other.islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('AC')
    else:
        print('WA')


    
if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s = input()
def end():
    print("WA")
    exit()
if s[0] != 'A':
    end()
flag = False
for i in s[3:-1]:
    if i == 'C':
        if flag:
            end()
        flag = True
if not flag:
    end()

flag = False
for i in range(1,len(s)):
    if s[i].isupper():
        if flag:
            end()
        flag = True

print("AC")

Submission status: Wrong Answer

Solution code:
def main(S):
    if not S[0] == 'A':
        return 'WA'
    if not S[2] == 'C':
        return 'WA'
    if S.endswith('C'):
        return 'WA'

    count_c = 0
    count_c += S.count('C')
    count_c += S.count('c')

    if not count_c == 1:
        return 'WA'

    for s in S[1:]:
        if s == 'C':
            continue
        elif not s.islower():
            return 'WA'

    return 'AC'


if __name__ == '__main__':
    S = input()
    print(main(S))

Submission status: Wrong Answer

Solution code:
def main(S):
    if not S[0] == 'A':
        return 'WA'
    if S[1] == 'C':
        return 'WA'
    if not S[2] == 'C':
        return 'WA'

    count_c = 0
    count_c += S.count('C')
    count_c += S.count('c')

    if not count_c == 1:
        return 'WA'

    for s in S[1:]:
        if s == 'C':
            continue
        elif not s.islower():
            return 'WA'

    return 'AC'


if __name__ == '__main__':
    S = input()
    print(main(S))

Submission status: Wrong Answer

Solution code:
def main(S):
    if not S[0] == 'A':
        return 'WA'
    if not S[2] == 'C':
        return 'WA'

    count_c = 0
    count_c += S.count('C')
    count_c += S.count('c')

    if not count_c == 1:
        return 'WA'

    for s in S[1:]:
        if s == 'C':
            continue
        elif not s.islower():
            return 'WA'

    return 'AC'


if __name__ == '__main__':
    S = input()
    print(main(S))

Submission status: Wrong Answer

Solution code:
def main(S):
    if not S[0] == 'A':
        return 'WA'
    if not S[2] == 'C':
        return 'WA'

    count_c = 0
    count_c += S.count('C')
    count_c += S.count('c')

    if not count_c == 1:
        return 'WA'

    for s in S[1:]:
        if s == 'C':
            continue
        elif not s.islower():
            return 'WA'

    return 'AC'


if __name__ == '__main__':
    S = input()
    main(S)

Submission status: Wrong Answer

Solution code:
S = list(input())

s = S[2:-1]
s_sub = []
cnt = 0
for i in s:
  if (i == 'C'):
    cnt += 1

for i in s[1:]:
  if (i != 'C'):
    s_sub.append(i)
if (S[0] == 'A' and cnt == 1 and "".join(s_sub).islower()):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())

s = S[2:-1]
s_sub = []
cnt = 0
for i in s:
  if (i == 'C'):
    cnt += 1

for i in s:
  if (i != 'A' or i != 'C'):
    s_sub.append(i)
 
    
if (S[0] == 'A' and cnt == 1 and "".join(s_sub).islower()):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())

s = S[2:-1]
s_sub = []
cnt = 0
for i in s:
  if (i == 'C'):
    cnt += 1
  else:
    s_sub.append(i)
    
if (S[0] == 'A' and cnt == 1 and "".join(s_sub).islower()):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = list(input())

s = S[2:-1]
cnt = 0
for i in s:
  if (i == 'C'):
    cnt += 1
if (S[0] == 'A' and cnt == 1):
  print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
l = len(S)
c = 0
if S[0] == 'A':
  n = 1
  while n < l:
    if S[n] == 'C' and n not in [1, l-1]:
      c += 1
    elif S[n].isupper():
      break
    n += 1
  if c == 1:
    print('AC')
  else:
    print('WA')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
l = len(S)
c = 0
if S[0] == 'A':
  n = 1
  while n < l:
    if S[n] == 'C' and n not in [1, l-1]:
      c = 1
    elif S[n].isupper():
      break
    n += 1
  if c == 1:
    print('AC')
  else:
    print('WA')
else:
  print('WA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()

low_count=0

for s in S:
    if s.islower()==True:
        low_count+=1 

if low_count ==len(S)-2:
    if S[0] == "A":
        count=0
        
        for i in S[2:-1]:
            if i in "C":
                count+=1
         
        if count !=0:
            print('AC')
        else:
            print('WC')
    else:
        print('WC')
        
else:
    print('WC')

Submission status: Wrong Answer

Solution code:
S=input()

low_count=0

for s in S:
    if s.islower()==True:
        low_count+=1
    
    else:
        print('WC')
 
    

if low_count ==len(S)-2:
    if S[0] == "A":
        count=0
        
        for i in S[2:-1]:
            if i in "C":
                count+=1
         
        if count !=0:
            print('AC')
        else:
            print('WC')
    else:
        print('WC')
        
else:
    print('WC')

Submission status: Wrong Answer

Solution code:
S="AcycliC"

low_count=0

for s in S:
    if s.islower()==True:
        low_count+=1
 
    

if low_count ==len(S)-2:
    if S[0] == "A":
        count=0
        
        for i in S[2:-1]:
            if i in "C":
                count+=1
         
        if count !=0:
            print('AC')
        else:
            print('WC')
    else:
        print('WC')
        
else:
    print('WC')

Submission status: Wrong Answer

Solution code:
S=input()

low_count=0

for s in S:
    if s.islower()==True:
        low_count+=1
 
    

if low_count ==len(S)-2:
    if S[0] == "A":
        count=0
        
        for i in S[2:-1]:
            if i in "C":
                count+=1
         
        if count !=0:
            print('AC')
        
        else:
            print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
cnt = 0
alpha = ['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']
for i in range(n):
  if i == 0:
    if s[0] != 'A':
      print('WA')
      break
    s = 'a' + s[1:]
  if 2 <= i < n-1:
    if s[i] == 'C':
      cnt += 1
      if cnt == 2:
        print('WA')
        break
      s = s[:i] + 'c' + s[i+1:]
  if s[i] in alpha:
    print('WA')
    break
else:
  print('AC')

Submission status: Wrong Answer

Solution code:
S = input()
def check(s):
    count=0
    large=True
    for i in s[2:-1]:
        if i == 'C':
            count+=1
        elif i.isupper():
            large=False
    return (count==1) & (large)

if (S[0]=='A') & check(S):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == 'A' and 'C' in s[2:-2]:
  c = s.index('C')
  if s[1:c] + s[c+1:] == (s[1:c] + s[c+1:]).lower():
    print('AC')
    exit()
print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == 'A' and 'C' in s[2:-2]:
  c = s.index('C')
  if s[1:c] + s[c+1:] == (s[1:c] + s[c+1:]).lower:
    print('AC')
    exit()
print('WA')

Submission status: Wrong Answer

Solution code:
import string
li = list(string.ascii_lowercase)

s = list(input())

if s[0] == "A":
    if s.count("C") == 1 and (s[2] == "C" or s[-2] == "C"):
        s.remove("A")
        s.remove("C")
    else:
        print("WA")
        exit()
else:
    print("WA")
    exit()

if all([s[i] in li for i in range(len(s))]):
    print("AC")
    exit()
print("WA")

Submission status: Wrong Answer

Solution code:
import string
li = list(string.ascii_lowercase)

s = list(input())

if s[0] == "A" and (s[2] == "C" or s[-2] == "C"):
    s.remove("A")
    s.remove("C")
else:
    print("WA")
    exit()

if all([s[i] in li for i in range(len(s))]):
    print("AC")
    exit()
print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]=="A":
    if s[2:-2].count("C")==1:
        if s[1]==s[1].lower() and s[1:s.find("C")]==s[1:s.find("C")].lower() and s[s.find("C")+1:]==s[s.find("C")+1:].lower() :
            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:-2].count("C")==1:
        if s[1]==s[1].lower() and s[3:]==s[3:].lower():
            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:].count("C")==1:
        if s[1]==s[1].lower() and s[3:]==s[3:].lower():
            print("AC")
        else: print("WA")
    else: print("WA")
else: print("WA")

Submission status: Wrong Answer

Solution code:
import re;print(re.match("A[a-z]C[a-z]+$",input())and"AC"or"WA")

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase


S = input()

C_cnt = 0
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            print('WA')
            exit(0)
    if 2 <= i <= len(S) - 2:
        if S[i] == 'C':
            C_cnt += 1
    if i > 1:
        if S[i] != 'C' and S[i] not in ascii_lowercase:
            print('WA')
            exit(0)
if C_cnt != 1:
    print('WA')
else:
    print('AC')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i=input()
if i[0]=="A"and i[2:-1].count("C")==1:
    j=i[2:-1].replace("C","c",1)
    if j[0:].islower()==True and i[-1].islower()==True:
        print("AC")
else:print("WA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
ans="AC"
cnt1=0
cnt2=0
cnt3=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="WA"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="WA"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt3+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1 or cnt3!=0:
    ans="WA"
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ans="AC"
cnt1=0
cnt2=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="WA"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="WA"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt2+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1:
    ans="WA"
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ans="Yes"
cnt1=0
cnt2=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="No"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="No"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt2+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1:
    ans="No"
print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ans="Yes"
cnt1=0
cnt2=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="No"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if s[i]=="C":
            cnt2+=1
        else:
            cnt2+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1:
    ans="No"
print(ans)

Submission status: Wrong Answer

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    S = list(_ for _ in input())
    # print(S)
    if S[0] != 'A':        
        print('WA')
        return
    S.pop(0)
    # print(S)
    if S[1:-2].count('C') != 1:
        print('WA')
        return
    S.pop(S.index('C',1,-2))
    # print(S)
    for s in S:
        if s.isupper():
            print('WA')
            return
    print('AC')
    return
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    S = list(_ for _ in input())
    print(S)
    if S[0] != 'A':        
        print('WA')
        return
    S.pop(0)
    # print(S)
    if S[1:-2].count('C') != 1:
        print('WA')
        return
    S.pop(S.index('C',1,-2))
    # print(S)
    for s in S:
        if s.isupper():
            print('WA')
            return
    # print('AC')
    return
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    S = list(_ for _ in input())
    if S[0] != 'A':        
        print('WA')
        return
    S = S[1:-1]
    if S[1:-2].count('C') != 1:
        print('WA')
        return
    S.pop(S.index('C',1,-2))
    for s in S:
        if s.isupper():
            print('WA')
            return
    print('AC')
    return
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s=input();print("WAAC"[s[0]=="A"and s[2:-1].count("C")==1::2])

Submission status: Wrong Answer

Solution code:
s= input();print("WAAC"[s[0]=="A"and"C"in s[2:-2]and s.count("C")==1::2])

Submission status: Wrong Answer

Solution code:
S = input()
ac = 1
if S[0] != 'A':
    ac = 0
c = 0
for i in range(1,len(S)):
    if 2 <= i <= len(S) and S[i] == 'C':
        c += 1
        continue
    if S[i].isupper():
        ac = 0
if c == 1 and ac:
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
# ABC  104 B, accepted
from collections import Counter

S = input()
if S[0] == 'A':
    t = Counter(S[2:-1])
    if t['C'] == 1:
        S=S.replace('A', '')
        S=S.replace('C', '')
        print(S)
        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':
    print('WA')
    exit()

if S[1].isupper():
    print('WA')
    exit()

flag = 0
ans = 0
for i in range(2,len(S)-1):
    if S[i].isupper():
        if S[i] != 'C' or flag:
            print('WA')
            exit()

        else:
            flag = 1
            ans = 1

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

Submission status: Wrong Answer

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

if "A" ==s[0] and "C" in s[2:l-1]:
    cnt=0
    for i in list(s[2:l-1]):
        if i.isupper():
            cnt+=1

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

Submission status: Wrong Answer

Solution code:
S = input()
flag = 0

if S[0] == 'A':
    flag += 1

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

S.strip('A')
S.strip('C')

if not S.islower():
    if flag == 2 and len(S) == l-2:
        print('AC')
    else:
        print('WA')    
else:
    print('WA')