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):
large=list("BDEFGHIJKLMNOPQRSTUVWXYZ")
small=list("abcdefghijklmnopqrstuvwxyz")
s=list(input())
if s[0]!="A" or s.count("A")!=1:
  print("WA")
  exit()
t=s[3:len(s)-1]
if t.count("C")!=1:
  print("WA")
  exit()
for i in s:
  if i in large:
    print("WA")
    exit()
print("AC")

large=list("BDEFGHIJKLMNOPQRSTUVWXYZ")
small=list("abcdefghijklmnopqrstuvwxyz")
s=list(input())
if s[0]!="A" or s.count("A")!=1:
  print("WA")
  exit()
t=s[2:len(s)-1]
if t.count("C")!=1:
  print("WA")
  exit()
for i in s:
  if i in large:
    print("WA")
    exit()
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):
import re

s = input()

if not s.startswith('A'):
    print('WA')
elif s[2:len(s) - 3].count('C') == 1:
    print('WA')
elif len(re.findall('[A-Z]', s)) != 2:
    print('WC')
else:
    print('AC')


s = input()

if not s.startswith('A'):
    print('WA')
elif s[2:len(s) - 3].count('C') == 1:
    print('WA')
else:
    print('AC')

import re

s = input()

if not s.startswith('A'):
    print('WA')
elif s[2:len(s) - 1].count('C') != 1:
    print('WA')
elif len(re.findall('[A-Z]', s)) != 2:
    print('WA')
else:
    print('AC')


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 = input()

cap = S[0]
mid = list(S[2:-1])
print(mid)

if (mid.count('C') >= 1):
    index = S.index('C')
    strr = S[1:index] + S[index + 1 :]
else:
    print('WA')
    exit()


if (cap == 'A' and mid.count('C') == 1 and strr.islower() == True):
    print('AC')
else:
    print('WA')


S = input()

cap = S[0]
mid = list(S[2:-1])

if (mid.count('C') >= 1):
    index = S.index('C')
    strr = S[1:index] + S[index + 1 :]
else:
    print('WA')
    exit()


if (cap == 'A' and mid.count('C') == 1 and strr.islower() == True):
    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):
import sys
S = input()
if S[0] != 'A':
    print('WA')
    sys.exit()
    
n = len(S)
ct = 0
for i in range(1, n):
    if S[i].islower():
        if i == 1 or i == n - 1 or S[i] != 'C':
            print('WA')
            sys.exit()
        ct += 1
if ct == 1:
    print('AC')
else:
    print('WA')

import sys
S = input()
if S[0] != 'A' or :
    print('WA')
    sys.exit()
    
n = len(S)
ct = 0
for i in range(1, n):
    if S[i].islower():
        if i == 1 or i == n - 1 or S[i] != 'C':
            print('WA')
            sys.exit()
        ct += 1
if ct == 1:
    print('AC')
else:
    print('WA')

import sys
S = input()
if S[0] != 'A':
    print('WA')
    sys.exit()
    
n = len(S)
ct = 0
for i in range(1, n):
    if S[i].islower() == False:
        if i == 1 or i == n - 1 or S[i] != 'C':
            print('WA')
            sys.exit()
        ct += 1
if ct == 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()
n=len(S)
if S[0]=="A":
	if 2<=S.find("C")<=n-2:
		T=S.lstrip("A")
		R=T.replace("C","c",1)
		Q=T.replace("C","c")
		if R==Q:
			if R.lower()==R:
				print("AC")
print("WA")
			

S=input()
n=len(S)
if S[0]=="A":
	if 2<=S.find("C")<=n-2:
		T=S.lstrip("A")
		R=T.replace("C","c",1)
		Q=T.replace("C","c")
		if R==Q:
			if R.lower()==R:
				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):
A=list(input())
n=len(A)
if(A[0]!="A"):print("WA")
elif(A.count("C")!=1):print("WA")
elif(A.index("C")<2 or A.index("C")>n-2):print("WA")
else:
  A.pop(A.index("C"))
  A.pop(0)
  if(A.islower()):print("AC")
  else:print("WA")


