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):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

s = s()

if s[0] != "A":
	f1 = True  
cnt = 0
for i in range(2,len(s)-1):
	if s[i] == "C":
		cnt += 1
if cnt1 == 1:
	f2 =True
cnt2 = 0
for i in range(1,len(s)):
	if s[i].islower():
		cnt2 += 1
if cnt2 >= len(s) -2:
	f3 = True

if f1 and f2 and f3:
	print("AC")
else:
	prinet("WA")

def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

s = s()

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

def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

s = s()

flag = 0
if s[0] == "A":
	flag += 1 
cnt1 = 0
for i in range(2,len(s)-1):
	if s[i] == "C":
		cnt1 += 1
if cnt1 == 1:
	flag += 1
cnt2 = 0
for i in range(1,len(s)):
	if s[i].islower():
		cnt2 += 1
if cnt2 >= len(s) -2:
	flag += 1

if flag == 3:
	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):
import re

s = input()
test = re.match(r"^A[a-z]{2,}C[a-z]+$", s)
if test:
    print('AC')
else:
    print('WA')


import re

s = input()
test = re.match(r"^A[a-z]+C[a-z]+$", s)
if test:
    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':
  print('WA')
elif S[2:-2].count('C') != 1:
  print('WA')
else:
  cindex = S.index('C')
  for i in range(len(S[1:])):
    if i == cindex:
      continue
    if S[i+1].isupper():
      print('WA')
      exit()
  print('AC')
    
    
     

S = input()
if S[0] != 'A':
  print('WA')
elif S[2:-1].count('C') != 1:
  print('WA')
else:
  cindex = S.index('C')
  for i in range(len(S[1:])):
    if i+1 == cindex:
      continue
    if S[i+1].isupper():
      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):
S = list(input())
count = 0
if S[0] == 'A':
    for i in range(2,len(S)-1):
        if S[i] == 'C':
            count += 1
        elif S[i].lower != S[i]:
            print('WA')
            exit()
    if count == 1:
        print('AC')
    else:
        print('WA')
else:
    print('WA')

S = list(input())
count = 0
if S[0] == 'A':
    S[0] = S[0].lower()
else:
    print('WA')
    exit()

count = 0
for i in range(2,len(S)-1):
    if S[i] == 'C' and count == 0:
        count += 1
        S[i] = S[i].lower()

if count == 0:
    print('WA')
    exit()

for i in range(len(S)):
    if S[i] != S[i].lower():
        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):
#coding:utf-8
s=input()
count=True
dumy=0
if(s[0]=="A"):
  for i in range(2,len(s)-2):
    if(s[i]=="C"):
      dumy+=1
else:
  count=False
if(dumy>1 and dumy==0):
  count=False
dumy=0
for i in range(len(s)):
  if(s[i]>"A" and s[i]<"Z"):
    dumy+=1
if(dumy!=2):
  count=False
if(count==False):
  print("WA")
else:
  print("AC")

#coding:utf-8
s=input()
count=True
dumy=0
for i in range(len(s)):
  if(s[i]>="A" and s[i]<="Z"):
    dumy+=1
if(dumy!=2):
  count=False
dumy=0
if(s[0]=="A"):
  for i in range(2,len(s)-1):
    if(s[i]=="C"):
      dumy+=1
else:
  count=False
if(dumy!=1):
  count=False
if(count==False):
  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):
t=list(input())

if t[0]=="A" and not t[1]=="C" and not t[-1]=="C":
    rs=1
else:
    rs=0

if t[1].isupper()==True or t[-1].isupper()==True:
    rs -=1

del t[:2]
del t[-1]

if not t.count("C")==1:
    rs -=1

if rs==1:
    t.remove("C")

for i in t:
    if i.isupper()==True:
        rs -=1

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

print(rs)


t=list(input())

if t[0]=="A" and not t[1]=="C" and not t[-1]=="C":
    rs=1
else:
    rs=0

if t[1].isupper()==True or t[-1].isupper()==True:
    rs -=1

del t[:2]
del t[-1]

if not t.count("C")==1:
    rs -=1

if rs==1:
    t.remove("C")

for i in t:
    if i.isupper()==True:
        rs -=1

if rs==1:
    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())
A_check = []
C_check = []
lower_check = []

for i in range(len(S)):
    if S[i] == 'A':
        A_check.append(i)
    
    if S[i] == 'C':
        C_check.append(i)
    
    if S[i].islower():
        lower_check.append(i)
        

