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):
import sys
s=list(input())
if s[0]!='A':
    break
count=0
for i in range(2,len(s)-2):
    if s[i]=='C':
        count+=1

if count==1:
    s.remove('A')
    s.remove('C')    
    res=''.join(s)
    print('AC' if res.islower()==True else 'WA') 

else:
    print('WA')

s=list(input())
count=0
if s[0]!='A':
    count+=2
for i in range(2,len(s)-1):
    if s[i]=='C':
        count+=1

if count==1:
    s.remove('A')
    s.remove('C')    
    res=''.join(s)
    print('AC' if res.islower()==True else '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 = input()
S = list(S)
flag = True
if S[0] != "A":
    flag = False
flag1 = False
for i in range(3,len(S)-1):
    if S[i] == "C" and flag1:
        flag = False
        S[i] = 'c'
        
    elif S[i] == "C" and not flag1:
        flag1 = True
if not flag1:
    flag = False
S[0] = "a"
for i in range(len(S)):
    if not S[i].islower():
        flag = False
        
if flag:
    print('AC')
else:
    print('WA')

S = input()
S = list(S)
flag = True
if S[0] != "A":
    flag = False
flag1 = False
for i in range(3,len(S)-1):
    if S[i] == "C" and flag1:
        flag = False
        
        
    elif S[i] == "C" and not flag1:
        flag1 = True
        S[i] = "c"
if not flag1:
    flag = False
S[0] = "a"
for i in range(len(S)):
    if not S[i].islower():
        flag = False
        
if flag:
    print('AC')
else:
    print('WA')

S = input()
S = list(S)
flag = True
if S[0] != "A":
    flag = False
flag1 = False
for i in range(2,len(S)-1):
    if S[i] == "C" and flag1:
        flag = False
        
        
    elif S[i] == "C" and not flag1:
        flag1 = True
        S[i] = "c"
if not flag1:
    flag = False
S[0] = "a"
for i in range(len(S)):
    if not S[i].islower():
        flag = False
        
if flag:
    print('AC')
else:
    print('WA')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
from collections import Counter

def main():

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

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


    
if __name__== "__main__":
    main() 











from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    count = 0
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    for i in S[1:-1]:
        if i=='C':
            count += 1
    if count == 1:
        flag1=True
        S.pop(S.index('C'))
        
    if ''.join(S).islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('AC')
    else:
        print('WA')


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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

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

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

s=input()
if s[0]=="A" and s[2:-1].count("C")==1:
  c=s[2:-1].index("C")
  if s[1:c+2].islower() and s[c+3:].islower():
    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):
T = []
for i in range(ord("a"),ord("z")+1) :
    T.append(chr(i))


L = list(input())
flag = 0
ans = 1
for i in range(len(L)) :
    if i == 0 and L[i] != "A" :
        ans = -1
        break
    elif (2 <= i <= len(L)-1) and L[i] == "C" :
        if flag == 1 :
            ans = -1
            break
        else :
            flag = 1
    else :
        if L[i] not in T :
            if i == 0 or i == len(L)-1 or flag == 1 : 
                ans = -1
                break

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

T = []
for i in range(ord("a"),ord("z")+1) :
    T.append(chr(i))

L = list(input())
counter = 0
flag = 0
for i in range(len(L)) :
    if i == 0 :
        if L[i] != "A" :
            ans = -1
            break
    elif i == 1 :
        if L[i] not in T :
            counter += 1
    elif 2 <= i <= len(L)-2 :
        if L[i] not in T and flag == 1 :
            counter += 1
        elif flag == 0 and L[i] == "C" :
            flag = 1
    else :
        if L[i] not in T :
            counter += 1
if counter > 0 or flag == 0 :
    print("WA")
else :
    print("AC")


Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
s = input()
if s[0] == "A":
    x = s.find("C")
    if 2<=x and x != len(s)-1:
        s[0]="a"
        s[x]="c"
        if s.islower():
            print("AC")
            exit()
print("WA")