s = input()


s1 = s[0]


s2 = s[2:-1]


s = s.replace('A','')
s = s.replace('C','')



t = s.lower()

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

s = input()
print("AC" if s[0] == "A" and s[2:len(s)-1].count("C") == 1 and s[1:].replace("C","",1).islower() else "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()
ans = 'No'
if s[0] == 'A' and 'C' in s[2:len(s)-1]:
  s = s.replace('A', '').replace('C', '')
  if all([i in [chr(i) for i in range(97, 97+26)] for i in s]):
    ans = "Yes"
print(ans)

s = input()
ans = 'WA'
if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
  s = s.replace('A', '').replace('C', '')
  if all([i in [chr(i) for i in range(97, 97+26)] for i in s]):
    ans = 'AC'
print(ans)

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:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower():
      print('WA')
      break
  else:
    print('AC')
else:
  print('AC')

s = input()

if s[0] == 'A' and s[2:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower() or letter == 'C':
      print('WA')
      break
  else:
    print('AC')
else:
  print('AC')


s = input()

if s[0] == 'A' and s[2:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower() or letter != 'C':
      print('WA')
      break
  else:
    print('AC')
else:
  print('AC')


s = input()

if s[0] == 'A' and s[2:-1].count('C') == 1:
  for letter in s[1:]:
    if letter != letter.lower() and letter != 'C':
      print('WA')
      break
  else:
    print('AC')
else:
  print('WA')


Verdicts: 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()
lead = S[0]
sub = S[2:-1]
C = sub.count('C')
if lead == 'A' and C == 1:
  for x,i in enumerate(1,len(S)):
    if i =='C' and ( 2<= x < len(S)-2):
      pass
    else:
      if i.islower():
        pass
      else:
        print('WA')
        exit()
  print('AC')
  exit()
else:
  print('WA')

import re
x = input()
C_index = 0
def calc1():
    return x[0] == 'A'

def calc2():
    if len(re.findall('C', x[2:-2])) == 1:
        C_index = int(x.find('C'))
        return  True


def calc3():
    for i in range(0,len(x)):
        if x[i] ==  x[0] or x[i] == x[C_index]:
            continue
        elif x[i].isupper():
            return False
            break
        else:
            continue
        return True
     

if calc1() and calc2() and calc3():
    print('AC')
else:
    print('WA')

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

Verdicts: 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):
S = input()

#c_index = S.index('C')
if S[0] != 'A':
    print('WA')
    quit()
elif S.count('C') != 1:
    print('WA')
    quit()
c_index = S.index('C')
elif 2 > c_index or c_index > len(S) - 2:
    print('WA')
    quit()
else:
    disc = S[1:c_index] + S[c_index + 1:]
alpha = 'abcdefghijklmnopqrstuvwxyz'
for i in range(len(disc)):
    if not disc[i] in alpha:
        print('WA')
        quit()
    else:
        continue
print('AC')

S = input()

C_S = S[2 : len(S) - 1]


if S[0] != 'A':
    
    print('WA')
    quit()
    #break
if not 'C' in C_S and C_S.count('C') != 1:
    
    #break
    print('WA')
    quit()
c_index = S.index('C')
alpha = 'abcdefghijklmnopqrstuvwxyz'
for i in range(len(S)):
    if i == 0 or i == c_index:
        continue
    elif S[i] not in alpha:
        
        #break
        print('WA')
        quit()
    else:
        continue
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':
        return 'WA'
    if s[3:len(s)-1].count('C')!=1:
        return 'WA'
    s=s.split('A').split('C')
    if not s.islower():
        return 'WA'
    return 'AC'
  
s=input()
print(solve(s))
    	


def solve(s):
	if s[0]!='A':
    	return 'WA'
    if s[3:len(s)-1].count('C')!=1:
    	return 'WA'
    s=s.split('A').split('C')
    if not s.islower():
    	return 'WA'
    return 'AC'
  
s=input()
print(solve())
    	

def solve(s):
    if s[0]!='A':
        return 'WA'
    if s[3:len(s)-1].count('C')!=1:
        return 'WA'
    s=s.split('A').split('C')
    if not s.islower():
        return 'WA'
    return 'AC'
  
s=input()
print(solve(s))
    	


def solve(s):
    if s[0]!='A':
        return 'WA'
    if s[3:len(s)-1].count('C')!=1:
        return'WA'
    s=s.split('A').split('C')
    if not s.islower():
        return'WA'
    return'AC'
  
s=input()
print(solve(s))
    	


def solve(s):
    if s[0]!='A':
        return 'WA'
    if s[3:len(s)-2].count('C')!=1:
        return 'WA'
    s=str(s.split('A'))
    s=str(s.split('C'))
    if not s.islower():
        return 'WA'
    return 'AC'
  
s=input()
print(solve(s))
    	


def solve(s):
    if s[0]!='A':
        return 'WA'
    if s[3:len(s)-2].count('C')!=1:
        return 'WA'
    s=str(s.split('A'))
    s=str(s.split('C'))
    if not s.islower():
        return 'WA'
    return 'AC'
  
s=input()
print(solve(s))
    	


def solve(s):
    if s[0]!='A':
        return 'WA'
    if s[2:len(s)-1].count('C')!=1:
        return 'WA'
    s=str(s.split('A'))
    s=str(s.split('C'))
    if not s.islower():
        return 'WA'
    return 'AC'

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

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):
if S[0] == "A" and S[2:-1].count("C") == 1:
    i =  S.index("C")
    S = S[1:i] + S[i+1:]
    if S.islower():
        print("AC")
    else:
        print("WA")
else:
        print("WA")

S = input()
accept = False

if S[0] == "A" and S[2:-1].count("C") == 1:
    i =  S.index("C")
    S = S[1:i] + S[i+1:]
    if S.islower():
        accept = True

if accept:
    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="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')

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

s=input()

def check(s):
    if not s[0] == 'A':
        return False
    if not s[2:-1].count('C') == 1:
        return False
    
    count=0
    
    for i in s[1:]:
        if not i.lower() == i:
            count+=1
            if count>1:
                return False
        
    return True
print("AC" if check(s) else "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 = input()

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

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

s = s.replace('C',"")

if s[1:].isLower():
        print('AC')
else:
        print('WA')

s = input()

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

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

s = s.replace('C',"")

if s[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):
yandy
S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1:
    c = S.index('C')
    if S[1:c].islower() and S[c+1:].islower():
        print('AC')
        exit()


print('WA')


s = input()

if s[0]=="A" and s[2:-1].count("C")==1 and s[1:].replace("C","a",1).islower()==True:
  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())

ac = False
if S[0] == "A":
    if S[2:len(S)-1].count("C") == 1:
        ac = True

upper = False
count = 0
for i in S:
    if i.isupper():
        count += 1

if count == 1:
    upper = True

if ac and upper:
    print("AC")
else:
    print("WA")


S = list(input())

ac = False
if S[0] == "A":
    if S[2:len(S)-1].count("C") == 1:
        ac = True

 upper = False
 count = 0
for i in S[2:len(S)-1]:
    if i.isupper():
        count += 1

if count == 1:
    upper = True

if ac and upper:
    print("AC")
else:
    print("WA")


S = list(input())

ac = False
if S[0] == "A":
    if S[2:len(S)-1].count("C") == 1:
        ac = True

upper = False
count = 0
for i in S:
    if i.isupper():
        count += 1

if count == 2:
    upper = True

if ac and upper:
    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):