if len(A_check) != 1 or len(C_check) != 1 or len(lower_check) != (len(S) - 2):
    print('WA')
elif A_check[0] != '0' or C_check[0] == len(S) - 1 or C_check[0] < 2:
    print('WA')
else:
    print('AC')


S = list(input())
A_check = []
C_check = []
lower_check = []

for i in range(len(S)):
    if S[i] == 'A':
        A_check.append(i)
    
    if S[i] == 'C':
        C_check.append(i)
    
    if S[i].islower():
        lower_check.append(i)
        

if len(A_check) != 1 or len(C_check) != 1 or len(lower_check) != (len(S) - 2):
    print('No')
elif A_check[0] != '0' or C_check[0] == len(S) - 1 or C_check[0] < 2:
    print('No')
else:
    print('Yes')

S = list(input())
A_check = []
C_check = []
lower_check = []

for i in range(len(S)):
    if S[i] == 'A':
        A_check.append(i)
    
    if S[i] == 'C':
        C_check.append(i)
    
    if S[i].islower():
        lower_check.append(i)
        

if len(A_check) != 1 or len(C_check) != 1 or len(lower_check) != (len(S) - 2):
    print('WA')
elif A_check[0] != 0 or C_check[0] == len(S) - 1 or C_check[0] < 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):

import sys


def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

S = IS()
if S[0] == "A" and S[2] == "C" and islower(S[1])==True  and islower(S[3:]):
    print("AC")
else:
    print("WA")



import sys


def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

S = IS()
if S[0] == "A" and S.count("C") == 1 and S[-1] != "C":
    if S[1].islower() == True:
        if S[S.index("C")+1:].islower() == True:
            print("AC")
        else:
            print("WA")
    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 = list(input())
def h(list):
    count = 1
    C_count = 0
    for i in list:
        if len(list)-2>=count >= 3 and i == "C":
            C_count+=1
        count+=1
    return False

if (s[0] == "A" and h(s)):
    print("AC")
else:
    print("WA")

s = list(input())
ans = []
flag = 0
counter = 0
for i in range(len(s)):
    if (i == 0 and s[i] == "A"):
        ans.append(1)
        counter = 1
    elif (i == 0 and s[i] != "A" and s[i].isupper()):
        print("WA")
        exit()
    elif (2 <= i <= len(s) - 2 and s[i] == "C" and flag ==0):
        ans.append(1)
        flag = 1
        counter = 1
    elif (2 <= i <= len(s) - 2 and s[i] == "C" and flag == 1):
        print("WA")
        exit()
    elif (counter == 0 and s[i].isupper()):
        print("WA")
        exit()
    counter = 0
if (len(ans) == 2):
    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()
sl = []
ans = 'AC'

for i in S:
    sl.append(i)
if sl[0] != 'A':
    ans = 'WA'
if sl[2:-1].count('C') != 1:
    ans = 'WA'

if sl[1:].replace("C","c",1).islower() == False:
    ans = 'WA'
#print(sl)
print(ans)

S = input()
sl = []
ans = 'AC'

for i in S:
    sl.append(i)
if S[0] != 'A':
    ans = 'WA'
if S[2:-1].count('C') != 1:
    ans = 'WA'

if S[1:].replace("C","c",1).islower() == False:
    ans = 'WA'
#print(sl)
print(ans)

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

s = input()
ans = 'WA'
if s[0] == 'A' and s[2:-1].count('C') == 1\
   s.replace('A', '').replace('C', '').islower():
  ans = 'AC'
print(ans)nn

s = input()
ans = 'WA'
if s[0] == 'A' and (s[3] == 'C' or s[-2] == 'C') and s[3]+s[-2] != 'CC' and s.islower():
  ans = 'AC'
print(ans)

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


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

S = input()
if S[0] == 'A':
    S = 'a' + S[1:]
    if S[2:-1].count('C') == 1:
        S = S[:S.index('C')] + 'c' + S[S.index('C')+1:]
        if S.islower():
            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):
import re
print("AC"if re.match("/^A[a-z]+C[a-z]+$/",input())else"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()
ans="WA"
if S[0]=="A" and S[2:-1].count("C")==1:
  s=S.find("C",2,-1)-
  SS=S[1:s]+S[s+1:]
  if SS.islower() is True:
    ans="AC"
print(ans)

S=input()
ans="WA"
if S[0]=="A" and S[2:-1].count("C")==1:
  s=S.find("C",2,-1)
  S=S[1:s]+S[s+1:]
  if S.islower() is True:
    ans="AC"
print(ans)

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):
import sys
s=input()
cnt=0
if s[0]!='A':
    print('WA')