s = input()
if s[0] == "A":
    x = s.find("C")
    if 2<=x and x != len(s)-1:
        s = [i for i in s]
        s[0]="a"
        s[x]="c"
        s = "".join(s)
        if s.islower():
            print("AC")
            exit()
print("WA")

Verdicts: Runtime Error

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):


def solve(s):
    

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

    
    
    
    if len([True for c in s[2:-1] if c == 'C']) != 1:
        return 'WA'

    
    sl = s.lower()
    diff = len([s_ != sl_ for s_, sl_ in zip(s, sl)])
    if (diff - 2) != 0:
        return 'WA'

    return 'AC'


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




def solve(s):
    

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

    
    
    
    if len([True for c in s[2:-1] if c == 'C']) != 1:
        return 'WA'

    
    n_diff = 0
    for s_ in s:
        sl_ = s_.lower()
        if s_ != sl_:
            n_diff += 1

    if n_diff != 2:
        return 'WA'

    return 'AC'


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


Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def check(str):
	print(str)
	cnt = 0
	for s in str:
		if s.islower():
			cnt += 1
	return cnt == len(str) - 1 and str.find('C') != -1

S = input()

if S[0] == 'A' and S[1] != 'C' and S[len(S) - 1] != 'C' and check(S[2:len(S) - 1]) and S[1].islower() and S[len(S) - 1].islower():
	print('AC')
else:
	print('WA')



#!/usr/bin/env python
# -*- coding: utf-8 -*-

def check(str):
	cnt = 0
	for s in str:
		if s.islower():
			cnt += 1
	return cnt == len(str) - 1 and str.find('C') != -1

S = input()

if S[0] == 'A' and S[1] != 'C' and S[len(S) - 1] != 'C' and check(S[2:len(S) - 1]) and S[1].islower() and S[len(S) - 1].islower():
	print('AC')
else:
	print('WA')



Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):

s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    length = len(s)

    n = 1
    for check_char in s[1:]:
        print(check_char)
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
                break
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

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



s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    for n in range(1, len(s)):
        check_char = s[n]
    
        if (check_char.islower() is False
                and check_char == "C"
                and 2 <= n
                and n < (len(s) - 1)):
            cnt_C += 1
        else:
            ans = False
            break

if cnt_C != 1:
    ans = False

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



s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    length = len(s)

    n = 1
    for check_char in s[2:-1]:
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

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



s = input()

cnt_C = 0
ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    length = len(s)

    n = 1
    for check_char in s[1:]:
        #print(check_char)
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
S=input()
s=abcdefghijklmnopqrstuvwxyz
c=0
if S[0]=="A" and "C" in S[2:len(S-1)]:
  i=S.find("C")
  S=S[1:i]+S[i+1:]
  if S.islower():
    c=1
print("AC" if c==1 else "WA")

S=input()
c=0
if S[0]=="A" and "C" in S[2:len(S)-1]:
  i=S.find("C")
  S=S[1:i]+S[i+1:]
  if S.islower():
    c=1