import string

s = list(input())
flag = True
if s[0] != "A":
    flag = False
s.pop(0)
if s.count("C") > 1:
    flag = False
s_index = s.index("C")
if 2 >= s_index or s_index <= (len(s) - 3):
    flag = False
s.pop(s_index)
for i in s:
    if i not in string.ascii_lowercase:
        flag = False

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


import string

s = list(input())
flag = True
if s[0] != "A":
    flag = False
count = 0
for i in range(1, len(s)):
    if s[i] in string.ascii_uppercase:
        if i == 1 or i == len(s) - 1 or s[i] != "C":
            flag = False
        count += 1

if flag and count == 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):
def checker():
    s = input()
    if s[0] != "A":
        return 0
    if "C" not in s[2:-1]:
        return 0
    return 1

l = ["AC", "WA"]

print(l[checker()])

def checker():
    s = input()
    if s[0] != "A":
        return 0
    if s[2:-1].count("C") != 1:
        return 0
    s.pop(0)
    s.pop(s.index("C"))
    if s != s.lower():
        return 0
    return 1

l = ["WA", "AC"]

print(l[checker()])

def checker():
    s = input()
    if s[0] != "A":
        return 0
    if "C" in s[2:-1]:
        s[2:-1].pop(s[2:-1].index("C"))
        if "C" in s[2:-1]:
            return 0
        else:
            return 1
    return 1

