TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
S=input()
k=0
if S[0]=='A':
    for i in range(2,-2):
        if S[i]=='C':
            k=i
            break
            if 'a'<=(S[1:k] and S[k:])<='z':
                print('AC')
                exit()
print('WA')
            

S=input()
k=0
if S[0]=='A':
    for i in range(3,-2):
        if S[i]=='C':
            k=i
            break
            if 'a'<=(S[1:k] and S[k:])<='z':
                print('AC')
                exit()
print('WA')
            

S=input()
k=0
z=0
cnt=0
if S[0]=='A':
    for i in range(2,len(S)-1):
        if S[i]=='C':
            k=i
            cnt += 1
            z=100
            if z==100 and cnt==1:
                for j in range(1,k):
                    if 'a'<=S[j]<='z':
                        z=200
                    else:
                        z=101
                if z==200 :        
                    for l in range(k+1,len(S)):
                        if 'a'<=S[l]<='z':
                            z=102
                        else:
                            z=101
if z == 101 or 0 or 100:
    print('WA')
else:
    print('AC')

S=input()
k=0
if S[0]=='A':
    for i in range(2,len(S)):
        if S[i]=='C':
            k=i
            break
            if 'a'<=(S[1:k] and S[k+1:])<='z':
                print('AC')
                exit()
print('WA')
            

S=input()
k=0
z=0
cnt=0
if S[0]=='A':
    for i in range(2,len(S)-1):
        if S[i]=='C':
            k=i
            cnt += 1
            z=100
            if z==100 and cnt==1:
                for j in range(1,k):
                    if 'a'<=S[j]<='z':
                        z=200
                    else:
                        print('WA')
                        exit()
                if z==200 :        
                    for l in range(k+1,len(S)):
                        if 'a'<=S[l]<='z':
                            z=102
                        else:
                            print('WA')
                            exit()
if z == 0 or z==100:
    print('WA')
else:
    print('AC')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
print(S[0])
print(S[2:-1])
print(S[0] + S[1:-1] + S[-1:])
print(S[0] + S[1:-1].replace('C', 'c', 1) + S[-1:])

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



S = input()

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



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
line = input()
WA_flag = 0
C_flag = 0
check_point = 0

for cnt, elm in enumerate(line):
    if cnt == 0:
        if elm != "A":
            WA_flag += 1
    if cnt > 1 and cnt < (len(line) - 2):
        if elm =="C":
            C_flag += 1
            check_point = cnt

if C_flag != 1:
    WA_flag += 1
else:
    for cnt, elm in enumerate(line):
        if cnt != 1 and cnt != check_point:
            if elm.isupper():
                WA_flag += 1

if WA_flag != 0:
    print("WA")
else:
    print("AC")

line = input()
WA_flag = 0
C_flag = 0
check_point = 0

for cnt, elm in enumerate(line):
    if cnt == 0:
        if elm != "A":
            WA_flag += 1
            #print("A_wrong: " + elm)
    if cnt > 1 and cnt < (len(line) - 1):
        if elm =="C":
            C_flag += 1
            check_point = cnt

if C_flag != 1:
    WA_flag += 1
    #print("C_num wrong: " + elm)
else:
    for cnt, elm in enumerate(line):
        if cnt != 0 and cnt != check_point:
            if elm.isupper():
                WA_flag += 1
                #print("upper_wrong: " + elm)

if WA_flag != 0:
    print("WA")
else:
    print("AC")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = list(str(input()))

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


S = list(str(input()))

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


S = list(str(input()))

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


S = list(str(input()))

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


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
A_list =["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"]
ans_C = 0
ans_Big = 0
if s[0] != "A":
  print("WA")
else:
  for i in range(2,(len(s)-1)):
    if s[i] == "C":
       ans_C += 1
    else:
       ans_C += 0
  for j in range(len(s)):
    if s[j] in A_list:
      ans_Big += 1
    else:
      ans_Big += 0
  if ans_C == 1 and ans_Big ==0:
    print("AC")
  else:
    print("WA")

s = input()
A_list =["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"]
ans_C = 0
ans_Big = 0
if s[0] != "A":
  print("WA")
