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
N = list(input())
komoji = 0
oomoji = 0
if N[0] == 'A':
    if N[1].islower():
        for i in range(2, len(N)-1):
            if N[i] == 'C':
                oomoji += 1
            if N[i].islower():
                komoji += 1
if oomoji == 1 and komoji == len(N) - 3:
    print("AC")
else:
    print("WA")

import sys
N = list(input())
komoji = 0
oomoji = 0
if N[0] == 'A':
    if N[1].islower():
        for i in range(2, len(N)-1):
            if N[i] == 'C':
                oomoji += 1
            if N[i].islower():
                komoji += 1
        if N[-1].islower():
            komoji += 1
if oomoji == 1 and komoji == len(N) - 3:
    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()
alphabets = set(chr(ord('a')+x) for x in range(26))

f1 = (S[0]=="A")
f2 = (S[2:-1].count("C")==1)
f3 = (set(S)-set("AC")<=alphabets)

answer = 'AC' if bl1 and bl2 and bl3 else 'WA'
print(answer)


S = input()

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

Verdicts: Runtime Error

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

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

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

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


Verdicts: Wrong Answer

Wrong Answer

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

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

wa = False

if s[0] != 'A':
  wa = True
print(s[2:-1])
if s[2:-1].count('C') != 1:
  wa = True

l_s = list(s)
  
del l_s[l_s.index('A')]

if 'C' in l_s:
	del l_s[l_s.index('C')]

for c in l_s:
  print(c.lower())
  if c != c.lower():
    wa = True
    
if wa == True:
  print('WA')
else:
  print('AC')

s = input()

wa = False

if s[0] != 'A':
  wa = True
if s[2:-1].count('C') != 1:
  wa = True

l_s = list(s)
  
if 'A' in l_s:
	del l_s[l_s.index('A')]

if 'C' in l_s:
	del l_s[l_s.index('C')]

for c in l_s:
  if c != c.lower():
    wa = True
    
if wa == True:
  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()
if s[0]=="A" and "C" in s[2:-1] and len(re.findall('[A-Z]', s))==2:
    print("AC")
else:
    print("WA")

import re
s=input()
if s[0]=="A" and "C" in s[2:-1] and len(re.findall('[A-Z]', s))==2:
    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 "C" in s[2:-1]:
    try:
        ss = s[2:-2]
        ss.remove("C")
        ss += s[-1]
        if ''.join(ss).islower():
            print("AC")
        else:
            print("WA")
    except:
        print("WA")
else:
    print("WA")


s = input()

if len(s) >= 4 and len(s) <= 10 and s[0]=="A" and s[2:-1].count("C")==1:
    try:
        ss = list(s[2:-1])
        ss.remove("C")
        ss = s[1] + ss + s[-1]
        if ''.join(ss).islower():
            print("AC")
        else:
            print("WA")
    except:
        print("WA")
else:
    print("WA")


s = input()

if len(s) >= 4 and len(s) <= 10 and s[0]=="A" and s[2:-1].count("C")==1:
    try:
        ss = list(s[2:-1])
        ss.remove("C")
        ss += s[-1]
        if s[1].islower() and ''.join(ss).islower():
            print("AC")
        else:
            print("WA")
    except:
        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):
A=False
S=input()
if S[0]=='A':
  for i in range(1,len(S)-1):
    if i=='C':
      A=True
      break
    else:
      A=False
  if A is True:
    if S.iflower():
      print('AC')
    else:
      print('WA')
  else:
    print('WA')
else:
  print('WA')

S=input()
A=0
if S[0]=='A':
  for i in range(2,len(S)-1):
    if S[i]=='C':
      A+=1
      B=i
  if A==1:
    S=S[1:B]+S[B+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):
hoge=input()
no=0
if(hoge[0]=="A"):
  hoge.strip("A")
else:
  no=1

if(hoge[0].islower()):
  hoge.strip(hoge[0])
else:
  no=1

if(hoge[0]=="C"):
  hoge.strip("C")
else:
  no=1
  