l = ["WA", "AC"]

print(l[checker()])

def checker():
    s = input()
    if s[0] != "A":
        return 0
    if s[2:-1].count("C") != 1:
        return 0
    num = s.index("C")
    s = s[1:num] + s[num+1:]
    if s != s.lower():
        return 0
    return 1

l = ["WA", "AC"]

print(l[checker()])


Verdicts: Wrong Answer

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

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

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 = [i for i in input()]
print(S[2:-2])
if S[0]=="A" and S[2:-1].count("C")==1:
    S.remove("A")
    S.remove("C")
    if "".join(S).islower():
            print("AC")
    else:
        print("WA")
else: 
    print("WA")

S = [i for i in input()]
if S[0]=="A":
    if S[3:-2].count("C")==1:
        S.remove("A")
        S.remove("C")
        if "".join(S).islower():
            print("AC")
        else:
            print("WA")
    print("WA")
print("WA")

S = [i for i in input()]
if S[0]=="A" and S[3:-2].count("C")==1  :
    S.remove("A")
    S.remove("C")
    if "".join(S).islower():
            print("AC")
    else:
        print("WA")
else: 
    print("WA")

S = [i for i in input()]
if S[0]=="A" and S[2:-1].count("C")==1:
    S.remove("A")
    S.remove("C")
    if "".join(S).islower():
            print("AC")
    else:
        print("WA")
else: 
    print("WA")

Verdicts: 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("AC" if(s[0] == "A" and s[2:len(s)-1].count("C") == 1 and (s[1:s.find('C')]+s[s.find('C')+1:]).islower())


s = input()
print("AC" if(s[0] == "A" and s[2:len(s)-1].count("C") == 1 and (s[1:s.find('C')]+s[s.find('C')+1:]).islower()) else "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):
# ABC104B - AcCepted
s = input().rstrip()
if (
    s[0] == "A"
    and s[2:-1].count("C") == 1
    and s.translate(str.maketrans({"A": None, "C": None}).islower()
):
    print("AC")
else:
    print("WA")

# ABC104B - AcCepted
def main():
    S = input().rstrip()
    flags = [S[0] == "A", S[2:-1].count("C") == 1, S.translate(str.maketrans({"A": None, "C": None})).islower()]
    print("AC" if all(flags) else "WA")


if __name__ == "__main__":
    main()


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()
if S[0] != "A":
  print("WA")
  exit()
elif S[2:-2].count("C") != 1:
  print("WA")
  exit()
else:
  if S.count("C") != 0:
    print("WA")
  else:
    S = S[1:].replace("C", "")
    if S.islower():
      print("AC")
    else:
      print("WA")

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

S = input()
if S[0] != "A":
  print("WA")
  exit()
elif S[2:-1].count("C") != 1 or S[:2].count("C") != 0 or S[-1:].count("C") != 0:
  print("WA")
  exit()
else:
  S = S[1:].replace("C", "")
  if S.islower():
    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):
S = input()

cA = S[0:1] == "A"
cC = False
if(S[2:-1].find("C") != -1 and S[2:-1].count("C") == 1):
    S = S[1:] + S[2:-1].strip("C") + S[-1:]
    cC = S.islower()
if(cA and cC):
    print("AC")
else:
    print("WA")

S = input()

cA = S[0:1] == "A"
cC = False
if(S[2:-1].count("C") == 1):
    A = S[1:2] + S[2:-1].replace("C", "") + S[-1:]
    # print(S)
    cC = A.islower()
if(cA and cC):
    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()
flag=False

if S[0]=="A":
  if S[2:-1].count("C")==1:
    pos=S.find("C")
    T=S[1:pos]+S[pos+1:]
    if T.islower():
      print("AC")
      flag=True
      
if flag=False:
  print("WA")

S=input()
flag=False

if S[0]=="A":
  if S[2:-1].count("C")==1:
    pos=S.find("C")
    T=S[1:pos]+S[pos+1:]
    if T.islower():
      print("AC")
      flag=True
      
if flag==False:
  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):
letters = input()
C = letters[2:-2]
D = letters.replace("A","a").replace("C","c")

print(D)
if letters[0] == "A" and C.count("C") == 1 and D.islower() == True  :
  print("AC")
else:
  print("WA")

letters = input()
C = letters[2:-1]
D = letters.replace("A","a").replace("C","c")

if letters[0] == "A" and C.count("C") == 1 and D.islower() == True  :
  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):