else:
  for i in range(2,(len(s)-1)):
    if s[i] == "C":
      ans_C += 1
    else:
      ans_C += 0
  for j in range(len(s)):
    if s[j] in A_list:
      ans_Big += 1
    else:
      ans_Big += 0
  if ans_C == 1 and ans_Big == 0:
    print("AC")
  else:
    print("WA")

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")


s = input()
count_C = 0
count_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":
  for i in range(2,len(s)-1):
    if s[i] == "C":
      count_C += 1
    elif s[i] in k:
      count_komoji += 1
  if count_C == 1:
    if count_komoji == len(s)-2:
      if s[len(s)] in k:
        print("AC")
      else:
        print("WA")
    else:
      print("WA")
  else:
    print("WA")
else:
  print("WA")

s = str(input())
C_count = 0
a = 0
b = 0
c = 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":
  a += 1
for i in s[2:-1]:
  if i == "C":
    C_count += 1
if C_count == 1:
  b += 1

l = s[1:]
l = l.replace("C","")
if l.islower() == True:
  c += 1
if a == 1 and b == 1 and c == 1:
  print("AC")
else:
  print("WA")


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()

if S[0] == "A":
    if S[2:-1].count("C") == 1:
        idx = S[2:-1].index("C") + 2
        S = S[1:idx] + S[idx+1:]
        if S == S.lower():
            print("AC")

print("WA")

S = input()

if S[0] == "A":
    if S[2:-1].count("C") == 1:
        idx = S[2:-1].index("C") + 2
        S = S[1:idx] + S[idx+1:]
        if S == S.lower():
            print("AC")
            exit()

print("WA")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-

s = list(input())

answer = True

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

c = 0


for i in range(2,len(s)-1):
    if s[i] == "C":
        c += 1

if c != 1:
    answer = False

capital = 0


for i in range(len(s)):
    if s[i].isupper():
        capital += 1

if capital != 2:
    answer = False

print(answer)

# -*- coding: utf-8 -*-

s = list(input())

answer = True

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

c = 0


for i in range(2,len(s)-1):
    if s[i] == "C":
        c += 1

if c != 1:
    answer = False

capital = 0


for i in range(len(s)):
    if s[i].isupper():
        capital += 1

if capital != 2:
    answer = False

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
N = len(S)
x = 0
if S[0] == 'A':
    if S[1] == 'C' or S[-1] == 'C':
        print('WA')
    else:
        if S.count('C') == 1:
            S.replace('A', '')
            S.replace('C', '')
            for i in range(N -2):
                if 97 <= ord(S[i]) <= 122:
                    x += 1
            if x == N - 2:
                print('AC')
            else:
                print('WA')
        else:
            print('WA')
else:
    print('WA')

S = input()
N = len(S)
x = 0
if S[0] == 'A':
    if S[1] == 'C' or S[-1] == 'C':
        print('WA')
    else:
        if S.count('C') == 1:
            S.replace('A', '')
            S.replace('C', '')
            N = len(S)
            for i in range(N):
                if 97 <= ord(S[i]) <= 122:
                    x += 1
            if x == N - 2:
                print('AC')
            else:
                print('WA')
        else:
            print('WA')
else:
    print('WA')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","")
        s=s.replace("C","")
        if s.isupper()==False:
            print(s.isupper())
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","b")
        if s.isupper()==False:
            print(s.isupper())
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

s=input()
print(s[2:len(s)-1])
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)] and s[0]=="A":
        s=s.replace("A","")
        s=s.replace("C","")
        if s.isupper()==False:
            print("AC")
    else:
        print("WA")
else:
    print("WA")

s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","b")
        if s.isupper()==False:
            print(s.isupper())
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","c")

        if s.isupper()=="False":

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

s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:len(s)-1] and s[0]=="A":
        s=s.replace("A","")
        s=s.replace("C","")
        if s.lower()==True:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

s=input()
if s.count("A")==1 and s.count("C")==1:
    if "C" in s[2:-1] and s[0]=="A":
        s=s.replace("A","a")
        s=s.replace("C","b")
        t=s.lower()
        if s==t:
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
ss=s[1:-1]

if s[0]=="A" and  ss.count("C")==1:
      s[0]="a"
      s=list(s)
      s.remove("C")
      if ''.join(s).islower():
            print("AC")
else:
      print("WA")


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