if(hoge.islower()==false):
  no=1
  
if(no==0):
  print("AC")
else:
  print("WA")

#ABC097B
hoge=input()
no=0

if(hoge[0]=="A"):
    hoge=hoge.replace("A","a",1)
else:
    no=1
    
if not(hoge[1].islower() and hoge[-1].islower()):
    no=1

if(hoge.count("C")==1):
    hoge=hoge.replace("C","c",1)
else:
    no=1
    
if(hoge.islower() and no==0):
    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):
import sys
s = input()
if s[0] == "A" and s[2:-1].count("C") == 1:
  x = list(s)
  cnt = 0
  for i in range(len(x)):
    if x[i].isupper:
      cnt += 1
  if cnt == 2:
    print("AC")
    sys.exit()
print("WA")

import sys
s = list(input())
if s[0] == "A" and s[2:-1].count("C") == 1:
  cnt = 0
  for i in s:
    if s.isupper():
      cnt += 1
  if cnt == 2:
    print("AC")
    sys.exit()
print("WA")

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


Verdicts: Wrong Answer

Runtime Error

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

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

count = 0
tf = True
if S[0] != "A" or S[1] == "C" or S[-1] == "C":
    tf = False

for i in range(len(S)):
	if tf:
		break
    if i == 0:
        continue
    if S[i] == "C":
        count += 1
    elif not S[i].islower():
        tf = False

if tf and count == 1:
    print("AC")
else:
    print("WA")


S = input()

count = 0
tf = True
if S[0] != "A" or S[1] == "C" or S[-1] == "C":
    tf = False

for i in range(len(S)):
    if tf:
        break
    if i == 0:
        continue
    if S[i] == "C":
        count += 1
    elif not S[i].islower():
        tf = False

if tf and count == 1:
    print("AC")
else:
    print("WA")


S = input()

count = 0
tf = True
if S[0] != "A" or S[1] == "C" or S[-1] == "C":
    tf = False

for i in range(1, len(S)):
    if tf:
        break
    if i == 0:
        continue
    if S[i] == "C":
        count += 1
    elif not S[i].islower():
        tf = False

if tf and count == 1:
    print("AC")
else:
    print("WA")


S = input()

count = 0
ans = True

if S[0] != "A":
    ans = False
if not "C" in S[2:-1]:
    ans = False
for s in S:
    if s.isupper():
        count += 1
if count > 2:
    ans = False

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


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
#B AcCepted
b = input()
a = list(b)
c=z = len(b)
d =""
if a[0] == "A":
    a[0] = "a"
    c = 10000
for i in range(2,c):
    if a[i] == "C":
        a[i]="c"
        c+=1
for i in a:
    d+=i
if d.islower() and c == 10001:
    print("AC")
else:
    print("WA")
    
    

#B AcCepted
b = input()
a = list(b)
c=z = len(b)
d =""
if a[0] == "A":
    a[0] = "a"
    c = 10000
for i in range(2,z-1):
    if a[i] == "C":
        a[i]="c"
        c+=1
for i in a:
    d+=i
if d.islower() and c == 10001:
    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()

noAC = s.replace('A', '').replace('C', '')
content = s[2:len(s)-1]

if s[0] != 'A' or (not('C' in content)) or (not noAC.islower()):
  print('WA')
else:
  print('SC')


s = input()

noAC = s.replace('A', '').replace('C', '', 1)
content = s[2:len(s)-1]

if s[0] != 'A' or (not('C' in content)) or (not noAC.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):
import sys
import re


cnt = 1
input_arr = []
for l in sys.stdin:
  input_arr.append(l.split("\n")[0])
  if len(input_arr) == cnt:
      break
S = input_arr[0]
print(S[1]+S[-1]+S[2:-1].replace("C","",1))
if 4 <= len(S) <= 10 and\
        len(re.sub("[a-z|A-Z]+", "", S)) == 0 and\
        S[0] == "A" and\
        S[2:-1].count("C") == 1 and\
        len(re.sub(r'[a-z]+', '', S[1]+S[-1]+S[2:-1].replace("C","",1))) == 0:
    print("AC")