elif s[1].isuper():
    print('WA')
elif s[-1].isuper():
    print('WA')
else:
    for i in range(2,len(s)-1):
        if s[i]=='C':
            cnt+=1
        else:
            if s[i].isupper():
                print('WA')
                sys.exit()
    if cnt==1:
        print('AC')
    else:
        print('WA')

import sys
s=input()
cnt=0
if s[0]!='A':
    print('WA')
elif s[1].isupper():
    print('WA')
elif s[-1].isupper():
    print('WA')
else:
    for i in range(2,len(s)-1):
        if s[i]=='C':
            cnt+=1
        else:
            if s[i].isupper():
                print('WA')
                sys.exit()
    if cnt==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 = str(input())
tmp = 0
cnt = 0

if s[0]=='A':
    tmp += 1
if s.count('C', 2, len(s))==1:
    tmp += 1


if tmp!=2:
    print('WA')
    
else:
    list(s).remove('A')
    list(s).remove('C')
    t = s.upper()

    for i in range(len(s)):
        if s[i]!=t[i]:
            cnt += 1

    if cnt==len(s):
        print('AC')
    else:
        print('WA')

s = str(input())
cnt = 0

if s[0]=='A' and s.count('C', 2, -1)==1:
        del list(s)[0]
        del list(s)[s.find('C', 1, -1)]
        t = s.upper()
        
        for i in range(len(s)):
            if s[i]==t[i].lower():
                cnt += 1
        if cnt==len(s):
            print('AC')
        else:
            print('WA')

else:
    print('WA')

s = str(input())
cnt = 0
lst = []

if s[0]=='A' and s.count('C', 2, -1)==1:

    for i in range(1,len(s)):
        if s[i] != s[s.find('C',2, -1)]:
            lst.append(s[i])

    t = ''.join(lst)

    if t== str(t.upper()).lower():
        print('AC')
    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 = input()
check = 0
if s[0] == "A":
  if s[2:len(s)-1].count("C") == 1:
    if s[1].lower() == s[1] and s[len(s)-1].lower() == s[len(s)-1]:
      s.lstrip("C")
      if s[1:len(s)].lower() == s[1:len(s)]:
        check = 1
        
if check == 0:
  print("WA")
else:
  print("AC")
      
    
    
    

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

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

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):
def is_upper_case(s):
  return not (ord('a') <= ord(s) <= ord('z'))

S = input()

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

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

upper_num = map(is_upper_case, S).count(True)

if upper_num != 2: # expected only 'A', 'C'
  print("WA")
  exit()

print("AC")


def is_upper_case(s):
  return not (ord('a') <= ord(s) <= ord('z'))

S = input()

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

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

upper_num = list(map(is_upper_case, S)).count(True)

if upper_num != 2: # expected only 'A', 'C'
  print("WA")
  exit()

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

S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1:
    S.replace('A', 'a', 1).replace('C', 'c', 1)
    if S == S.lower():
        print('AC')
        sys.exit()

print('WA')

import sys

S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1:
    s = S.replace('A', 'a', 1).replace('C', 'c', 1)
    if s == S.lower():
        print('AC')
        sys.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()
judge='AC'
cnt = 0

for i, s in enumerate(S):
    if i == 0:
        if s == 'A':
            continue
        else:
            judge='WA'
            break
    elif i == 2 and i > (len(S) - 2):
        if s == 'C':
            cnt += 1
            continue
    
    if s.isupper():
        judge = 'WA'
        break

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


S=input()
judge='AC'
cnt = 0

for i in len(S):
    if S[i].isupper():
        if i == 0 or i == len(S) - 2 or S[i] != 'C':
            judge = 'WA'
        cnt+=1

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


S=input()
judge='AC'
cnt = 0
for i, s in enumerate(S):
    if i == 0:
        if s != 'A':
            judge = 'WA'
            break
    elif i > 1 and i < len(s) - 2:
        if s == 'C':
            cnt += 1
            continue
    if s.isupper():
        judge = 'WA'
        break

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


S=input()

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

S=input()
judge='AC'
cnt = 0

for i in range(len(S)):
    if S[i].isupper():
        if i == 0 or i == len(S) - 2 or S[i] != 'C':
            judge = 'WA'
        cnt+=1

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


S=input()

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

Verdicts: Wrong Answer

Runtime Error

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

