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):
n=input()
wa=0
#print(n[2:len(n)-1])
if n[0]=="A" and n[2:len(n)-1].count("C")==1 and n[1]!="C" and n[len(n)]!="C":
    wa+=0
    import re
    a=re.sub('[AC ]', '',n)
else:
    wa+=1
    a=n
for i in range(len(a)):
    if 0<= ord(a[i]) - ord('a') <= 26:
        wa+=0
    else:
        wa+=1
if wa==0:
    print("AC")
else:
    print("WA")

n=input()
wa=0
#print(n[2:len(n)-1])
#print(n[len(n)])
if n[0]=="A" and n[2:len(n)-1].count("C")==1 and n[1]!="C" and n[len(n)-1]!="C":
    wa+=0
    import re
    a=re.sub('[AC ]', '',n)
else:
    wa+=1
    a=n
for i in range(len(a)):
    if 0<= ord(a[i]) - ord('a') <= 26:
        wa+=0
    else:
        wa+=1
if wa==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):
s = list(input())
flag = True
if s[0] != "A":
    flag = False
c = False
if s[1].islower():
    flag = False
for i in range(len(s) - 3):
    if s[i + 2] == "C":
        if c:
            flag = False
        c = True
    else:
        if s[i + 2].islower():
            flag = False

if s[-1].islower():
    flag = False


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


s = list(input())
flag = True
if s[0] != "A":
    flag = False
c = False
if s[1].isupper() and s[1] != "A" and s[1] != "C":
    flag = False
for i in range(len(s) - 3):
    if s[i + 2] == "C":
        if c:
            flag = False
        c = True
    else:
        if s[i + 2].isupper() and s[i + 2] != "A" and s[i + 2] != "C":
            flag = False

if s[-1].isupper() and s[-1] != "A" and s[-1] != "C":
    flag = False


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


Verdicts: Wrong Answer

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

Submission attempts (in order):
# coding: utf-8
# Your code here!
import sys
s = str(input())

ch = s[0]

test_st = s[2:-1]
#print(test_st)
count = 0
if ch == 'A':
    for i in range(len(test_st)):
        if test_st[i] == 'C':
            count += 1
            if count == 1:
                test_stx = test_st[:i]+test_st[i+1:]
    if count == 1 and test_stx.islower():
        print(test_stx,test_st)
        print('AC')
    else:
        print('WA')
else:
    print('WA')
        


import sys
s = str(input())

if s[0] != 'A':
    print('WA')
    sys.exit()
    
test_st = s[2:-1]
#print(test_st)
test_stx =''
for i in range(len(test_st)):
    if test_st[i] == 'C':
        test_stx = s[1]+test_st[:i] + test_st[i+1:]+s[-1]
        #print(test_stx)
    
if test_stx.islower() and len(test_stx) >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):
import re
print('YES') if re.match(r'A[a-z]+C[a-z]+', input()) else print('NO')

import re
print('AC') if re.match(r'^A[a-z]+C[a-z]+$', input()) 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())
ans ="AC"
if S[0]!="A":
    ans ="WA"
if S.count("C") !=1:
    ans ="WA"
if S[2:-1].count("C")!=1:
    ans ="WA"
if S[0]==("A"):
    del S[0]
if S.count("C")>0:
    S.remove("C")
for i in range(len(S)):
    if (S[i]).isupper:
        ans = "WA"
print(ans)

S = list(input())
ans ="AC"
if S[0]!="A":
    ans ="WA"
if S.count("C") !=1:
    ans ="WA"
if S[2:-1].count("C")!=1:
    ans ="WA"
if S[0]==("A"):
    del S[0]
if S.count("C")>0:
    S.remove("C")
S = str(S)
for i in range(len(S)):
    if (S[i]).isupper():
        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()
if s[0]!="A":
    print("WA")
elif "C" not in s[2:] or s[2:].count("C")!=1:
    print("WA")
elif s[1:].strip("C")==str.lower(s[1:].strip("C")):
    print("AC")
    