s=list(s)
s[0]="a"
s.remove("C")
if "".join(s).islower():
      print('AC')
else:
      print("WA")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = list(input())
if s[0] == "A" and s[2:-2].count("C") == 1:
    s.remove("A")
    s.remove("C")
    for i in range(len(s)):
        if s[i].islower:
            continue
        else:
            print("No")
            exit()
    print("Yes")

s = list(input())
if s[0] == "A" and s[2:-1].count("C") == 1:
    s.remove("A")
    s.remove("C")
    for i in range(len(s)):
        if s[i].islower():
            continue
        else:
            print("WA")
            exit()
    print("AC")
else:
    print("WA")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-
import sys

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

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

S = input()
if S[0] != 'A':
    print('WA')
    sys.exit(0)
for l in S:
    if l in list('BDEFGHIJKLMNOPQRSTUVWXYZ'):
        print('WA')
        sys.exit(0)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = list(input())
if S[0] == 'A':
 S.pop(0)
 length = len(S)
 if S[1] == 'C' and S[length-1] == 'C':
  S.pop(length-1)
  S.pop(0)
  if S.islower() == True:
   print('AC')
  else:
   print('WA')
 else:
  print('WA')
else:
 print('WA')

S = list(input())
if S[0] == 'A':
 S.pop(0)
 length = len(S)
 tmp = S
 del tmp[length-1:length]
 del tmp[0]
 if tmp.count('C') == 1:
  tmp.remove('C')
  if str(tmp).islower() == True and str(S[length-1:length]).islower() == True and S[0].islower == True:
   print('AC')
  else:
   print('WA')
 else:
  print('WA')
else:
 print('WA')

S = input()
count_C = 0
index_C = 0
if S[0] == 'A':
  for i in range(2,len(S)-1):
    if S[i] == 'C':
      count_C+=1
      index_C = i
  if count_C == 1:
    s = S[1:index_C]+S[index_C+1:]
    if s.islower():
      print('AC')
    else:
      print('WA') 
  else:
    print('WA') 
else:
  print('WA')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = list(input())
l = [chr(i) for i in range(65, 65+26)]

flag = True
if S[0] != 'A':
    flag = False
elif S[1] in l:
    flag = False
elif S[len(S)] in l:
    flag = False
elif not 'C' in S[2:len(S) - 2]:
    flag = False
count = 0
for i in range(2, len(S) - 1):
    if flag == False:
        break
    if S[i] in l:
        count += 1
    if count > 1:
        flag = False
if count < 1:
    flag = False
if flag:
    print('AC')
else:
    print('WA')

S = list(input())
l = [chr(i) for i in range(65, 65+26)]

flag = True
count = 0
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            flag = False
            break
    if i == 1:
        if S[i] in l:
            flag = False
            break
    if 2 <= i <= len(S) - 2:
        if S[i] == 'C':
            count += 1
        elif S[i] in l:
            flag = False
            break
    if i == len(S) - 1:
        if S[i] in l:
            flag = False
            break
if not count == 1:
    flag = False

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
count = 0
if S[0] == 'A':
    S = S[1:]
    for i in range(1, len(S)-1):
        if S[i] == 'C':
            S = S[0:i] + S[i+1:]
            if S.islower():
                print('AC')
                break
            else:
                print('WA')
                break
    else:
        print('WA')
        break
else:
    print('WA')

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
n = len(s)
res = 0
  
if s[0] == 'A':
  if s.find('C') >= 2 and s.find('C') < n-2:
    s.lower(0)
    s.lower(s.find('C'))
    if s == s.lower():
      print('AC')
    else:
      print('WA')
  else:
    print('WA')
else:
  print('WA')

s=input()
n=len(s)
t=s.lower()
if s[0]=='A' and s.count('C')==1 and s[1]!='C' and s[n-1]!='C':
  cnt=0
  for i in range(n):
    if s[i]!=t[i]:
      cnt+=1
  if cnt==2:
    print('AC')
    exit()
print('WA')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-
S = input()

if S[0] != 'A':
    print('WA')
elif 'C' not in S[2:-1]:
    print('WA')
else:
    i = S[2:-1].find('C')
    S = S[1:i] + S[i + 1:]
    if not S.islower():
        print('WA')
    else:
        print('AC')


# -*- coding: utf-8 -*-
S = input()