S = list(input())
C = S[2:-1]
if S[0] == "A" and "C" in C and C.count("C") == 1:
    S.remove("A")
    S.remove("C")
    print(S)
    T="".join(S)
    print(T)
    Y=T.lower()
    if T == Y:
        print("AC")
    else:
        print("WA")
else:
    print("WA")


import re
ans=re.match("A[a-z]+C[a-z]+$",input())
print("AC" if ans else "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()
def end():
    print("WA")
    exit()
if s[0] != 'A':
    end()
flag = False
for i in s[3:-1]:
    if i == 'C':
        if flag:
            end()
        flag = True
if not flag:
    end()

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

print("AC")

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

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

print("AC")

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):
def isAC(S):
    if S[0] != 'A':
        return False
    if S[2:-1].count('C') != 1:
        return False
    S = S.remove('C')
    if not all('a' <= x <= 'z' for x in S):
        return False
    return True

print('AC' if isAC(input()) else 'WA')

def isAC(S):
    if S[0] != 'A':
        return False
    if S[2:-1].count('C') != 1:
        return False
    S = S[1:].replace('C', '')
    if not all('a' <= x <= 'z' for x in S):
        return False
    return True

print('AC' if isAC(input()) 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):
S = input()
cheack1 = False
cheack2 = False
cheack3 = False
count = 0

if S[0]=='A':
    cheack1=True
    S = S.replace("A", "a")

if S[1]=="C" or S[int(len(S))-1]=="C":
    cheack2==False
else:
    for i in range(2, int(len(S))-1):
        if S[i]=="C":
            count += 1

    if count==1:
        cheack2=True
        S = S.replace("C","c")

cheack3 = S.islower()

print(str(cheack1)+" "+str(cheack2)+" "+str(cheack3))
if cheack1 and cheack2 and cheack3:
    print("AC")
else:
    print("WA")

S = input()
cheack1 = False
cheack2 = False
cheack3 = False
count = 0

if S[0]=='A':
    cheack1=True
    S = S.replace("A", "a")

if S[1]=="C" or S[int(len(S))-1]=="C":
    cheack2==False
else:
    for i in range(2, int(len(S))-1):
        if S[i]=="C":
            count += 1

    if count==1:
        cheack2=True
        S = S.replace("C","c")

cheack3 = S.islower()

#print(str(cheack1)+" "+str(cheack2)+" "+str(cheack3))
if cheack1 and cheack2 and cheack3:
    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':
  if s[2:-2].count('C')==1:
    if (s[1]+s[2:-2].replace('C', '')+s[-1]).islower()== 'True' :
      print('AC')
else:
  print('WA')

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



s=input()
if s[0]=='A':
    if s[2:-1].count('C')==1:
        if (s[1]+s[2:-1].replace('C', '')+s[-1]).islower() :
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
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):
def f(s):
  u = 0
  for c in s:
    if c.isupper:
      u += 1
  return u == 1
s = input()
if s[0] == 'A' and s[2:-1].count('C') == 1 and f(s):
  print('AC')
else:
  print('WA')


def f(s):
  u = 0
  for c in s:
    if c.isupper:
      u += 1
  return u == 1
s = input()
if s[0] == 'A' and s[2:-1].count('C') == 1 and f(s[1:]):
  print('AC')
else:
  print('WA')


def f(s):
  u = 0
  for c in s:
    if c.isupper():
      u += 1
  return u == 1
s = input()
if s[0] == 'A' and s[2:-1].count('C') == 1 and f(s[1:]):
  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()
print('AC' if s[0] == 'A' and 'C' in s[3:-2] and s.replace('A', '').replace('C', '').islower() else 'WA')


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

s=input()
print("AC" if "C" in s[2:-1] and "A" in s 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()
if S.find('A')==0 and len(S)-2>=S.find('C')>=2:
	S=S.replace('A','a',1)
	S=S.replace('C','c',1)
	if S.islower():
		print('Yes')
	else:
		print('No')
else:
	print('No')

S=input()
if S.find('A')==0 and S.find('C')>=2:
  S.strip('A')
  S.strip('C')
  if S.islower:
    print('Yes')
  else:
    print('No')
else:
  print('No')

S=input()
if S.find('A')==0 and S.find('C')>=2:
	S.strip('A')
	S.strip('C')
	if S.islower:
		print('Yes')
	else:
		print('No')
else:
	print('No')

S=input()
if S.find('A')==0 and S.find('C')>=2:
  S.strip('A')
  S.strip('C')
  if S.islower:
    print('Yes')
  else:
    print('No')
else:
  print('No')

S=input()
if S.find('A')==0 and len(S)-2>=S.find('C')>=2:
	S=S.replace('A','a',1)
	S=S.replace('C','c',1)
	if S.islower():
		print('AC')
	else:
		print('WA')
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):