else:
    print("WA")

import sys
import re


cnt = 1
input_arr = []
for l in sys.stdin:
  input_arr.append(l.split("\n")[0])
  if len(input_arr) == cnt:
      break
S = input_arr[0]
if S[0] == "A" and len(re.sub(r'[a-z]+', '', S[1]+S[-0]+S[2:-1].replace("C","",1))) == 0:
    print("AC")
else:
    print("WA")

import sys
import re


cnt = 1
input_arr = []
for l in sys.stdin:
  input_arr.append(l.split("\n")[0])
  if len(input_arr) == cnt:
      break
S = input_arr[0]
if len(re.sub(r'A[a-z]+C[a-z]+', '', S)) == 0:
    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":
  print("WA")
  exit()
s=s[1:]
count_C=0
for i in range(len(s)):
  if s[i]=="C":
    count_C+=1
if count_C!=1:
  print("WA")
  exit()
s.replace("C","")
if not s.islower():
  print("WA")
  exit()
print("AC")

s=input()
if s[0]!="A":
  print("WA")
  exit()
s=s[1:]
count_C=0
for i in range(len(s)-2):
  if s[i+1]=="C":
    count_C+=1
if count_C!=1:
  print("WA")
  exit()
s=s.replace("C","")
if not s.islower():
  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):
from string import ascii_lowercase

s = list(input())
ans = 'AC'

cnt = 0
for i, c in enumerate(s):
    if i == 0 and c != 'A':
        ans = 'WA'
        break
    if not c in ascii_lowercase:
        if i >= 2 and i <= len(s) - 2:
            if c == 'C':
                cnt += 1
                if cnt > 1:
                    ans = 'WA'
                    break
        else:
            ans = 'WA'
        
print(ans)

from string import ascii_lowercase

s = list(input())
ans = 'AC'

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

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

if not s[1] in ascii_lowercase:
    ans = 'WA'

if not s[-1] in ascii_lowercase:
    ans = 'WA'

for c in s[2:-1]:
    if c == 'C':
        continue
    if not c in ascii_lowercase:
        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()

countA = 0
countC = 0
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            print('WA')
            quit()
        else:
            continue
    if S[i] == 'A':
        countA += 1
    elif S[i] == 'C':
        if i < 2 or i == len(S)-1:
            print('WA')
            quit()
        countC += 1
    elif not S[i].islower():
        print('WA')
        quit()
    if countA > 1 or countC > 1:
        print('WA')
        quit()

if countA != 1 or countC != 1:
    print('WA')
    quit()
print('AC')

S = input()

countA = 0
countC = 0
for i in range(len(S)):
    if i == 0:
        if S[i] != 'A':
            print('WA')
            quit()
        else:
            countA += 1
            continue
    if S[i] == 'C':
        if i < 2 or i == len(S)-1:
            print('WA')
            quit()
        countC += 1
    elif not S[i].islower():
        print('WA')
        quit()
    if countA > 1 or countC > 1:
        print('WA')
        quit()

if countA != 1 or countC != 1:
    print('WA')
    quit()
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):
a = list(input())
k = 0
for i in range(len(a)):
	if i == 0 and a[i] != "A":
		k = 1
		break
	elif i >= 2 and i <= len(a)-2:
		if a[i] == "C":
			k += 2
		elif a[i] > z or a[i] < a:
			k = 1
			break
	else:
		if a[i] > "z" or a[i] < "a":
			k = 1
			break
if k == 2:
	print("AC")
else:
	print("WA")



a = list(input())
k = 0
for i in range(len(a)):
	if i == 0 and a[i] != "A":
		k = 1
		break
	elif i == 0:
		k = k
	elif i >= 2 and i <= len(a)-2:
		if a[i] == "C":
			k += 2
		elif a[i] <= "z" and a[i] >= "a":
			k = k
		else:
			k = 1
			break
	else:
		if a[i] <= "z" and a[i] >= "a":
			k = k
		else:
			k = 1
			break