import copy
s=list(input())
if s[0]=='A' and 'C' in s[2:len(s)] :
  t=copy.copy(s)
  s.remove('A')
  s.remove('C')
  result=''.join(s)
  if len(s)==len(t)-2 and result.islower()==True and t[s-1]!='C':
    print('AC')
  else:
    print('WA')
    
else:
  print('WA')


import copy
s=list(input())
if s[0]=='A' and 'C' in s[2:len(s)] :
  t=copy.copy(s)
  s.remove('A')
  s.remove('C')
  result=''.join(s)
  if len(s)==len(t)-2 and result.islower()==True and t[len(s-1)]!='C':
    print('AC')
  else:
    print('WA')
    
else:
  print('WA')


import copy
s=list(input())
if s[0]=='A' and 'C' in s[2:len(s)] :
  t=copy.copy(s)
  s.remove('A')
  s.remove('C')
  result=''.join(s)
  if len(s)==len(t)-2 and result.islower==True:
    print('AC')
  else:
    print('WA')
    
else:
  print('WA')

import copy
s=list(input())
if s[0]=='A' and 'C' in s[2:len(s)] :
  t=copy.copy(s)
  s.remove('A')
  s.remove('C')
  result=''.join(s)
  if len(s)==len(t)-2 and result.islower()==True and t[-1]!='C':
    print('AC')
  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):
S=list(input())
if S[0]=='A' and S[2:len(S)].count('C')==1:
    S[2:len(S)].remove('C')
    del S[0]
    if str(S).islower():
        print('AC')
    else:
        print('WA')
else:
    print('WA')

s=input()
if s[0]=='A' and s[2:-1].count('C')==1:
    for i in range(len(s[2:-1])):
        if s[2:-1][i]=='C':
            ind=i+2
    ss=s[1:ind]+s[ind+1:]
    if ss==ss.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):
S = input()
flag = True
if S[0] == 'A':
    pass
else:
    flag = False

cnt = 0
for i in range(len(S)-3):
    if S[3+i] =='C':
        cnt += 1
if cnt == 1:
    pass
else:
    flag=False

cnt = 0
for i in range(len(S)):
    if S[i].islower():
        cnt += 1
if cnt == 2:
    pass
else:
    flag=False

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

S = input()
flag = True
if S[0] == 'A':
    pass
else:
    flag = False

cnt = 0
for i in range(len(S)-3):
    if S[2+i] =='C':
        cnt += 1

if cnt == 1:
    pass
else:
    flag=False
cnt = 0
for i in range(len(S)):
    if S[i].islower():
        cnt += 1
if cnt == len(S)-2:
    pass
else:
    flag=False
if flag:
    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()
if s[0] == "A" and s[2:-1].count("C") == 1:
  index_C = s.find("C")
  print(index_C)
  if s[1:index_C].islower() and s[index_C+1:].islower():
    print("AC")
  else:
    print("WA")