def main():
    S = input()

    l = len(S)

    if S[0] != "A":

        print("WA")
        return

    i = S.find("C")
    print(i)

    if 1<i and i<l-1:
        pass
    else:

        print("WA")
        return

    sl = list(S)
    sl.pop(i)
    sl.pop(0)

    s = "".join(sl)

    if s.islower():
        print("AC")
        return
    else:

        print("WA")
        return

if __name__ == "__main__":
    main()



def main():
    S = input()

    l = len(S)

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

    i = S.find("C")

    if 1<i and i<l-1:
        pass
    else:
        print("WA")
        return

    sl = list(S)
    sl.pop(i)
    sl.pop(0)

    s = "".join(sl)

    if s.islower():
        print("AC")
        return
    else:

        print("WA")
        return

if __name__ == "__main__":
    main()

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

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

cnt = 0
print (s[2:-1])
for char in s[2:-1]:
    if char=='C':
        cnt += 1
if cnt!=1:
    print ('WA')
    exit()

cnt_upper = 0
for char in s:
    cnt_upper += char.isupper()
if cnt_upper != 2:
    print ('WA')
    exit()

print ('AC')


#coding:utf-8
s = input()

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

cnt = 0
for char in s[2:-1]:
    if char=='C':
        cnt += 1
if cnt!=1:
    print ('WA')
    exit()

cnt_upper = 0
for char in s:
    cnt_upper += char.isupper()
if cnt_upper != 2:
    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):
s = input()
if s[0] != "A":
  print("No")
  exit()
if  s.find("C") < 2 or s.find("C") == len(s)-1:
  print("No")
  exit()
if s.count("C") != 1:
  print("No")
  exit()
s = s.replace("A","",1)
s = s.replace("C","")
if s != s.lower():
  print("No")
  exit()
print("Yes")

s = input()
if s[0] != "A":
  print("WA")
  exit()
if  s.find("C") < 2 or s.find("C") == len(s)-1:
  print("WA")
  exit()
if s.count("C") != 1:
  print("WA")
  exit()
s = s.replace("A","",1)
s = s.replace("C","")
if s != s.lower():
  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):
# encoding: utf-8
S = input()
abc = "abcdefghijklmnopqrstuvwxyz"

state = ""

for i, char in enumerate(S):
    
    if state == "" and char != "A": state = "WA"
    elif state == "A" and char == "C" and i < 2: state = "WA"
    elif state == "C" and char == "C": state = "WA"
    # main path
    elif state == "" and char == "A": state = "A"
    elif state == "A" and char == "C" and i > 1: state = "C"
    elif state == "C" and char in abc: state = "AC"
    
    if state in ("WA",):
        print(state)
        break
    else: continue
    
else:
    print("WA")


# encoding: utf-8
S = input()

state = ""

for i, char in enumerate(S):
    print(char,state)
    
    if state == "":
        if char == "A": state = "A"
        else: state = "WA"
    elif state == "A":
        if char == "C" and i < 2: state = "WA"
        elif char == "C": state = "C"
        elif char.isupper(): state = "WA"
        else: continue
    elif state == "C":
        if char == "C": state = "WA"
        elif char.isupper(): state = "WA"
        else: state = "AC"
    else: # AC
        if char.isupper(): state = "WA"
    
else:
    if state == "AC": print("AC")
    else: print("WA")


# encoding: utf-8
S = input()

state = ""

for i, char in enumerate(S):
    # print(char,state)
    
    if state == "":
        if char == "A": state = "A"
        else: state = "WA"
    elif state == "A":
        if char == "C" and i < 2: state = "WA"
        elif char == "C": state = "C"
        elif char.isupper(): state = "WA"
        else: continue
    elif state == "C":
        if char == "C": state = "WA"
        elif char.isupper(): state = "WA"
        else: state = "AC"
    else: # AC
        if char.isupper(): state = "WA"
    
else:
    if state == "AC": 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()
print("AC" if S[0] == "A" and S[3:-2].count("C") ==
      1 and S[1:].replace("C", "", 1).islower() else "WA")