if k == 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()
res="AC"
if s[0]=="A":res="WA"
elif s[2:-2].count("C")!=1:res="WA"
else:
    li=list(s)
    li.remove("A")
    li.remove("C")
    for i in li:
        if i!=i.lower():
            res="WA"
print(res)

s=input()
res="AC"
if s[0]=="A":res="WA"
elif s[2:-2].count("C")!=1:res="WA"
elif "A" in s and "C" in s[2:-2]:
    li=list(s)
    li.remove("A")
    li.remove("C")
    for i in li:
        if i!=i.lower():
            res="WA"
print(res)

s=input()
res="AC"
if s[0]!="A":res="WA"
elif s[2:-1].count("C")!=1:res="WA"
else:
    li=list(s)
    li.remove("A")
    li.remove("C")
    for i in li:
        if i!=i.lower():
            res="WA"
print(res)

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):
A, B = map(int, input().split())
N = int(input())
S = input()

if S[0] == 'A' and (S[:3] + S[-2:]).count('C') == 1:
    a = 0
    c = 0
    ng = 0
    for ch in S:
        if ch == 'A':
            a += 1
        elif ch == 'C':
            c += 1
        elif not ch.islower():
            ng += 1
    if a == 1 and c == 1 and ng == 0:
        print("AC")
        sys.exit(0)
print("WA")

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

import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

S = input()

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

if (flag == True) and (count > 1) and (count < len(S)-1):
  print("Yes")
else:
  print("WA")

S = str(input())
flag = False
count = 0
tmp_str = ""
if S.count("C") == 1 and S[0] == "A":
  flag = True
  for i in range(1,len(S),1):
    if S[i] == "C":
      count = i
    else:
      tmp_str += S[i]

if (flag == True) and (count > 1) and (count < len(S)-1) and (tmp_str.islower() == True):
  print("AC")
else:
  print("WA")

Verdicts: Wrong Answer

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

Submission attempts (in order):
import re
s = input()
ci = s.index("C")
if s.index("A") == 0 and 2 <= ci < len(s) - 2:
  tmp = list(s)
  del tmp[0]
  del tmp[ci]
  if re.match("^[a-z]*$", "".join(tmp)):
    print("AC")
    exit()
print("WA")

import re
s = input()
print("AC" if re.match(s, "A.C.*") else "WA")

import re
s = input()
print("AC" if re.match("$A[a-z]C[a-z]*^", s) else "WA")

import re
s = input()
ci = s.find("C")
if s.find("A") == 0 and 2 <= ci <= len(s) - 2:
  tmp = list(s)
  del tmp[0]
  del tmp[ci - 1]
  if re.match("^[a-z]*$", "".join(tmp)):
    print("AC")
    exit()
print("WA")

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
S=input()
t= [str(c) for c in S]
print(t)
flag=0

if t[0]!="A":
    flag=1
b=0
i=0

for i in range(2,len(t)-2):
    if t[i]=="C":
        b += 1
if b!=1:
    flag=1

i=0
for i in range(len(t)):
    if t[i]=="A" or t[i]=="C" :
        continue
    elif ord(t[i])>90:
        continue
    else:
        flag=1
        break

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

S=input()
t= [str(c) for c in S]
flag=0

if t[0]!="A":
    flag=1
b=0
i=0

for i in range(2,len(t)-1):
    if t[i]=="C":
        b += 1
if b!=1:
    flag=1

i=0
for i in range(len(t)):
    if t[i]=="A" or t[i]=="C" :
        continue
    elif ord(t[i])>90:
        continue
    else:
        flag=1
        break

if flag==0:
    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[1].isupper():
    print('WA')
elif s[-1].isupper():
    print('WA')
else:
    C=0
    s=s[2:-1]
    for c in s:
        if c=='C':
            C+=1
            if not C>1:
                print('WA')
                break
    if C==1:
        print('AC')
    else:
        print('WA')

s=input()
if s[0]!='A':
    print('WA')
elif s[1].isupper():
    print('WA')
elif s[-1].isupper():
    print('WA')