print("AC" if c==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 = list(input())

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

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


S = list(input())

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

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


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()
slist = list(s)
if s[0] == 'A':
    slist[0] = 'a'
    flag = -1
    for i, c in enumerate(s[2:-2]):
        if flag == 1 or flag == -1:
            print("WA")
            exit(0)
        if c == 'C':
            flag += 1
            slist[i+2] = 'c'
    if "".join(slist).islower():
        print("AC")
        exit(0)
print("WA")

s = input()

ans = "WA"
if s[0] == 'A' and s[2:-1].count('C') == 1 and s[1] != 'C' and s[-1] != 'C':
    s2 = s.replace('A', 'a').replace('C', 'c')
    if s2 == s.lower():
        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':
    s = s[1:]
    if s[1:-2].cont('C') == 1:
        s.remove('C')
        if s == s.lower():
            print('AC')
            exit()
print('WA')

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


Verdicts: Runtime Error

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
s = list(input())
if "A" != s[0]:
    print("WA")
    exit()
s_extracted = s[2:-1]
if s_extracted.count("C") != 1:
    print("WA")
    exit()
else:
    # Get Upper characters without "C"
    s_upper = [
        chara for chara in s
        if chara != "C" and chara != "C" and chara.isupper()
    ]
    if len(s_upper) > 0:
        print("WA")
        exit()
print("AC")

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()
for c in s:
  if c.isupper():
    count += 1

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

s = input()
count = 0
for c in s:
  if c.isupper():
    count += 1

if count == 2 and s[0] == 'A' and 'C' in s[2:-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 = input()

if S[0] == "A" and S[2:-1].count("C") == 1:
  index =  S.index('C')
  S = S[1:index] + S[index + 1:]
  print(S)
  if S.islower():
    print("AC")
    exit()
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")
    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 = list(input())
if S[0] != 'A':
    print('WA')
    exit()
if len([s for s in S[3:-2] if s == 'C']) != 1:
    print('WA')
    exit()
SL = [s for s in S if s not in ['A', 'C']]
if not all([sl.islower() for sl in SL]) or len(SL) + 2 != len(S):
    print('WA')
    exit()
print('AC')

S = list(input())
if S[0] != 'A':
    print('WA')
    exit()
if len([s for s in S[2:-1] if s == 'C']) != 1:
    print('WA')
    exit()
SL = [s for s in S if s not in ['A', 'C']]
if not all([sl.islower() for sl in SL]) or len(SL) + 2 != len(S):
    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()
count = 1
if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
  for i in range(1,len(s)):
    if s[i].islower() == False:
      if s[i] == 'C':
        count += 1
      else:
        print('WA')
        exit()
      if 1 < count:
        print('WA')
        exit()
  print('AC')
else:
  print('WA')

s = input()
count = 0
if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
  for i in range(1,len(s)):
    if s[i].islower() == False:
      if s[i] == 'C':
        count += 1
      else:
        print('WA')
        exit()
      if 1 < count:
        print('WA')
        exit()
  print('AC')
else:
  print('WA')

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
S = input()
s = S[2:-1]
r = S.replace('A', '')
r = r.replace('C', '')

if S[0] != 'A' or s.count('C') != 1 or r.lower():
    print('WA')
else:
    print('AC')


S = input()
R = S[2:-1]
T = S.replace('A', '')
T = T.replace('C', '')

if S[0] != 'A' or R.count('C') != 1 or not T.islower():
    print("WA")
else:
    print("AC")

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

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

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

S = list(input())

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

S = list(input())

if S[0] == 'A' and S[2:- 1].count('C') == 1:
    S.remove('A')
    S.remove('C')
    if ''.join(S).islower():
        print('AC')
    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):
import sys

str = input()

if str[0] != 'A' :
    print("WA")
    sys.exit()

str.replace('A', 'a', 1)

flag = False

for i in range(2, len(str) - 1) :
    if str[i] == 'C':
        str.replace('C' , 'c', 1)
        flag = True
        
if not flag :
    print("WA")
    sys.exit()

if str.islower():
    print("AC")
else:
    print("WA")

import sys

str = input()

if str[0] != 'A' :
    print("WA")
    sys.exit()

str = str.replace('A', 'a', 1)

flag = False

for i in range(2, len(str) - 1) :
    if str[i] == 'C':
        str = str.replace('C' , 'c', 1)
        flag = True
        break
        
if not flag :
    print("WA")
    sys.exit()

if str.islower():
    print("AC")
else:
    print("WA")

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
s = list(input())
al = list("abcdefghijklmnopqrstuvwxyz")
if s[0] == "A" and s[-1] in al and s[1] in al:
    del s[0]
    del s[0]
    del s[-1]
    f = 0
    for i in s:
        if i == "C":
            if f == 1:
                print("WA")
                break
            else:
                f = 1
                continue
        else:
            if i in al:
                continue
            else:
                print("WA")
                break
    else:
        if f = 1:
            print("AC")
        else:
            print("WA")
else:
    print("WA")

s = list(input())
al = list("abcdefghijklmnopqrstuvwxyz")
if s[0] == "A" and s[-1] in al and s[1] in al:
    del s[0]
    del s[0]
    del s[-1]
    f = 0
    for i in s:
        if i == "C":
            if f == 1:
                print("WA")
                break
            else:
                f = 1
                continue
        else:
            if i in al:
                continue
            else:
                print("WA")
                break
    else:
        if f == 1:
            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):