S = input()
print("AC" if S[0] == "A" and S[2:-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()
c = s[3:-1]

check = True
count = 0
countUpper = 0

if s[0] != "A":
    check = False
for i in c:
    if i == "C":
        count += 1
if count != 1:
    check =False
for i in s:
    if i.isupper():
        countUpper += 1
    if countUpper != 2:
        check = False

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

s = input()
f = False
C = 0
Upper = 0
for i in range(len(s)):
    if s[0] != "A":
        break
    if s[i].isupper():
        Upper += 1
    if 2 <=i and i<=len(s)-2:
        if s[i] == "C":
            C += 1
if Upper == 2 and C == 1:
    f = True
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 = input()
flag = True
flag = flag and s[0] == 'A'
Ccount = 0
for i in range(1,len(s)):
  if ord('a') <= ord(s[i]) and ord(s[i]) <= 'z': continue
  if s[i] == 'C' and 2 <= i and i <= len(s)-2:
    Ccount += 1
  else:
    flag = False
print("AC" if flag and Ccount == 1 else "WA")

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

if s in S[1:]:
    if s.isupper() and s != 'C':
        print('WA')
        break
else:
    if S[0] == 'A' and cnt == 1:
        print('AC')
    else:
        print('WA')

S = input()
cnt = S[2:-1].count('C')
 
for s in S[1:]:
    if s.isupper() and s != 'C':
        print('WA')
        break
else:
    if S[0] == 'A' and cnt == 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())
print(S)
small = [chr(i) for i in range(97,97+26)]
print(small)
count = 0
ans = 'AC'
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            ans = 'WA'
            break
    elif i == 1:
        if S[i] not in small:
            ans = 'WA'
            break
    elif i != len(S)-1:
        if S[i] == 'C':
            count += 1
        elif S[i] not in small:
            ans = 'WA'
            break
    else:
        if S[i] not in small:
            ans = 'WA'
if ans == 'AC' and count != 1:
    ans = 'WA'
print(ans)


S = list(input())
small = [chr(i) for i in range(97,97+26)]
count = 0
ans = 'AC'
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            ans = 'WA'
            break
    elif i == 1:
        if S[i] not in small:
            ans = 'WA'
            break
    elif i != len(S)-1:
        if S[i] == 'C':
            count += 1
        elif S[i] not in small:
            ans = 'WA'
            break
    else:
        if S[i] not in small:
            ans = 'WA'
if ans == 'AC' and count != 1:
    ans = 'WA'
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()
print('Yes' if s[0]=='A' and s[2]=='C' and str.islower(s[1]+s[3:]) else 'No')

s=input()
l=[]
L=[s[0]]
for i in range(2,len(s)-1):
    if s[i]=='C':
        L.append(s[i])
    else:
        l.append(s[i])
komoji=''.join(l)
komoji+=(s[1]+s[len(s)-1])

print('AC' if L==['A','C'] and str.islower(komoji) 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):
# -*- coding: utf-8 -*-                                                                                                                                                                  
s = str(input())
j1 = (s[0]=='A')
j2 = ('c' in s[2:len(s)-1])
j3 = (s[1:].islower())

if j1 is j2 is j3 is True:
    print ('AC')
else:
    print ('WA')


# -*- coding: utf-8 -*-                                                                                                                                                                  
s = str(input())
j1 = (s[0]=='A')
j2 = False
j3 = False

if 1 == s[2:len(s)-1].count('C'):
    j2 = True
    idx = s[2:len(s)-1].index('C')
    j3 = (s[1:2+idx].islower() and s[2+idx+1:].islower())

if j1 is j2 is j3 is 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()


ans = 0
num = 0
cnum = 0
if S[0] == "A":
  ans += 1

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

for j in range(len(S)):
  if j.islower() == True:
    num += 1

    
if num == len(S)-2:
  ans +=1
  
  
  

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

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

if s[0] != "A" or (s[2] != "C" and s[-1] != "C"):
  print("WA")
elif s[0] == "A" and s[2] == "C":
  s = list(s)
  s.pop(0)
  s.pop(1)
  for i in s:
    if s[i] != s[i].lower():
      print("WA")
      exit()
elif s[0] == "A" and s[-1] == "C":
  s = list(s)
  s.pop(0)
  s.pop(-1)
  for i in s:
    if s[i] != s[i].lower():
      print("WA")
      exit()
      
print("AC")


s = input()
n = len(s)
if s[0] == "A" and s[2:n-1].count("C") == 1 and len(set(s.upper()) & set(s)) == 2:
  print("AC")
else:
  print("WA")

Verdicts: Runtime Error

Accepted