if S[0] != 'A' or 'C' not in S[2:-1]:
    print('WA')
else:
    i = S[2:-1].find('C')
    S = S[1:2 + i] + S[2 + i + 1:]
    if not S.islower():
        print('WA')
    else:
        print('AC')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S=input()
if S[0]=="A":
    if "C"in S[3:-1]:
        if S.count("C")==1:
            S.replace("A","")
            S.replace("C","")
            if S.islower():print("AC")
            else:print("WA")
        else:print("WA")
    else:print("WA")

else:print("WA")
            


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

else:print("WA")
            


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
if S[0] == "A":
    if "C" in S[2:len(S)-1]:
        S=S.replace("A","",1)
        S=S.replace("C","",1)
        print(S)
        if S.islower():
            print("AC")
            exit()
print("WA")

S = input()
if S[0] == "A":
    if "C" in S[2:len(S)-1]:
        S=S.replace("A","",1)
        S=S.replace("C","",1)
        if S.islower():
            print("AC")
            exit()
print("WA")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
if S[0] != 'A':
  print('WA')
  exit()
count = 0
if len(S) < 4:
  print('WA')
  exit()
for i in range(len(S) - 3):
  if S[i+2] == 'C':
    count += 1
  elif S[i+2].islower():
    continue
  else:
    print('WA')
    exit()
if A[1].isupper() or A[-1].isupper():
  print('WA')
  exit()
if count == 1:
  print('AC')
  exit()
print('WA')
    

S = input()
if S[0] != 'A':
  print('WA')
  exit()
count = 0
if len(S) < 4:
  print('WA')
  exit()
for i in range(len(S) - 3):
  if S[i+2] == 'C':
    count += 1
  elif S[i+2].islower():
    continue
  else:
    print('WA')
    exit()
if S[1].isupper() or S[-1].isupper():
  print('WA')
  exit()
if count == 1:
  print('AC')
  exit()
print('WA')
    

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = list(input())

if S[0] != 'A':
    print('WC')
elif 'C' not in S[2:-1]:
    print('WC')
else:
    S.remove('A')
    S.remove('C')
    for c in S:
        if c.is_upper():
            print('WC')
    else:
        print('AC')


S = list(input())

if S[0] != 'A':
    print('WA')
elif S[2:-1].count('C') != 1:
    print('WA')
else:
    S = list(S[1:])
    S.remove('C')
    S = ''.join(S)
    if S.islower():
        print('AC')
    else:
        print('WA')


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
word=input()
cflg=True
if word[0]!=A:
  cflg=False
elif word[2:-2].count('C'):
  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')

word=input()
cflg=True
if word[0]!='A':
  cflg=False
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')


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
from string import ascii_lowercase
S = input()
if not S[0] is 'A' or not S[2] is 'C':
    print('WA')
    exit()
for i in range(1,len(S)):
    if i == 2:
        continue
    if not S[i] in ascii_lowercase:
        print('WA')
        exit()
print('AC')


from string import ascii_lowercase
S = input()
if not S[0] is 'A' or not 'C' in S[2:-1]:
    print('WA'),exit()
for i in range(1,len(S)):
    if i == S.index('C'):
        continue
    if not S[i] in ascii_lowercase:
        print('WA'),exit()
print('AC')
# S[2:-1] in 'C'
# S.remove('A'),S.remove('C')
# S is all lower


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = list(input())
l = len(s)
if s[0] == 'A':
    c_cnt = 0
    for i, m in enumerate(s):
        if 1<i<l-1 & m=='C':
            cn = i
            c_cnt += 1
    if c_cnt == 1:
        tmp = s
        tmp.pop(0)
        tmp.pop(cn)
        tmp_s = ''.join(tmp)
        if tmp_s == tmp_s.lower():
            print('AC')
else:
    print('WA')



s = list(input())
l = len(s)
if s[0] == 'A':
    c_cnt = 0
    cn_l = []
    for i, m in enumerate(s):
        if 1<i<l-1 & m=='C':
            cn_l.append(i)
            c_cnt += 1
    if c_cnt == 1:
        cn = cn_l[0]
        tmp = s
        tmp.pop(0)
        tmp.pop(cn)
        tmp_s = ''.join(tmp)
        if tmp_s == tmp_s.lower():
            print('AC')