str=list(input())

count1=0
count2=0
if str[0]=="A":
  for i in range(len(str)-3):
    if str[i+2]=="C":
      count1 += 1
  for i in range(len(str)):
    if str[i]==str[i].capitalize():
      count2 += 1
  if count1 == 1 && count2 !=0 :
    print("AC")
  else:
    print("WA")
else:
  print("WA")
    
    
  
  

str=list(input())

count1=0
count2=0
if str[0]=="A":
  for i in range(len(str)-3):
    if str[i+2]=="C":
      count1 += 1
  for i in range(len(str)):
    if str[i]==str[i].capitalize():
      count2 += 1
  if count1 == 1 and count2 ==2 :
    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=input()
c=0
if s[0]!='A' or s[0].isupper()==False:
  print("WA")
else:
  for i in range(3,len(s)-1):
    if s[i]=='C' and s[i].isupper()==True:
      c+=1
  if c==1:
    print("AC")
  else:
    print("WA")


s=input()
c=0
if s[0]!='A':
  print("WA")
else:
  for i in range(3,len(s)-1):
    if s[i]=='C':
      c+=1
  if c==1:
    print("AC")
  else:
    print("WA")

s=input()
c=0
if s[0]!='A' or s[0].isupper()==False:
  print("WA")
else:
  for i in range(2,len(s)-1):
    if s[i]=='C' and s[i].isupper()==True:
      c+=1
  if c==1 and s[1].isupper()==False and s[len(s)-1].isupper()==False:
    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()

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


S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1 and sum([c.isupper for c in S]) == 2:
    print('AC')
else:
    print('WA')


S = input()

if S[0] == 'A' and S[2:-1].count('C') == 1 and sum([c.isupper() for c in S]) == 2:
    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 = list(input())
cnt = 0

array = S[3:-1]
if array.count("C")==1:
  array.remove("C")
  S = S[:3]+array+S[-1]
else:
  cnt += 1

if S[0]=="A":
  del S[0]
else:
  cnt += 1

s = "".join(S)
if s.islower == False:
  cnt += 1
print("AC" if cnt==0 else "WA")


S = list(input("Enter :"))
ans = 0
C_location = 0
for i in range(2,len(S)-1):
  if S[i] == "C":
    ans += 1
	S[i].lower()
if all(S[0]=="A" and ans==1):
  S.swapcase(S[0])
  if S.islower():
	print("AC")
  else:
    print("WA")
else:
  print("WA")

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

S = input()
print('AC' if S[0] == 'A' and S[2:-1].count('C') == 1 and S[1] != 'C' and S[1:].replace('C','').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):
S = input()
if S[0] == 'A' and S[2:-1].count('C') == 1:
    S2 = S[1] + S[2:-1].replace('C', '')
    if S2 == S.lower():
        print('AC')
        exit()
print('WA')

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

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
import re

S = input()

if(S[0] == 'A'):
    regex = r'[a-z]*C[a-z]*[a-z]'
    ans = re.match(regex, S[3:len(S)])
    if(ans != None):
        if(ans.span() == (0, len(S[3:len(S)]))):
            print('AC')
        else:
            print('WA')
    else:
        print('WA')


import re

S = input()

regex = r'A[a-z][a-z]*C[a-z]*[a-z]'
ans = re.match(regex, S)
if(ans != None):
    if(ans.span() == (0, len(S))):
        print('AC')
    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):
n=list(input())
count=0
if n[0]=='A' and n[2:-1].count('C')==1:
    del n[0]
    n.remove('C')
    print(n)
    for i in range(len(n)):
        if n[i].islower()==1:
            count+=1
    if count==len(n):
        print('AC')
    else:
        print('WA')
    
else:
    print('WA')

n=list(input())
count=0
if n[0]=='A' and n[2:-1].count('C')==1:
    del n[0]
    n.remove('C')
    for i in range(len(n)):
        if n[i].islower()==1:
            count+=1
    if count==len(n):
        print('AC')
    else:
        print('WA')
    