else:
    print("WA")

#104
s=input()
if s[0]!="A":
    print("WA")
elif "C" not in s[2:-1] or s[2:-1].count("C")!=1:
    print("WA")
elif s[1]==str.upper(s[1]):
    print("WA")
elif (s[1:2]+s[-1]).strip("C")==str.lower((s[1:2]+s[-1]).strip("C")):
    print("AC")
else:
    print("WA")

Verdicts: Wrong Answer

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

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

a = -1
c = -1
lower = 0
for i in range(len(s))
  if s[i] == 'A':
    a = i
  if s[i] == 'C':
    c = i
  if 'a' <= s[i] <= 'z':
    lower += 1

if a == 0 and 2 <= c <= len(s) - 2 and lower == len(s) - 2:
  print('AC')
else:
  print('WA')

s = input()

a = -1
c = -1
lower = 0
for i in range(len(s)):
  if s[i] == 'A':
    a = i
  if s[i] == 'C':
    c = i
  if 'a' <= s[i] <= 'z':
    lower += 1

if a == 0 and 2 <= c <= len(s) - 2 and lower == len(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):
a = str(input())

if a[0]=="A":
    if "C" in a[2:len(a)-1]:
        if len(ad)==len(a)-2:
            ad = a[1:].replace("C","")
            if ad.islower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")
            

a = str(input())

if a[0]=="A":
    if "C" in a[2:len(a)-1]:
        ad = a[1:].replace("C","")
        if len(ad)==len(a)-2:
            if ad.islower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")
            

Verdicts: Runtime Error

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

Submission attempts (in order):
s = input()
if s[0] == "A":
  C = []
  for i in range(3, len(s)-2):
    if s[i] == "C":
      C.append(i)
  if len(C) != 1:
    print("WA")
    break 
  else:
    up = False
    for j in range(1,len(s)):
      if j == C[0]:
        pass
      elif s[j].isupper:
        up = True
    if up:
      print("WA")
    else:
      print("AC")
else:
  print("WA")
    

s = list(input())
if s[0] == "A":
  C = []
  for i in range(2, len(s)-1):
    if s[i] == "C":
      C.append(i)
  if len(C) != 1:
    print("WA")
  else:
    up = False
    for j in range(1,len(s)):
      if j == C[0]:
        continue
      elif not s[j].islower():
        up = True
    if up:
      print("WA")
    else:
      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:
  if s[1:].replace("C").islower:
    print("AC")
  else:
    print('WA')  
else:
  print('WA')

s=input()
print(s[2:-1])
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')

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

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

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

Submission attempts (in order):
S = input()
s = list(S)
j= 0
count = 0
if not s[0] == 'A':
    print('WA')
    exit()

for i in s[2:-1]:
    if i == 'C':
        count += 1
        tmp = j
    j += 1
if not count == 1:
    print('WA')
    exit()

del S[0]
del S[tmp-1]

if S.isupper():
    print('WA')
    exit()

print('AC')

s = list(input())
j= 2
count = 0
if not s[0] == 'A':
    print('WA')
    exit()

for i in s[2:-1]:
    if i == 'C':
        count += 1
        tmp = j
    j += 1
if not count == 1:
    print('WA')
    exit()

del s[0]
del s[tmp-1]
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):
S = input()

if S[0] == 'A':
    if 1 < S.find('C') < len(S) - 1:
        S.strip('C')
        if not 'C' in S:
            print('AC')
            exit()

print('WA')

S = input()

if S[0] == 'A':
    index = S.find('C')
    new_S = S[1:index] + S[(index + 1):]
    if 1 < index < len(S) - 1 and new_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):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

alpha2num = lambda c: ord(c) - ord('a') + 1

s = input()
ans = "WA"
if s[0] == "A" and s.count("C") == 1:
    if 2 <= s.index("C") <= len(s) - 2:
        for i in range(1, len(s)):
            if i != s.index("C") and 1 <= alpha2num(s[i]) <= 26:
                ans = "AC"
                continue
            else:
                ans = "WA"
                break