else:
    print('WA')

s = list(input())
l = len(s)
if s[0] == 'A':
    c_cnt = 0
    cn_l = []
    for i, m in enumerate(s):
        if 1<i<l-1 and m=='C':
            cn_l.append(i)
            c_cnt += 1
    if c_cnt == 1:
        cn = cn_l[0]
        tmp = s
        tmp.pop(0)
        tmp.pop(cn)
        tmp_s = ''.join(tmp)
        if tmp_s == tmp_s.lower():
            print('AC')
else:
    print('WA')

s = list(input())
l = len(s)
if s[0] == 'A':
    c_cnt = 0
    cn_l = []
    for i, m in enumerate(s):
        if 1<i<l-1 and m=='C':
            cn_l.append(i)
            c_cnt += 1
    if c_cnt == 1:
        cn = int(cn_l[0])
        tmp = s
        tmp.pop(0)
        tmp.remove('C')
        tmp_s = ''.join(tmp)
        if tmp_s == tmp_s.lower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=input()
s=list(n)
l=0
if s[0]=="A":
    for i in range(2,len(n)-1):
        if s[i]=="C":
            s[i]="c"
            k="a"
            for j in range(1,len(n)):
                k+=s[j]
            if k.islower():
                print("Yes")
                l+=1
                break
if l!=1:
    print("No")

a=input()
d=["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"]
c=0
t=len(a)
if a[0]=="A":
    p=a[2:-1]
    if "C" in p:
        k=a[1:]
        t-=1
        q=0
        for i in range(t):
            if k[i]in d:
                q+=1
        if t-1==q:
            c=1
print("WA"if c!=1else"AC")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s = s.pop(0)
  
if "C" in s[2:len(s)-1]:
  s = s.replace("C","",1)
  
if s.islower()==True:
  print("AC")
else:
  print("WA")

s = list(input())
flg = "WA"
if s[0]=="A":
  if "C" in s[2:len(s)-1]:
    s.remove("A")
    s.remove("C")
    s = *s
    if s.islower()==True:
      flg = "AC"
print(flg)

s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  
if "C" in s[2:len(s)-1]:
  s.replace("C","",1)
  
if s.islower():
  print("AC")
else:
  print("WA")

s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  
count =0
for i in range(1,-2):
  if s[i] == "C":
    s.pop(i)
    count+=1
  else:
    continue
    
if count !=1:
  print("WA")
  exit()
else:
  continue
  
if s.islower():
  print("AC")
else:
  print("WA")

s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  if s[1]!="C" or s[-2]!="C":
    print("WA")
    exit()
  else:
    s.pop(1)
    s.pop(-2)
    if s.islower():
      print("AC")
    else:
      print("WA")

s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  
if "C" in s[2:len(s)-1]:
  s.replace("C","",1)
  
if s.islower()==True:
  print("AC")
else:
  print("WA")

s = input()
if s[0]!="A":
  print("WA")
  exit()
else:
  s.pop(0)
  
count =0
for i in range(1,-2):
  if s[i] == "C":
    s.pop(i)
    count+=1    
if count !=1:
  print("WA")
  exit()
  
if s.islower():
  print("AC")
else:
  print("WA")

s = list(input())
flg = "WA"
if s[0]=="A":
  if "C" in s[2:len(s)-1]:
    s.remove("A")
    s.remove("C")
    s = ''.join(s)
    if s.islower()==True:
      flg = "AC"
print(flg)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input().rstrip()

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

f = False
for i in range(len(s)):
    if s[i] == 'C':
        if i < 2 or i >= len(s) - 2:
            print('WA')
            exit(0)
        if f:
            print('WA')
            exit(0)
        f = True
    elif not str.islower(s[i]):
        print('WA')

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


s = input().rstrip()

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

f = False
for i in range(1, len(s)):
    if s[i] == 'C':
        if i < 2 or i >= len(s) - 1:
            print('WA')
            exit(0)
        if f:
            print('WA')
            exit(0)
        f = True
    elif not str.islower(s[i]):
        print('WA')
        exit(0)

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = list(input())
flag = 0
count = 0

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

a = s.pop(0)
b = s.pop(0)
c = s.pop(-1)

if s.count('C') == 1:
    flag += 1