else:
    print('WA')

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
S = input()
ans = 'WA'
if S[0] == 'A':
    if S[2 : -1].count('C') == 1:
        if S[0].replace('A', 'a') + S[2 : -1].replace('C', 'c') + S[-1] == S.lower():
            ans = 'AC'
print(ans)

S = input()
mid = S[2:-1]
S_lower = S.lower()
S_replace = S.replace('C', 'c')
C_count = 0

if S[0] == 'A':
    for i in mid:
        if i == 'C':
            C_count += 1
    if C_count == 1:
        if S_lower == S_replace:
            print('AC')
        else:
            print('WA')
    else:
        print('WA')

S = input()
ans = 'WA'
if S[0] == 'A':
    if S[2 : -1].count('C') == 1:
        if S[0].replace('A', 'a') + S[1] + S[2 : -1].replace('C', 'c') + S[-1] == S.lower():
            ans = 'AC'
print(ans)

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):
def main(S):
    if not S[0] == 'A':
        return 'WA'
    if not S[2] == 'C':
        return 'WA'

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

    if not count_c == 1:
        return 'WA'

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

    return 'AC'


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


import string


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

    count_upper = 0
    for upper in string.ascii_uppercase:
        count_upper += S.count(upper)

    if count_upper != 2:
        return 'WA'

    count_C = 0

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

    if count_C == 0:
        return 'WA'

    return 'AC'


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


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


s = input().rstrip()

ans = 'WA'
if s[0] == 'A' and s[2:len(s) - 1].count('C') == 1:
    i = s[2:len(s) - 1].find('C')
    if s[1:i + 2].islower() and s[i + 2 + 1:].islower():
        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):
from collections import Counter

def is_lower_case(c):
  lower_case_alphabets = 'abcdefghijklmnopqrstuvwxyz'
  return c in lower_case_alphabets

S = input()
cnt = Counter(S[2:-1])

flag = True
if S[0] != 'A':
  flag = False
if cnt['C'] != 1:
  flag = False
for c in S:
  if c != 'C' and not is_lower_case(c):
    flag = False
print('AC' if flag else 'WA')


from collections import Counter

def is_lower_case(c):
  lower_case_alphabets = 'abcdefghijklmnopqrstuvwxyz'
  return c in lower_case_alphabets

S = input()
cnt = Counter(S[3:-1])

flag = True
if S[0] != 'A':
  flag = False
if cnt['C'] != 1:
  flag = False
for c in S:
  if c != 'C' and not is_lower_case(c):
    flag = False
print('AC' if flag else 'WA')


from collections import Counter

def is_lower_case(c):
  lower_case_alphabets = 'abcdefghijklmnopqrstuvwxyz'
  return c in lower_case_alphabets

S = input()
cnt = Counter(S)

flag = True
if S[0] != 'A':
  flag = False
if cnt['C'] != 1:
  flag = False
for c in S:
  if c != 'C' and not is_lower_case(c):
    flag = False
print('AC' if flag else 'WA')

    

from collections import Counter

def is_lower_case(c):
  lower_case_alphabets = 'abcdefghijklmnopqrstuvwxyz'
  return c in lower_case_alphabets

S = input()
cnt = Counter(S[2:-1])

flag = True
if S[0] != 'A':
  flag = False
if cnt['C'] != 1:
  flag = False
for c in S[1:]:
  if c != 'C' and not is_lower_case(c):
    flag = False