print(ans)

import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

alpha2num = lambda c: ord(c) - ord('a') + 1

s = input()
ans = "WA"
if s[0] == "A" and s.count("C") == 1:
    if 2 <= s.index("C") <= len(s) - 2:
        for i in range(1, len(s)):
            if i == s.index("C"):
                continue
            elif 1 <= alpha2num(s[i]) <= 26:
                ans = "AC"
            else:
                ans = "WA"
                break
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 = list(input())
if (s[0] == "A") and (s[2:-1].count("C")):
    print("aa")
    s[0] = "a"
    s[s[2:-2].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

s = list(input())
if len(s)
if (s[0] == "A") and (s[2:-2].count("C")==1):
    print("aa")
    s[0] = "a"
    s[s[2:-2].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

s = list(input())
if (s[0] == "A") and (s[2:-2].count("C")==1):
    print("aa")
    s[0] = "a"
    s[s[2:-2].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

s = list(input())
if (s[0] == "A") and (s[2:-1].count("C")==1):
    s[0] = "a"
    s[s[2:-1].index("C")+2] = "c"
    l = list()
    for i in range(len(s)):
        l.append(s[i].lower())
    #(s,l)
    if s == l:
        print("AC")
        exit()
print("WA")

Verdicts: Runtime Error

Runtime Error

Wrong Answer

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

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

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

if re.fullmatch(r'A[a-z]+C[a-z]+', S):
    print('AC')
else:
    print('WA')

import re
S = input()   
print('AC' if re.fullmatch(r'A[a-z]+C[a-z]+', 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()

ans = 'WA'

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



S = input()

ans = 'WA'

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


Verdicts: Runtime Error

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

Submission attempts (in order):
# ABC  104 B, accepted
from collections import Counter

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



# ABC  104 B, accepted
from collections import Counter

S = input()
if S[0] == 'A':
    t = Counter(S[2:-1])
    if t['C'] == 1:
        S=S.replace('A', '')
        S=S.replace('C', '')
        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):
S = str(input())
if S[0] == "A":
    S = "a" + S[1:]
    print(S)
    if "C" in S[2:-1]:
        cs = False
        for i,s in enumerate(S[2:-1]):
            if not(cs) and s == "C":
                S = S[:i+2] + "c" + S[i+3:]
                print(S)
                cs = True
        if S.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

S = str(input())
if S[0] == "A":
    S = "a" + S[1:]
    if "C" in S[2:-1]:
        cs = False
        for i,s in enumerate(S[2:-1]):
            if not(cs) and s == "C":
                S = S[:i+2] + "c" + S[i+3:]
                cs = True
        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):
S=input()
if S[0]=="A" and S[2:-1].count("C")==1 and S.count("[A-Z]"):
  print("AC")
else:
  print("WA")


import re
S=input()
if S[0]=="A" and S[2:-1].count("C")==1 and len(re.findall("[A-Z]")):
  print("AC")
else:
  print("WA")


import re
S=input()
if S[0]=="A" and S[2:-1].count("C")==1 and len(re.findall("[A-Z]",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):
str=list(input())
flag=True
if str[0]!='A':
    flag=False
    str[0]='a'
cnt=0
for i in range(2,len(str)-1):
    if str[i]=='C':
        cnt+=1
        if cnt==1:
            str[i]='c'
if cnt!=1:
    flag=False

tmp="".join(str)
if not tmp.islower():
    flag=False

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

str=input()
flag=True
if str[0]!='A':
    flag=False
    str[0]='a'
cnt=0
for i in range(2,len(str)-2):
    if str[i]=='C':
        cnt+=1
        if cnt==1:
            str[i]='c'
if cnt!=1:
    flag=False

if str.islower():
    flag=False

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

str=list(input())
flag=True
if str[0]!='A':
    flag=False
str[0]='a'
cnt=0
for i in range(2,len(str)-1):
    if str[i]=='C':
        cnt+=1
        if cnt==1:
            str[i]='c'
if cnt!=1:
    flag=False

tmp="".join(str)
print(tmp)
if not tmp.islower():
    flag=False

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

str=list(input())
flag=True
if str[0]!='A':
    flag=False
str[0]='a'
cnt=0
for i in range(2,len(str)-1):
    if str[i]=='C':
        cnt+=1
        if cnt==1:
            str[i]='c'
if cnt!=1:
    flag=False

tmp="".join(str)
print(tmp)
if not tmp.islower():
    flag=False

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

str=list(input())
flag=True
if str[0]!='A':
    flag=False
str[0]='a'
cnt=0
for i in range(2,len(str)-1):
    if str[i]=='C':
        cnt+=1
        if cnt==1:
            str[i]='c'
if cnt!=1:
    flag=False

tmp="".join(str)
if not tmp.islower():
    flag=False

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

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

Submission attempts (in order):
s=input()
ls=len(s)
c1=s[0]=="A"
c2=list(s[2:ls-1]).count("S")==1
if c1 and c2:
  s=s.replace("A", "a")
  s=s.replace("S", "s")
  if s.islower():
    print("AC")
  else:
    print("WA")
else:
  print("WA")

s=input()
ls=len(s)
c1=s[0]=="A"
c2=list(s[2:ls-1]).count("C")==1
if c1 and c2:
  s=s.replace("A", "a")
  s=s.replace("C", "c")
  if s.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()
Slist = list(S)
L = len(S)
if S[0] == 'A' and 'C' in S[1:L-1] and Slist.count('C') == 1:
    Slist.remove('A', 'C')
    flag = True
    for s in Slist:
        if s.isupper():
            flag = False
    if flag:
        print('AC')
        exit()
print('WA')


S = input()
Slist = list(S)
L = len(S)
if S[0] == 'A' and 'C' in S[2:L-1] and Slist.count('C') == 1:
    Slist.remove('A')
    Slist.remove('C') 
    flag = True
    for s in Slist:
        if s.isupper():
            flag = False
    if flag:
        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 chk(s):
    if s[0]!="A" or s[2:len(s)-1].count("C")!=1: return "WA"
    l=s.index("C")
    print(l)
    for i in range(len(s)):
        if i not in [0,l] and s[i] not in "abcdefghijklmnopqrstuvwxyz": return "WA"
    return "AC"
    


s=input()
print(chk(s))

import sys
s=input()

if s[0]!="A" or s[3:-1].count('C')!=1: print("WA"),sys.exit()

i=s.find("C",3,-1)
s=s[1:i]+s[i+1:]
print("AC" if s[1:].islower() else "WA")

def chk(s):
    if s[0]!="A" or s[2:len(s)-1].count("C")!=1: return "WA"
    l=s.index("C")
    for i in range(len(s)):
        if i not in [0,l] and s[i] not in "abcdefghijklmnopqrstuvwxyz": return "WA"
    return "AC"
    


s=input()

print(chk(s))

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

a = False
c = False
small = False
for i in range(len(s)):
    if i == 0 and s[i] == "A":
        a = True
    if a == True and i >= 2 and i < len(s) - 1 and s[i] == "C" and c == False:
        c = True
    elif s[i] >= "a" and s[i] <= "z":
        small = True
    else:
        small = False
        break

if a == True and c == True and small == True:
    print("AC")
else:
    print("WA")

s = list(input())

a = False
c = False
small = False
for i in range(len(s)):
    if i == 0 and s[i] == "A":
        a = True
    elif a == True and i >= 2 and i < len(s) - 1 and s[i] == "C" and c == False:
        c = True
    elif s[i] >= "a" and s[i] <= "z":
        small = True
    else:
        small = False
        break

if a == True and c == True and small == True:
    print("AC")
else:
    print("WA")

Verdicts: Wrong Answer

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

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

s = input()
part_of_s = s[2:-1]
sub_s = s.replace('A','')
sub_s = sub_s.replace('C','')

if s[0] != 'A' or part_of_s.count('C') != 1 or sub_s != sub_s.lower():
    print('WA')
    exit()

print('AC')

Verdicts: Wrong Answer

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

Submission attempts (in order):
a=input();b=a[1:].replace('C','');print('WAAC'[a[0]=="A"and1==a[2:-1].count("C")and b.lower()==b::2])

a=input();b=a[1:].replace('C','');print('WAAC'[a[0]=="A"and 1==a[2:-1].count("C")and b.lower()==b::2])

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()
alp = "abcdefghijklmnopqrstuvwxyzC"
ans = "AC"
if S[0] != "A":
    ans = "WA"
flag = 0
for C in S[2:-1]:
    if C == "C":
        flag+=1
    if not c in alp:
        ans = "WA"
if flag != 1:
    ans = "WA"
if not S[1] in alp[:-1]:
    ans = "WA"
if not S[-1] in alp[:-1]:
    ans = "WA"

print(ans)



S = input()
alp = "abcdefghijklmnopqrstuvwxyz"
alpC = "abcdefghijklmnopqrstuvwxyzC"

ans = "AC"
if S[0] != "A":
    ans = "WA"
countC = 0
for i in S[2:-1]:
    if i == "C":
        countC += 1
    if not i in alpC:
        ans = "WA"
if countC != 1:
    ans = "WA"
if not S[1] in alp:
    ans = "WA"
if not S[-1] in alp:
    ans = "WA"
pirnt(ans)

S = input()
alp = "abcdefghijklmnopqrstuvwxyz"
alpC = "abcdefghijklmnopqrstuvwxyzC"

ans = "AC"
if S[0] != "A":
    ans = "WA"
countC = 0
for i in S[2:-1]:
    if i == "C":
        countC += 1
    if not i in alpC:
        ans = "WA"
if countC != 1:
    ans = "WA"
if not S[1] in alp:
    ans = "WA"
if not S[-1] in alp:
    ans = "WA"
print(ans)

Verdicts: Runtime Error

Runtime Error

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

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

l = len(s)
if s[0] != "A":
    print("WA")
    sys.exit()
ss =  s[2:l-1]
if ss.count("C") != 1:
    print("WA")
    sys.exit()

cidx = ss.find("C")+2
sss = s[1:cidx]+s[cidx+1:]
print(sss)
if sss.islower():
    print("AC")
    sys.exit()

print("WA")

import sys
s = input()

l = len(s)
if s[0] != "A":
    print("WA")
    sys.exit()
ss =  s[2:l-1]
if ss.count("C") != 1:
    print("WA")
    sys.exit()

cidx = ss.find("C")+2
sss = s[1:cidx]+s[cidx+1:]
if sss.islower():
    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()

a = S.count('A')
c = S.count('C')

i = S.find('C')
if S[0] == 'A' and a == 1 and c == 1:
    test = S[1:i]+S[i+1:]
    if test.islower():
        print('AC')

        
print('WC')

S = input()

a = S.count('A')
c = S[2:-1].count('C')

i = S.find('C')
if S[0] == 'A' and a == 1 and c == 1:
    temp = S[1:i]+S[i+1:]
    if 1 < i and i < len(S)-1 and temp.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(S[2:-1])
#if S[0] == 'A' and 'C' in S[2:-1] and S[1:].replace('C', '', 1).lower():
#	print('AC')
#else:
#	print('WA')


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

s=list(input())
w=0
c=0
if s[0]!='A':
    w=1
if s[1].isupper():
    w=1
for i in range(2,len(s)-1):
    if s[i]!='C' and s[i].isupper():
        w=1
    elif s[i]=='C':
        c+=1
if s[-1].isupper():
    w=1
if w==0 and c==1:
    print('AC')
else:
    print('WA')


Verdicts: Wrong Answer

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

Submission attempts (in order):
a = input()
def atcoder(p):
    count = 0
    if p[0]=='A':
        count += 1
    count_C=0
    for i in range(len(p)-2):
        if p[i+2]=='C':
            count_C += 1
    if count_C == 1:
        count += 1
    count_c = 0
    for i in range(len(p)-2):
        if p[i].upper() ==p[i]:
            count_c+=1
    if count_c ==2:
        count += 1
    if count ==3:
        print('Yes')
    else:
        print('No')
         
atcoder(a)

a = input()
def atcoder(p):
    count = 0
    if p[0]=='A':
        count += 1
    
    count_C=0
    for i in range(len(p)-2):
        if p[i+2]=='C':
            count_C += 1
    if count_C == 1:
        count += 1
    
    count_c = 0
    for i in range(len(p)-1):
        if p[i].upper() ==p[i]:
            count_c+=1
    if p[len(p)-1]==p[len(p)-1].upper():
        count_c+=2
    if len(p)==3:
        count_c+=2
    if count_c ==2:
        count += 1
    
    
    if count ==3:
        print('AC')
    else:
        print('WA')
         
atcoder(a)
    

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':
    i = S[2:-1].find("C")
    if i != -1:
        i += 2
        for j in range(len(S)):
            if i > 0 and i != j:
                if ord('a') <= ord(S[i]) <= ord('z'):
                    print("AC")
                    exit(0)
print("WA")


S = input()
if S[0] == 'A':
    i = S[2:-1].find("C")
    c = S[2:-1].count("C")
    if i != -1 and c == 1:
        i += 2
        for j in range(len(S)):
            if j > 0 and i != j:
                if not ord('a') <= ord(S[j]) <= ord('z'):
                    break
        else:
            print("AC")
            exit(0)
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" and s[2:-2].count("C") == 1:
  tmp = s[1:]
  tmp.replace("C","")
  ans = "AC" if tmp.islower() else "WA"
  
print(ans)

s = input()
ans = "WA"

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

s = input()
ans = "WA"

if s[0] == "A" and s[2:-1].count("C") == 1:
  tmp = s[1:]
  tmp = tmp.replace("C","")
  ans = "AC" if tmp.islower() else "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):
S = input()
flaglow = True
flagAC = False

for i in range(len(S)):
    if S[i].isupper:
        flaglow = False
if S[0]=='A' and S[2:-1].count('C') == 1:
    flagAC = True

if flaglow and flagAC:
    print('AC')
else:
    print('WA')

S = input()
AS = ''
flag = False
hereC = 0

if S[0]=='A' and S[2:-1].count('C') == 1:
    flag = True
    hereC = S[2:-1].find('C')+2
for i in range(1,len(S)):
    if i != hereC:
        AS += S[i]

if flag and AS.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):
inp = input()
remain = inp[1:-2] + inp[-1]
if inp[0] == "A" && inp[-2] == "C":
  if remain.islower():
    return "AC"
return "WC"

inp = input()
count = 0
index = 0
for i in range(len(inp[2:-1])):
  if inp[2:-1][i] == "C":
      count += 1
      index = i
if inp[0] == "A" and count == 1 and (inp[1:2+index]+inp[3+index:]).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):
import sys
S=input()
first=S[0]
second=S[1]
last=S[len(S)-1]
cnt=0
moji=[i for i in "abcdefghijklmnopqrstuvwxyz"]


if first=="A":
  for i in range(2,len(S)-1):
    print(i)
    if S[i]=="C":
      cnt+=1
    else:
      if (S[i] in moji)==False:
        print("WA")
        sys.exit()

  if cnt==1 and ((last in moji)==True) and ((second in moji)==True):
    print("AC")
  else:
    print("WA")
        
else:
  print("WA")

import sys
S=input()
first=S[0]
second=S[1]
last=S[len(S)-1]
cnt=0
moji=[i for i in "abcdefghijklmnopqrstuvwxyz"]


if first=="A":
  for i in range(2,len(S)-1):
  
    if S[i]=="C":
      cnt+=1
    else:
      if (S[i] in moji)==False:
        print("WA")
        sys.exit()

  if cnt==1 and ((last in moji)==True) and ((second in moji)==True):
    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):
import sys
s=input()
c=0
if s[0]=="A":
    for i in range(2,len(s)-2):
        if s[i]=="C":
            c+=1
            C_nobasyo=i
        else:
            print("WA")
            sys.exit()
    #print(c)=1
    if c==1:
        text=s
        #print(text)
        text=text.replace("C","")
        text=text.lstrip("A")
        #print(text)
        if text.islower()==True:
            print("AC")
        else:
            print("WA")
            sys.exit()
    else:
        print("WA")
        sys.exit()
else:
    print("WA")

import sys
s=input()
c=0
if s[0]=="A":
    for i in range(2,len(s)-1):
        if s[i]=="C":
            c+=1
            C_nobasyo=i
    #print(c)=1
    if c==1:
        text=s
        #print(text)
        text=text.replace("C","")
        text=text.lstrip("A")
        #print(text)
        if text.islower()==True:
            print("AC")
        else:
            print("WA")
            sys.exit()
    else:
        print("WA")
        sys.exit()
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:
        index=s[2:-1].index('C')
        if tmp==tmp.lower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')



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


Verdicts: Runtime Error

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

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

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

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

Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
S = list(input())
L = S[2:len(S)-1]
a = 0
for i in range(len(S)):
    if 64 < (ord(S[i])) <= 90:
        a = a+1

if L.count("C") == 1 and S[0] == "A" and a == 1:
    print("AC")
else:
    print("WA")


S = list(input())
L = S[2:len(S)-1]
a = 0
for i in range(len(S)):
    if 65 < (ord(S[i])) <= 90:
        a = a+1

if L.count("C") == 1 and S[0] == "A" and a == 1:
    print("AC")
else:
    print("WA")

Verdicts: Wrong Answer

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

Submission attempts (in order):
S=str(input())
letter="ABCDEFGHIJKLMNO"
condition1 = S[0]=='A'
condition2 = len([1 for x in S[2:len(S)-1] if x=="C"]) == 1
condition3 = len([1 for x in S if len([1 for y in letter if y>10])==1]) == 2
if condition1 & condition2 & condition3:
  print('AC')
else:
  print('WA')

S=str(input())
letter="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
condition1 = S[0]=='A'
condition2 = len([1 for x in S[2:len(S)-1] if x=="C"]) == 1
count=0
for i in len(S):
  if len([1 for x in letter if x==S[i]]) == 1:
    count = count + 1
condition3 = count == 2
if condition1 & condition2 & condition3:
  print('AC')
else:
  print('WA')


S=str(input())
letter="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
condition1 = S[0]=='A'
condition2 = len([1 for x in S[2:len(S)-1] if x=="C"]) == 1
count=0
for i in range(len(S)):
  if len([1 for x in letter if x==S[i]]) == 1:
    count = count + 1
condition3 = count == 2
if condition1 & condition2 & condition3:
  print('AC')
else:
  print('WA')


Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
def piyo():
    s = list(str(input()))
    c = 0
    if s[0]!="A":
        return "WA"
    if s[1]=="C" or s[2]=="C" or s[len(s)-2]=="C" or s[len(s)-1]=="C":
        return "WA"
    for hage in s:
        if hage!="A" and hage!="C":
            if hage.isupper():
                return "WA"
        if hage=="C":
            c+=1
    if c>1:
        return "WA"
    return "AC"
        
if __name__ == '__main__':
    hoge=piyo()
    print(hoge)


def piyo():
    s = list(str(input()))
    c = 0
    a = 0
    if s[0]!="A":
        return "WA"
    if s[1]=="C" or s[len(s)-1]=="C":
        return "WA"
    for hage in s:
        if hage!="A" and hage!="C":
            if hage.isupper():
                return "WA"
        if hage=="C":
            c+=1
        if hage=="A":
            a+=1
    if c>1 or c==0:
        return "WA"
    if a>1:
        return "WA"
    return "AC"
        
if __name__ == '__main__':
    hoge=piyo()
    print(hoge)

Verdicts: Wrong Answer

Accepted