else:
    C=0
    s=s[2:-1]
    for c in s:
        if c=='C':
            C+=1
            if not C>1:
                print('WA')
                break
    if C==1:
        print('AC')
    elif C==0:
        print('WA')

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

s = input()
if s[0] == 'A':
    if 'C' in s[2:-1]:
        index = s[2:-1].index('C')
        news = s[1:index] + s[index+1:]
        if news == news.lower():
            print('AC')
            sys.exit()
print("WA")


import sys

s = input()
if s[0] == 'A':
    if 'C' in s[2:-1]:
        index = s[2:-1].index('C') + 2
        news = s[1:index] + s[index+1:]
        if news == news.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()


def lower_checker(ss):
    flag = True
    for k in ss:
        if k != 'A' or k != 'C':
            flag = flag and k.islower()
    return flag

flag = True
if s[0] != 'A':
    flag = False
if flag is False or 'C' not in s[3:-2]:
    flag = False
if flag is False or not lower_checker(s):
    flag = False

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

s = input()


def lower_checker(ss):

    for k in ss:
        if k != 'A' and k != 'C' and k.islower() is False:
            return False
    return True

def C_counter(ss):
    cnt = 0
    for k in ss:
        if k == 'C':
            cnt += 1
    if cnt == 1:
        return True
    else:
        return False

flag = True
if s[0] != 'A':
    flag = False
if flag is False or C_counter(s[2:-1]) is False:
    flag = False
if flag is False or lower_checker(s) is False:
    flag = False

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

Verdicts: Wrong Answer

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

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

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        S.replace('C', '')
        if S[1:].islower():
            print('AC')
            exit()

print('WA')

S = input()

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        S = S[0:2] + S[2:-1].replace('C', 'c') + S[-1]
        if S[1:].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())
temp_s = s[1:-1]
print(temp_s)

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

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

if (s[0]=="A")and("C" in temp_s):
  s.remove("A")
  s.remove("C")
  temp = s.copy()
  if len(set(s) - set(list("".join(temp).lower())))==0:
    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 = True
if s[0]!='A':
  ans = False
if s[2:-1].count('C')!=1:
  ans = False
upper = 0
for i in  s:
  if i.isupper:
    upper += 1
if upper != 2:
  ans = False
if ans:
  print('AC')
else:
  print('WA')

s = input()
ans = True
if s[0]!='A':
    ans = False
if s[2:-1].count('C')!=1:
    ans = False
upper = 0
for i in  s:
    if i.isupper():
        upper += 1

if upper != 2:
    ans = False

if ans:
    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()
count = 0
for i in range(len(s)):
    if i == 0:
        if s[i] != 'A':
            break
    elif i == 1:
        if s[i].islower():
            pass
        else:
            break
    elif i>1 and i < len(s)-1 :
        if s[i]=='C':
            if count == 0:
                count += 1
            else:
                break
        elif s[i].islower():
            pass
        else:
            break
    elif i == len(s) :
        if s[i].islower():
            print("AC")
            exit()
    else:
        break
print("WA")

s = input()
if len(s) < 4:
    print('WA')
    exit()
count = 0
for i in range(len(s)):
    if i == 0:
        if s[i] != 'A':
            break
    elif i == 1:
        if s[i].islower():
            continue
        else:
            break
    elif i>1 and i < len(s)-1 :
        if s[i]=='C':
            if count == 0:
                count += 1
                continue
            else:
                break
        elif s[i].islower():
            continue
        else:
            break
    elif i == len(s) :
        if s[i].islower():
            print("AC")
            exit()
    else:
        break
print("WA")

s = input()
count = 0
for i in range(len(s)):
    if i == 0:
        if s[i] != 'A':
            break
    elif i == 1:
        if s[i].islower():
            pass
        else:
            break
    elif i>1 and i < len(s)-1 :
        if s[i]=='C':
            if count == 0:
                count += 1
            else:
                break
        elif s[i].islower():
            pass
        else:
            break
    elif i == len(s)-1 :
        if s[i].islower():
            if count ==1:
                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):