if flag ==2:
    s.append(b)
    s.append(c)
    print(s)
    for i in range(len(s)):
        if s[i].islower():
            count += 1
        print(count)
    if (count+1) == len(s):
        flag += 1
print(flag)
if flag == 3:
    print("AC")
else:
    print("WA")
    

s = list(input())
flag = 0
count = 0

if s[0] == 'A':
    flag += 1
#print(flag)
a = s.pop(0)
b = s.pop(0)
c = s.pop(-1)

if s.count('C') == 1:
    flag += 1
#print(flag)
if flag ==2:
    s.append(b)
    s.append(c)
    print(s)
    for i in range(len(s)):
        if s[i].islower():
            count += 1
        print(count)
    if (count+1) == len(s):
        flag += 1
##print(flag)
if flag == 3:
    print("AC")
else:
    print("WA")

s = list(input())
flag = 0
count = 0

if s[0] == 'A':
    flag += 1
#print(flag)
a = s.pop(0)
b = s.pop(0)
c = s.pop(-1)

if s.count('C') == 1:
    flag += 1
#print(flag)
if flag ==2:
    s.append(b)
    s.append(c)
    #print(s)
    for i in range(len(s)):
        if s[i].islower():
            count += 1
        #print(count)
    if (count+1) == len(s):
        flag += 1
##print(flag)
if flag == 3:
    print("AC")
else:
    print("WA")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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

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



Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
def solve(s):
    if(s[0] == "A"):
        v = s[1:]
        i = v.find("C")
        print(i)
        if(i >= 1 and i < len(s)):
            k = v[:i] + v[i+1:]
            print(k)
            if(k.islower()):
                return "AC"
    return "WA"

s = input()
print(solve(s))

def solve(s):
    if(s[0] == "A"):
        v = s[1:]
        i = v.find("C")
        if(i >= 1 and i < len(v)-1):
            k = v[:i] + v[i+1:]
            if(k.islower()):
                return "AC"
    return "WA"
 
s = input()
print(solve(s))

Verdicts: Wrong Answer

Accepted
Problem: 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.

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

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

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


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))


s = list(input())
ans = True
li = list("abcdefghijklmnopqrstuvwxyz")

if s[0]!="A":
    ans = False
memo = s[2:-1]
if not("C" in memo):
    ans = False
for i in range(len(memo)):
    if not(memo[i] in li):
        ans = False

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










#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))


s = list(input())
ans = True
li = list("abcdefghijklmnopqrstuvwxyzC")

if s[0]!="A":
    ans = False
memo = s[2:-1]
if not("C" in memo):
    ans = False
C_cnt = 0
for i in range(1,len(li)):
    if not(memo[i] in li):
        ans = False
    if memo[i] == "C":
        C_cnt += 1

if ans and C_cnt==1:
    print("AC")
else:
    print("WA")










#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))


s = list(input())
ans = True
li = list("abcdefghijklmnopqrstuvwxyzC")

if s[0]!="A":
    ans = False
memo = s[2:-1]
if not("C" in memo):
    ans = False
C_cnt = 0
for i in range(1,len(s)):
    if not(s[i] in li):
        ans = False
    if s[i] == "C":
        C_cnt += 1

if ans and C_cnt==1:
    print("AC")
else:
    print("WA")










Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

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

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
s = S[2:-1]

judge = "AC"
if S[0] != "A":
	judge = "WA"
else:
	if s.count("C") != 1:
		judge = "WA"
	else:
		S = S.replace("A", "")
		S = S.replace("C", "")
		ch = "Yes"
		print(S)
		for i in S:
			if ord(i) <= 96:
				ch = "No"
		if ch == "No":
			judge = "WA"

print(judge)

S = input()
s = S[2:-1]

judge = "AC"
if S[0] != "A":
	judge = "WA"
else:
	if s.count("C") != 1:
		judge = "WA"
	else:
		S = S.replace("A", "")
		S = S.replace("C", "")
		ch = "Yes"
		for i in S:
			if ord(i) <= 96:
				ch = "No"
		if ch == "No":
			judge = "WA"

print(judge)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
if s[0]=="A" and s[2:-2]=='C':
    print('AC')
else:
    print('WA')

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

Verdicts: Wrong Answer

Accepted