print('AC' if flag else '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()
m = re.match('^A[a-z]+C[a-z]+$', S)
if m == None:
    print('WA')
else:
    print('AC')

import re

S = input()
m = re.match('^A[a-z]+C[a-z]+$', S)
if m == None:
    print('WA')
else:
    print('AC')

Verdicts: Runtime Error

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

Submission attempts (in order):
s = input()
l = len(s)

if s[0] == "A":
    if s[2:l - 1].count("C") == 1:
        if s.count("A") == 1:
            s.replace("A", "a")
            s.replace("C", "c")
            if s.islower == True:
                print("AC")
                exit()
print("WA")

s = input()
l = len(s)

if s[0] == "A":
    if s[2:l - 1].count("C") == 1:
        s.replace("A", "a")
        s.replace("C", "c")
        if s.islower == True:
            print("AC")
            exit()
print("WA")

s = input()

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

ans = "WA"

if S[0] != "A":
  print(ans)
  
else:
  if S[2:len(S) - 1].count("C") != 1:
    print(ans)
  else:
    s = S.index("C")
    SS = S[1:s] + S[s + 1:]
    print(SS)
    if SS.islower() == False:
      print(ans)
    else:
      print("AC")
      

S = input()

ans = "WA"

if S[0] != "A":
  print(ans)
  
else:
  if S[2:len(S) - 1].count("C") != 1:
    print(ans)
  else:
    s = S.index("C")
    SS = S[1:s] + S[s + 1:]
    if SS.islower() == False:
      print(ans)
    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()
N = len(S)

cond1 = True if S[0] == 'A' else False
cond2 = True if S[3:-2].count('C') == 1 else False
cond3 = True if sum(map(lambda x: x.islower(), S)) == N-2 else False

print('AC') if cond1 and cond2 and cond3 else print('WA')

S = input()
N = len(S)
 
cond1 = True if S[0] == 'A' else False
cond2 = True if S[3:(N-2)].count('C') == 1 else False
cond3 = True if sum(map(lambda x: x.islower(), S)) == N-2 else False
 
print('AC') if cond1 and cond2 and cond3 else print('WA')

S = input()
N = len(S)
 
cond1 = True if S[0] == 'A' else False
cond2 = True if S[3:-2].count('C') == 1 else False
cond3 = True if sum(map(lambda x: x.islower(), S)) == N-2 else False
 
print('AC') if cond1 and cond2 and cond3 else print('WA')

S = input()
N = len(S)
 
cond1 = True if S[0] == 'A' else False
cond2 = True if S[2:-1].count('C') == 1 else False
cond3 = True if sum(map(lambda x: x.islower(), S)) == N-2 else False
 
print('AC') if cond1 and cond2 and cond3 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):
w=input()
flag=0
if w[0]=='A' and w[2]=='C'and w[1].lower()==w[1]:
    flag+=0
else:
    flag=1    
if w[3:].lower()==w[:3]:
    flag+=0
else:flag=1
if flag:print('WA')
else:print('AC')

w=input()
flag=0
if w[0]=='A' and w.count('C')==1 and w.count('A')==1 and w[1].lower()==w[1] and w[-1].lower()==w[-1]:
    flag+=0
else:
    flag=1    
if w.replace('A','').replace('C','').lower()==w.replace('A','').replace('C',''):
    flag+=0
else:flag=1
if flag:print('WA')
else:print('AC')

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions:    * The initial character of S is an uppercase `A`.   * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive).   * All letters except the `A` and `C` mentioned above are lowercase.

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

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

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



s=list(input())

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

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



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

s = input()
flg = True
if(s[0] != "A"):
    flg = False
if(s[2:-1].count("C")!=1):
    flg = False
for i in range(1, len(s)):
    if(s[i] == "C" and i !=len(s)-1):
        continue
    if(s[i].isupper()):
        flg = False

print("AC" if Flg else "WA")

s = input()

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

ans = "WA"
if S[0] == "A":
    flag = "AC"
    S = S.replace("A", "a", 1)

count = 0
for i in range(2, len(S) - 1):
    if S[i] == "C":
        count += 1
        S = S.replace("C", "c", 1)
if count != 1:
    ans = "WA"

if not S.islower():
    ans = "WA"

print(ans)


S = input()

ans = "WA"
if S[0] == "A":
    ans = "AC"
    S = S.replace("A", "a", 1)

count = 0
for i in range(2, len(S) - 1):
    if S[i] == "C":
        count += 1
        S = S.replace("C", "c", 1)
if count != 1:
    ans = "WA"

if not S.islower():
    ans = "WA"

print(ans)


Verdicts: Wrong Answer

Accepted