from collections import Counter
S = list(input())

if S[0] == 'A':
    print(S[1:-1])
    #if int(S[:3].count('C')) + int(S[-2:].count('C'))  == 1:
    if S[1:-1].count('C') == 1:
        del S[-2]
        del S[2]
        del S[0]
        s = ''.join(S)
        if s.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')


from collections import Counter
S = list(input())

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

from collections import Counter
S = list(input())

if S[0] == 'A':
    if S[2:-1].count('C') == 1:
        idx = S[2:-1].index('C')
        del S[idx+2]
        del S[0]
        s = ''.join(S)
        if s.islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
s = input()
flag = True
if(s[0] != 'A'):
    flag = False
if(s[-1] == 'C' or s[1] == 'C'):
    flag = False
if(s.count('C') == 0 or s.count('C') >= 2):
    flag = False
if (s.count('A') == 0 or s.count('A') >= 2):
    flag = False
for i in s:
    if(i != 'A' or i != 'C' or i.isupper()):
        flag = False
if(flag):
    print("AC")
else:
    print("WA")


s = input()
flag = True
if(s[0] != 'A'):
    flag = False
if(s[-1] == 'C' or s[1] == 'C'):
    flag = False
if(s.count('C') == 0 or s.count('C') >= 2):
    flag = False
if (s.count('A') == 0 or s.count('A') >= 2):
    flag = False
for i in s:
    if(i != 'A' or i != 'C' or s - 'A' >= 0):
        flag = False
if(flag):
    print("AC")
else:
    print("WA")


s = input()
flag = True
if(s[0] != 'A'):
    flag = False
if(s[-1] == 'C' or s[1] == 'C'):
    flag = False
if(s.count('C') == 0 or s.count('C') >= 2):
    flag = False
for i in s:
    if(i != 'A' and i != 'C' and i.isupper()):
        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):
S = list(input())
if 'C' in S[2:-1]:
    C = S[2:-1].index('C')
else:
    C = -1
if(S[0]=='A' and C!=-1):
    S.pop(0)
    S.pop(C+1)
    print(S)
    if [s for s in S if s.isupper()] == []:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

S = list(input())
if(S[0]=='A' and 'C' in S[2:-1]):
    del S[0]
    S[2:-1].remove('C')
    if [s for s in S if s.isupper()] == []:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

S = list(input())
if 'C' in S[2:-1]:
    indC = S[2:-1].index('C')
else:
    indC = -1

if((S[0]=='A') and (indC !=-1)):
    del S[indC]
    del S[0]
    if [s for s in S if s.isupper()] == []:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

S = list(input())
if 'C' in S[2:-1]:
    C = S[2:-1].index('C')
else:
    C = -1
if(S[0]=='A' and C!=-1):
    S.pop(0)
    S.pop(C+1)
    print(S)
    if [s for s in S if s.isupper()] == []:
        print("AC")
    else:
        print("WA")
else:
    print("WA")

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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import re
S = list(input())
ans=0
cou=2
Ccou=0
A=S.count('A')
C=S.count('C')
jud = len(re.findall('[a-z]', S))
rep=len(S)-2
if S[0]=='A':
    ans=+1
rep=len(S)-2
for i in range(1,rep):
    if S[cou]=='C':
        Ccou=Ccou+1
    cou=cou+1
if Ccou == 1:
    ans=ans+1
if ans ==2 and A==1 and C==1 and jud==2:
    print("AC")
else:
    print("WA")

import re
S = list(input())
S2=''.join(S)
ans=0
cou=2
Ccou=0
A=S.count('A')
C=S.count('C')
jud = len(re.findall('[A-Z]', S2))
rep=len(S)-2
if S[0]=='A':
    ans=+1
rep=len(S)-2
for i in range(1,rep):
    if S[cou]=='C':
        Ccou=Ccou+1
    cou=cou+1
if Ccou == 1:
    ans=ans+1
if ans ==2 and A==1 and C==1 and jud==2:
    print("AC")
else:
    print("WA")