else:
  print("WA")

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

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

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

Verdicts: Wrong Answer

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()
if s[0]!='A' or s[2:-1].count('C')!= 1:
  print('WA')
  exit()
  
for c in s[1:]:
  if not('a'<= c <= 'z') or c=='C':
    print('WA')
    break
else:
  print('AC')

s = input()
if s[0]!='A' or s[2:-1].count('C')!= 1:
  print('WA')
  exit()
  
for c in s[1:]:
  if not(('a'<= c <= 'z') or  c=='C'):
    print('WA')
    break
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):
import sys
def check_small(string):
    if string in 'abcdefghijklmnopqrstuvwxyz':
        return True
    else:
        return False

s = input()
if s[0] != 'A':
    print('WA')
    sys.exit()
if check_small(s[-1]) == False:
    print('WA')
    sys.exit()
count = 0
for si in s[3:]:
        if si == 'C':
            count += 1
        elif check_small(si) == False:
            print('WA')
            sys.exit()
print('AC' if count == 1 else 'WA')

import sys
def check_small(string):
    if string in 'abcdefghijklmnopqrstuvwxyz':
        return True
    else:
        return False

s = input()
if s[0] != 'A':
    print('WA')
    sys.exit()
if check_small(s[-1]) == False:
    print('WA')
    sys.exit()
count = 0
for si in s[3:]:
        if si == 'C':
            count += 1
print('AC' if count == 1 else 'WA')




import sys
def check_small(string):
    if string in 'abcdefghijklmnopqrstuvwxyz':
        return True
    else:
        return False

s = input()
if s[0] != 'A':
    print('WA')
    sys.exit()
if check_small(s[-1]) == False or check_small(s[1]) == False:
    print('WA')
    sys.exit()
count = 0
for si in s[2:]:
        if si == 'C':
            count += 1
        elif check_small(si) == False:
            print('WA')
            sys.exit()
print('AC' if count == 1 else '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):
import random as r;print(r.choice(["AC","WA"]))

import re;print("AC"if re.match("A[a-z]+C[a-z]+$",input())else"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()

f = 1
c = 0

for i in range(len(s)):
    on = 0
    if i==0:
        if not s[i]=='A':
            f = 0
            on = 1
    elif i>=2 and i<=len(s)-2:
        if s[i] == 'C':
            c += 1
            on = 1
            
    if on == 0 and s[i].islower()==False:
        f = 0
        
if c!=1:
    f=0
    
if f==0:
    print("WA")
else:
    print("AC")

s = input()

f = 1
c = 0

for i in range(len(s)):
    on = 0
    if i==0:
        if not s[i]=='A':
            f = 0
        else:
            on = 1
    elif i>=2 and i<=len(s)-2:
        if s[i] == 'C':
            c += 1
            on = 1
            
    if on == 0 and s[i].islower()==False:
        f = 0
        
if c!=1:
    f=0
    
if f==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 = input()
print('AC' if s[1] == 'A' and 'C' in s[3:-1] and s[1:].replace('C','',1).islower() else 'WA')

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

s = input()
print('AC' if s[0] == 'A' and 'C' in s[2:-1] and s[1:].replace('C','',1).islower() else '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 = input()
flag = True
count = 0
if not S[0] == "A":
  flag = False
for i in range(2,len(S)-1):
  if S[i] == "C":
    count += 1
  else:
    if not S[len(S)].islower():
      flag = False 
if not S[len(S)].islower():
  flag = False
if not count == 1:
  flag = False
if flag:
  print("AC")
else:
  print("WA")

S = input()
flag = True
count = 0
if not S[0] == "A":
  flag = False
for i in range(2,len(S)-1):
  if S[i] == "C":
    count += 1
  else:
    if not S[i].islower():
      flag = False
if not S[1].islower():
  flag = False
if not S[len(S)-1].islower():
  flag = False
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()
C1=S[0]=='A' and S[-1].islower()
C1=C1 and S[1].islower()
C2=0
C3=0
for i in S[2:len(S)-1]:
  if i=='C':
    C2+=1
  elif i.islower():
  else:
    C3+=1
if C1 and C2==1 and C3==0:
  print('AC')
else:
  print('WA')


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

S=input()
C1=S[0]=='A' and S[-1].islower()
C1=C1 and S[1].islower()
C2=0
C3=0
for i in S[2:len(S)-1]:
  if i=='C':
    C2+=1
  elif i.islower():
    C3=C3
  else:
    C3+=1
if C1 and C2==1 and C3==0:
  print('AC')
else:
  print('WA')


Verdicts: 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):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

s = ns()
ok = False
if s.startswith("A"):
    if s[2:-1].count("C") == 1:
        ct = 0
        for c in s:
            if "a" <= c <= "z":
                ct += 1
        if ct == len(s)-2:
            ok = True
print("AC" if ok else "WA")


import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

s = ns().rstrip()
ok = False
if s.startswith("A"):
    if s[2:-1].count("C") == 1:
        ct = 0
        for c in s:
            if "a" <= c <= "z":
                ct += 1
        if ct == len(s)-2:
            ok = True
print("AC" if ok else "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())

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

s = list(input())
 
if s[0] == "A" and s[2:-1].count("C") == 1:
    s.remove("C")
    s.pop(0)
    s_ = "".join(s)
    if s_.islower() == True:
        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):
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")

i=input()
if i[0]=="A"and i[2:-1].count("C")==1\
and i[1:].replace("C","c",1).islower()==True:
    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()

a = S[0] == 'A'
b = S[2:-2].count('C') == 1
if a and b:
    S = list(S)
    print(S)
    print(S[-1])
    S_1 = S[2:-2]
    S_1.remove('C')
    S = S[0:2] + S_1 + S[-2:]
    del S[0]
    print(S)
    c = str(S).islower()

if a and b and c:
    print('AC')
else:
    print('WA')


S = input()

a = S[0] == 'A'
b = S[2:-1].count('C') == 1
if a and b:
    S = list(S)
    S_1 = S[2:-1]
    S_1.remove('C')
#    print(S[0:2])
#    print(S_1)
#    print(S[-1:])
    S = S[0:2] + S_1 + S[-1:]
    del S[0]
#    print(S)
    c = str(S).islower()

if a and b and c:
    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=str(input())
f=s[0]=="A" and s[2:-1].count("C")==1
g=(s[:2]+s[2:-1].replace("A","a").replace("C","c")+s[-1]).islower()
h=f and g
print("AC" if h is True else "WA")

s=str(input())
f=s[0]=="A" and s[2:-1].count("C")==1
g=(s[1]+s[2:-1].replace("A","a").replace("C","c")+s[-1]).islower()
h=f and g
print("AC" if h is True else "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()
result=""
count=0
l=len(s)
if s[0]!="A":
  result="WA"
elif ord(s[1:2])<97 or ord(s[l-1])<97:
  result="WA"
for i in s[2:l-1]:
  if ord(i)<97:
    count+=1
  if count>1:
    result="WA"
    break
if count==0:
  result="WA"
print(result)


s=input()
result=""
count=0
l=len(s)
for i in range(l):
  if i==0 and s[i]="A":
    result="WA"
    break
  elif i==1 and ord(s[1])<97 
    result="WA"
    break
  elif i==l-1 and ord(s[l-1])<97:
    result="WA"
    break
  else:
    if ord(i)<97:
      count+=1
    if count>1:
      result="WA"
      break
if result!="WA"
  result="AC"
print(result)


s=input()
result=""
count=0
l=len(s)
if s[0]!="A":
  result="WA"
elif ord(s[1:2])<97 or ord(s[l-1])<97:
  result="WA"
for i in s[2:l-1]:
  if ord(i)<97:
    count+=1
  if ord(i)<97 and i!="C":
    result="WA"
    break
  if count>1:
    result="WA"
    break
if count==0:
  result="WA"
if result!="WA":
  result="AC"
print(result)

Verdicts: Wrong Answer

Runtime Error

Accepted