Verdicts: Runtime Error

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

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

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

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

s = input()
if s[0] == 'A' and 'C' in s[2:-1]:
     a = list(s)
     a.remove('A')
     a.remove('C')
     a = str(a)
     if a.islower() == 0:
          print('AC')
     else:
          print('WA')
else:
     print('WA')

s = input()
ans = 'WA'
a = []
if s[0] == 'A' and s[2:-1].count('C') == 1:
     a = list(s)
     a.remove('A')
     a.remove('C')
     a = str(a)
     if a.islower() == 0:
          ans = 'AC'
print(ans)

s = input()
ans = 'WA'
if s[0] == 'A' and 'C' in s[2:-1]:
     a = list(s)
     a.remove('A')
     a.remove('C')
     a = str(a)
     if a.islower() == 0:
          ans = 'AC'
print(ans)

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

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

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

s = str(input())
ans = 0
if s[0] == 'A':
    for i in range(3, len(s)-1):
        if s[i] == 'C':
            ans += 1
        if s[i].isupper() or s[1].isuuper():
            print('WA')
            exit()
    
    if ans == 1:
        print('AC')
        exit()
else:
    print('WA')

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

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

s = str(input())

if s[0] != A:
    print('WA')
    break
else:
    for i in range(len(s)-1):
        if s[i] == C:
            s = s[1:i-1] + s[i+1:]
            break
    if s.islower() == True:
        print('AC')
    else:
        print('WA')

s = str(input())
ans = 0
if s[0] == 'A':
    for i in range(3, len(s)-1):
        if s[i] == 'C':
            ans += 1
        if s[i].isupper():
            print('WA')
            exit()
        if s[1].isupper():
          print('WA')
          exit()
    
    if ans == 1:
        print('AC')
        exit()
else:
    print('WA')

s = str(input())
ans = 0
if s[0] == 'A':
    for i in range(3, len(s)-1):
        if s[i] == 'C':
            ans += 1
        if s[i].isupper():
            print('WA')
            exit()
    
    if ans == 1:
        print('AC')
        exit()
else:
    print('WA')

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

s = str(input())

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

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

Submission attempts (in order):
a=input()
ans="AC"
if not a[0]=="A":
  ans="WA"
if not "C" in a[2:-2]:
  ans="WA"
a.replace("A","").replace("C","")
if not a.islower():
  ans="WA"
print(ans)
  

a=input()
ans="AC"
if not a[0]=="A":
  ans="WA"
if not "C" in a[2:-2]:
  ans="WA"
a.remove("A").remove("C")
if not a.islower():
  ans="WA"
print(ans)
  

a=input()
ans="AC"
if not a[0]=="A":
  ans="WA"
if not a[2:-1].count("C")==1:
  ans="WA"
a=a.replace("A","",1).replace("C","",1)
if not a.islower():
  ans="WA"
print(ans)
  

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 re
S = input()
c = r"A[a-z]+C[a-z]+$"
print("AC" if re.match(c,s) else "WA")



import re
S = input()
c = r"A[a-z]+C[a-z]+$"
print("AC" if re.match(c,S) 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()
l = len(s)
if s[0] !="A":
    print("WA")
    break
else:
    s = s.replace(s[0],"a")
    index1 = s.find("C")
    index2 = s.find("C", 2)
    if index2 != -1 or (index1 < 2 or index1 > l-3):
        print("WA")
    else:
        s = s.replace("A","a")
        s_lower = s.lower()
        if s != s_lower:
            print("WA")
        else:
            print("AC")

s = input()
l = len(s)
if s[0] !="A":
    print("WA")
else:
    s = s.replace(s[0],"a")
    index1 = s.find("C")
    s = s.replace(s[index1],"c")
    index2 = s.find("C")

    if index2 != -1 or (index1 < 2 or index1 > l-3):
        print("WA")
    else:
        s_lower = s.lower()

        print(s)

        if s != s_lower:
            print("WA")
        else:
            print("AC")


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

Verdicts: Runtime Error

Wrong Answer

Accepted