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):
s_list = list(input())
s_list1 = s_list
count = 0

if s_list[0] == "A":
    del s_list[:2], s_list[-1]
    for i in range(len(s_list)):
        if s_list[i] == "C":
            count += 1
            isC = i + 2
    if count != 1:
        print("WA")
    else:
        del s_list1[isC]
        Str = "".join(s_list1)
        if Str.islower():
            print("AC")
        else:
            print("WA")
else:
    print("WA")

s_list = list(input())

if s_list[0] == "A":
    del s_list[:2], s_list[-1]
    print(s_list)
    Str = "".join(s_list)
    if Str.count("C") != 1:
        print("WA")
    else:
        Str = Str.replace("C", "")
        if Str.islower():
            print("AC")
        else:
            print("WA")
else:
    print("WA")

s_list = list(input())
s_list1 = s_list

if s_list[0] == "A":
    del s_list[:2], s_list[-1]
    Str = "".join(s_list)
    if Str.count("C") != 1:
        print("WA")
    else:
        Str = "".join(s_list1)
        Str = Str.replace("C", "")
        if Str1.islower():
            print("AC")
        else:
            print("WA")
else:
    print("WA")

S = list(input())
cnt = 0
if S[0] == "A":
  cnt += 1
  del S[0]
if  "C" in S[1:-1]:
  cnt += 1
  S.remove("C")
if  "C" in S[1:-1]:
  cnt -= 1
  S.remove("C")
if ("".join(S)).islower():
  cnt += 1
if cnt == 3:
  print("AC")
else:
  print("WA")

Verdicts: Runtime Error

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
if S[0]!='A':
  print('WA')
  return
S.lower(0)
for i in range(3,len(S)-1):
  if S[i]=='C':
    count+=1
    S.lower(i)
if count==1 && S.islower():
  print('AC')

s = input()
flag = False

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


Verdicts: Runtime Error

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

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

print(S[2:-1])
if S[0] == "A":
    if S[2:-1].count("C") == 1:
        idx = S.index("C")
        for i, s in enumerate(S):
            if s.isupper():
                if (i == 0) or (i == idx):
                    continue
                else:
                    print("WA")
                    exit()
        print("AC")
        exit()
print("WA")


S = list(input())

if S[0] == "A":
    if S[2:-1].count("C") == 1:
        idx = S.index("C")
        for i, s in enumerate(S):
            if s.isupper():
                if (i == 0) or (i == idx):
                    continue
                else:
                    print("WA")
                    exit()
        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):
for i in range(len(S)):
  if i==0 and S[i]!="A":
    print("WA")
    exit()
  if 2<=i<=len(S)-2 and S[i]=="C":
    cnt+=1
    if cnt>1:
      print("WA")
      exit()
  if 1<=i<=len(S)-1:
    if S[i]!="C" and S[i].isupper():
      print("WA")
      exit()
print("AC")

S = input()
cnt = 0
for i in range(len(S)):
  if i==0 and S[i]!="A":
    print("WA")
    exit()
  if 2<=i<=len(i)-2 and S[i]=="C":
    cnt+=1
    if cnt>1:
      print("WA")
      exit()
  if 1<=i<=len(i)-1:
    if S[i]!="C" and S[i].isupper():
      print("WA")
      exit()
print("AC")
    

S = input()
cnt = 0
for i in range(len(S)):
  if i==0 and S[i]!="A":
    print("WA")
    exit()
  if 2<=i<=len(S)-2 and S[i]=="C":
    cnt+=1
    if cnt>1:
      print("WA")
      exit()
  if 1<=i<=len(S)-1:
    if S[i]!="C" and S[i].isupper():
      print("WA")
      exit()
if cnt<1:
  print("WA")
  exit()
print("AC")


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):
if inp.startswith("A") and inp[2:len(inp)-1].count("C") ==  1 and inp[1:inp.find("C", 0, len(inp) - 1)] == inp[1:inp.find("C", 0, len(inp) - 1)].lower() and inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)] == inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)].lower():
  print("AC")
else:
  print("WA")

inp = input()

#print(inp.startswith("A"))
#print(inp[2:len(inp)-1].count("C") ==  1)



if inp.startswith("A") and inp[2:len(inp)-1].count("C") ==  1 and inp[1:inp.find("C", 0, len(inp) - 1)] == inp[1:inp.find("C", 0, len(inp) - 1)].lower() and inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)] == inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)].lower():
  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()
s = [c for c in s]
flg = False
if s[0] == 'A':
    if s[2:-1].count('C') == 1:
        if s.count('C') == 1:
            s.remove('A')
            s.remove('C')
            print(s)
            for c in s:
                if not c.islower():
                    flg = False
                    break
                flg = True
print('AC' if flg else 'WA')

import sys
s = input()
s = [c for c in s]
flg = False
if s[0] == 'A':
    if s[2:-1].count('C') == 1:
        if s.count('C') == 1:
            s.remove('A')
            s.remove('C')
            for c in s:
                if not c.islower():
                    flg = False
                    break
                flg = True
print('AC' if flg else 'WA')

Verdicts: Wrong Answer

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

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

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

s = input()

if s[0] == 'A':
    index = s.find('C', 2, -1)
    s = s[:index] + s[index + 1:]
    if index > 0:
        if s[1:].islower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print("WA")

Verdicts: Wrong Answer

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

Submission attempts (in order):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')


S=input()

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

import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')


S=input()

if S[0]=="A" and "C" in S[2:-1] and S[1:].replace("C","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())
flag=0
Ccount=0
Lcount=0
Cnumber=-1
if S[0]=="A":
  flag+=1
  del S[0]
if S.count("C")==1:
  flag+=1
  del S[Cnumber]
N=len(S)
if S[0:].islower():
  flag+=1
if flag==3:
  print("AC")
else:
  print("WA")

S=list(input())
flag=0
Ccount=0
Cnumber=0
if S[0]=="A":
  flag+=1
if S[2:-1].count("C")==1:
  flag+=1
  del S[0]
  S.remove("C")
if str(S).islower():
  flag+=1
if flag==3:
  print("AC")
else:
  print("WA")

Verdicts: Runtime Error

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

Submission attempts (in order):
def m():
    s = str(input())
    if s[0] != "A":
        return "WA"
    if s.count("C") != 1:
        return "WA"
    if s[2] != "C" or s[-2] != "C":
        return "WA"
    for c in s[1:]:
        if c == "C":
            continue
        if c.isupper():
            return "WA"
    return "AC"


print(m())


def m():
    s = str(input())
    if s[0] != "A":
        return "WA"
    if s[2:len(s)-1].count("C") != 1:
        return "WA"
    for c in s[1:]:
        if c == "C":
            continue
        if c.isupper():
            return "WA"
    return "AC"


print(m())


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

count_c = 0

if(s[0] == "A"):
    for i in range(1, len(s)):
        if(s[i]=="C" and i >= 2 and i <= len(s)-2):
            count_c += 1
        elif(i.isupper):
            print("WA")
            sys.exit()
            
        
    if(count_c != 1):
        print("WA")
    else:
        print("AC")
else:
    print("WA")

import sys
s = input("")

count_c = 0

if(s[0] == "A"):
    for i in range(1, len(s)):

        if(s[i]=="C" and i >= 2 and i <= len(s)-2):
            count_c += 1
        elif(s[i].isupper()):
            print("WA")
            sys.exit()
            
        
    if(count_c != 1):
        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):
def main():
  s = list(input())

  print(s)

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

  C_counter = 0
  for n in s[2:-1]:    
    if n == 'C':
      C_counter += 1

  if C_counter != 1:
    print('WA')
    return

  for n in s:
    if n == 'A' or n == 'C':
      continue
    if not n.islower():
      print('WA')
      return
  print('AC')
  return




main()

def main():
  s = list(input())

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

  C_counter = 0
  for n in s[2:-1]:    
    if n == 'C':
      C_counter += 1

  if C_counter != 1:
    print('WA')
    return

  for n in s:
    if n == 'A' or n == 'C':
      continue
    if not n.islower():
      print('WA')
      return
  print('AC')
  return




main()

Verdicts: Wrong Answer

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

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


if S[0] == "A":
    C = S[2:-1]
    count = 0
    for c in C:
        if c == "C":
            count = count + 1
        if count==2:
            print("WA")
            sys.exit()
    if count==0:
        print("WA")
        sys.exit()
    S = S[1:]

    for s in S:
        if (ord("z") >= ord(s) and ord("a") <= ord(s)):
            continue
        elif s=="C":
            continue
        else:
            print("WA")
            sys.exit()
    print("AC")
print("WA")


import sys
S = input()


if S[0] == "A":
    C = S[2:-1]
    count = 0
    for c in C:
        if c == "C":
            count = count + 1
        if count==2:
            print("WA")
            sys.exit()
    if count==0:
        print("WA")
        sys.exit()
    S = S[1:]

    for s in S:
        if (ord("z") >= ord(s) and ord("a") <= ord(s)):
            continue
        elif s=="C":
            continue
        else:
            print("WA")
            sys.exit()
    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()

flag = True

if S[0] != 'A':
    flag = False

idx = None
for i, s in enumerate(S[3:-1]):
    if s == 'C':
        if idx == None:
            idx = i + 3
        else:
            flag = False

for i, s in enumerate(S):
    if i == 0 or i == idx:
        continue

    if s != s.lower():
        flag = False

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

S = input()

flag = True

if S[0] != 'A':
    flag = False

idx = None
for i, s in enumerate(S[2:-1]):
    if s == 'C':
        if idx == None:
            idx = i + 2
        else:
            flag = False

if idx == None:
    flag = False

for i, s in enumerate(S):
    if i == 0 or i == idx:
        continue

    if s != s.lower():
        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()
n = len(s)
c = False
for e,i in enumerate(s):
    if e == 0:
        if not i == "A":
            print("WA")
            break
    elif 2 < e < n-2 and i == "C":
        if not c:
            c = True
        else:
            print("WA")
            break
    else:
        if not i in "abcdefghijklmnopqrstuvwxyz":
            print("WA")
            break
else:
    if c:
        print("AC")
    else:
        print("WA")

s = input()
n = len(s)
c = False
for e,i in enumerate(s):
    if e == 0:
        if not i == "A":
            print("WA")
            break
    elif 2 < e < n-1 and i == "C":
        if not c:
            c = True
        else:
            print("WA")
            break
    else:
        if not i in "abcdefghijklmnopqrstuvwxyz":
            print("WA")
            break
else:
    if c:
        print("AC")
    else:
        print("WA")

s = input()
n = len(s)
c = False
for e,i in enumerate(s):
    if e == 0:
        if not i == "A":
            print("WA")
            break
    elif 1 < e < n-1 and i == "C":
        if not c:
            c = True
        else:
            print("WA")
            break
    else:
        if not i in "abcdefghijklmnopqrstuvwxyz":
            print("WA")
            break
else:
    if c:
        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):
def main():
  S = input()
  flag1 = (S[0] == 'A')
  flag2 = (S[2:-1].count('C') == 1)
  flag3 = (S.replace('A', '').replace('C', '').lower()
           == S.replace('A', '').replace('C', ''))

  print(flag1, flag2, flag3)
  if flag1 and flag2 and flag3:
    print('AC')
  else:
    print('WA')


if __name__ == "__main__":
  main()


def main():
  S = input()
  flag1 = (S[0] == 'A')
  flag2 = (S[2:-1].count('C') == 1)
  flag3 = (S.replace('A', '').replace('C', '').lower()
           == S.replace('A', '').replace('C', ''))

  if flag1 and flag2 and flag3:
    print('AC')
  else:
    print('WA')


if __name__ == "__main__":
  main()


Verdicts: Wrong Answer

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

Submission attempts (in order):
import re
print("WA" if re.match('A[a-z][a-z][a-z]*C[a-z]*[a-z]',input()) == None else "AC")

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
s = str(input())
if s[1] = "A" and [s[3], s[-2] ].count("C") == 1 :
    s[1] = a
    s[3] = a
    s[-2] = a
    a = ""
    for i in s:
        a = a + s
    if a.islower() :
        print("AC")
    else:
        print("WA")
else:
    print("WA")

s = str(input())
if s[1] == "A" and [s[3], s[-2] ].count("C") == 1 :
    s[1] = a
    s[3] = a
    s[-2] = a
    a = ""
    for i in s:
        a = a + s
    if a.islower() :
        print("AC")
    else:
        print("WA")
else:
    print("WA")

ss = str(input())
s = list(ss)

if s[0] == "A" and s.count("A") == 1:
    checklist = []
    for i in range(2,len(s)-1):
        checklist.append(s[i])
        
    if checklist.count("C") == 1:
        s.remove("A")
        s.remove("C")
        p = ""
        for i in s:
            p = p + i
        if p.islower():
            print("AC")
        else:
            print("WA")
    else:
        print("WA")
else:
    print("WA")

Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
import sys
s=list(input())
if s[0]!='A':
    print("WA")
    sys.exit()
else:
    s.remove("A")
x=s[1:-1]
if x.count('C')==1:
    s.remove('C')
else:
    print("WA")
    sys.exit()
a=''.join(s)
print(["WA","YES"][a.islower()])


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


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')
    exit(0)

cnt = 0
i = 0
for j, c in enumerate(s):
    if j <= 1 or j == len(s) - 1:
        continue
    print(c)
    if c == 'C':
        cnt += 1
        if cnt == 2:
            print('WA')
            exit(0)
        i = j
if cnt == 0:
    print('WA')
    exit(0)

for j, c in enumerate(s):
    if j == 0 or j == i:
        continue
    if str(c).isupper():
        print('WA')
        exit(0)

print('AC')


s = input()

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

cnt = 0
i = 0
for j, c in enumerate(s):
    if j <= 1 or j == len(s) - 1:
        continue
    if c == 'C':
        cnt += 1
        if cnt == 2:
            print('WA')
            exit(0)
        i = j
if cnt == 0:
    print('WA')
    exit(0)

for j, c in enumerate(s):
    if j == 0 or j == i:
        continue
    if str(c).isupper():
        print('WA')
        exit(0)

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):
R=int(input())
if R<1200:S='B'
elif R<2800:S='R'
else:S='G'
print('A'+S+'C')

S = list(input())
if S[0] != 'A':
    print('WA')
    exit()
S[0] = 'a'
if S.count('C') != 1:
    print('WA')
    exit()
i = S.index('C')
if i == 1 or i == len(S)-1:
    print('WA')
    exit()
S[S.index('C')] = 'c'
if ''.join(S) == ''.join(S).lower():
    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":
    print("WA")
    exit()
if s[1].isupper():
    print("WA")
    exit()
if s[-1].isupper() or s[-1] == "C":
    print("WA")
    exit()
flag = False
for c in s[3:]:
    if c == "C":
        if flag:
            print("WA")
            exit()
        else:
            flag = True
    if c.isupper():
        print("WA")
        exit()
if flag:
    print("AC")
else:
    print("WA")

s = input()
if s[0] != "A":
    print("WA")
    exit()
if s[1].isupper():
    print("WA")
    exit()
if s[-1].isupper() or s[-1] == "C":
    print("WA")
    exit()
flag = False
for c in s[2:]:
    if c == "C":
        if flag:
            print("WA")
            exit()
        else:
            flag = True
    else:
        if c.isupper():
            print("WA")
            exit()
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()
a = False
b = False
c = False
cnt = 0
k = 0

if s[0] == 'A':
	a = True

for c in range(s[2],s[-1]):
	if c == 'C':
		cnt += 1
if cnt == 1:
	b = True

for c in s:
	if c != 'A' or c != 'C':
		if c.islower() == True:
			k += 1

if k == s.length():
	c = True


if a == b == c == True:
	print("AC")
else:
	print("WC")

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

if s[0] != 'A' or text.count('C') != 1 or r != r.lower():
    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()
sa = s.find("A")
sc = s.find("C")
scr = s.rfind("C")
if sa == 0 and sc == scr and 2 <= sc <= len(s) -3:
  print("Yes")
else:
  print("No")


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

s = input()
sa = s.index("A")
sc = s.index("C")
scr = s.rindex("C")
if sa == 1 and sc == scr and 2 <= sc <= len(s) - 3

s = input()
if s[0] == "A" and s[2:-1] in "C":
  i = s.index("C")
  ss = s[1:i] + s[i+i:]
  if ss.islower() == True:
    print("AC")
  else:
    print("WA")
else:
  print("WA")


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

Verdicts: Wrong Answer

Wrong Answer

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):
words = input()
if words.startswith('A') and (words.find("C") >= 2) and not words.endswith("C") and words.count('C') == 1:
    w1 = words.strip("AC")
    if w1.islower():
        print('AC')
    else:
        print("WA")
else:
    print("WA")

words = input()
if words.startswith('A') and words.find('C') >= 2 and not words.endswith("C") and words.count('C') == 1:
    w1 = words.strip("A")
    w2 = w1.replace("C","c")
    if w2.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):
import re

S = input()

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

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

if re.match(r'A[a-z]+C[a-z]+', S) == None:
  print('WA')
  exit()


import re

S = input()

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

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

if re.match(r'A[a-z]+C[a-z]+\Z', S) == None:
  print('WA')
  exit()

print('AC')


Verdicts: Wrong Answer

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

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

s = input()
if s[0]=='A' and 'C' in s[2:-1]:
    s = s.replace('A','',1).replace('C','',1)
    if s == s.lower():
        exit(print('AC'))
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):
word = input()
result="AC"
ccount = 0
for i, c in enumerate(word):
    if c.islower():
        continue
    if c == 'A' and i == 0:
        continue
    if c == 'C' and i > 2 and i < len(word) - 3 and ccount == 0:
        ccount = 1
        continue
    result = "WA"
    break
if ccount == 0:
    result = "WA"
print(result)


word = input()

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

result="AC"
ccount = 0
for i, c in enumerate(word[1:], 1):
    if c.islower():
        continue
    if c == 'C' and i > 1 and i < len(word) - 1:
        ccount += 1
        continue
    result = "WA"
    break
if ccount != 1:
    result = "WA"
print(result)


Verdicts: Wrong Answer

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

Submission attempts (in order):
def main():
    S = input()
    judge = True
    if S[0] == "A":
        S[0] = S[0].lower()
    else:
        judge = False
    if S[1] == "C":
        judge = False
    if S[2:-2].count("C") == 1:
        for n, i in enumerate(S):
            if 2 <= n <= len(S) - 1:
                if i == "C":
                    S[n] = S[n].lower()
    else:
        judge = False
    if S[-1] == "C":
        judge = False
    if S.islower() == False:
        judge = False
    if judge:
        print("AC")
    else:
        print("WA")


if __name__ == '__main__':
    main()


#!/usr/bin/env python3


def main():
    S = input()
    judge = 0
    t = S
    if S[0] == "A":
        judge += 1
        S[0] = S[0].lower()
    else:
        print("WA")
        exit()
    if S[1] == "C":
        print("WA")
        exit()
    if S[2:-2].count("C") == 1:
        judge += 1
        for n, i in enumerate(S[2:-2]):
            n += 3
            if i == "C":
                S[n] = S[n].lower()
    else:
        print("WA")
        exit()
    if S[-1] == "C":
        print("WA")
        exit()
    if S.islower():
        judge += 1
    else:
        print("WA")
        exit()
    if judge == 3:
        print("AC")
    else:
        print("WA")
        exit()


if __name__ == '__main__':
    main()


#!/usr/bin/env python3


def main():
    S = list(input())
    judge = True
    if S[0] == "A":
        S[0] = S[0].lower()
    else:
        judge = False
    if S[1] == "C":
        judge = False
    if S[2:-1].count("C") == 1:
        for n, i in enumerate(S):
            if 2 <= n <= len(S) - 1:
                if i == "C":
                    S[n] = S[n].lower()
    else:
        judge = False
    if S[-1] == "C":
        judge = False
    S = "".join(S)
    if S.islower() == False:
        judge = False
    if judge:
        print("AC")
    else:
        print("WA")


if __name__ == '__main__':
    main()


Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
s = input()
t = s[2:-1]
count = 0
q = [t[1]]
for i in range(len(t)):
    if t[i] == "C":
        count += 1
    else:
        q.append(t[i])
q.append(t[-1])
q = ''.join(q)
if s[0] == "A" and count == 1 and str(q).lower ==q:
    print("AC")
else:
    print("WA")
    

s = input()
t = s[2:-1]
count = 0
q = [s[1]]
for i in range(len(t)):
    if t[i] == "C":
        count += 1
    else:
        q.append(t[i])
q.append(s[-1])
q =''.join(q)
if s[0] == "A" and count == 1 and str(q).lower() ==str(q):
    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()
count = 0

if S[0] == 'A':
    count += 1
if 'C' in S[2:-1]:
    count += 1
print(S)
S = S.replace("A", "")
S = S.replace("C", "")

if S.islower():
    count += 1

if count == 3:
    print("AC")
else:
    print('WA')

S = input()
count = 0

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

if count == 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()
smalls = "abcdefghijklmnopqrstuvwxyz".split()
def solve(s):
    count = 0
    if s[0] != "A":
        return False
    if s[1] not	in smalls:
	return False
    for char in s[2:]:
	if char	not in smalls:
            return False
	if char	== "C":
            count += 1
    if count !=	1:
	return False
    return True

if solve(s):
    print("AC")
else:
    print("WA")



s = input()
smalls = "abcdefghijklmnopqrstuvwxyz"
def solve(s):
    count = 0
 
    if s[0] != "A":
        return False
 
    if s[1] not in smalls:
        return False
    for char in s[2:-1]:
        if char == "C":
            count += 1
            continue
 
        if char not in smalls:
            return False
    if count != 1:
        return False
    if s[-1] not in smalls:
	    return False
    return True
 
if solve(s):
    print("AC")
else:
    print("WA")

Verdicts: Runtime Error

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

Submission attempts (in order):
input_a = input()
if input_a[0] != 'A':
    print("WA")
elif input_a.count('C')==0:
    print("WA")
elif input_a.count('C')>1:
    print("WA")
elif input_a.index('C') ==1:
    print("WA")
elif input_a.index('C') ==len(input_a)-1:
    print('WA')
elif input_a.count('C') ==1:
    if input_a.strip("A").strip('C').islower():
        print('AC')
    else:
        print('WA')

input_a = input()

if input_a[0]　!= 'A':
    print("WA")
elif input_a.count('C')==0:
    print("WA")
elif input_a.count('C')>1:
    print("WA")
elif input_a.index('C') ==1:
    print("WA")
elif input_a.index('C') ==len(input_a)-1:
    print('WA')
elif input_a.count('C') ==1:
    if input_a.strip("A").strip('C').islower():
        print('AC')
    else:
        print('WA')

input_a = input()
if input_a[0] != 'A':
    print("WA")
elif input_a.count('C')==0:
    print("WA")
elif input_a.count('C')>1:
    print("WA")
elif input_a.index('C') <=1:
    print("WA")
elif input_a.index('C') ==len(input_a)-1:
    print('WA')
elif input_a.count('C') ==1:
    if input_a.replace('A','a').replace('C','c').islower():
        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):
a = input()
b = a[2:-1]
if a.startswith("A"):
    if b.count("C") == 1:
        c = list(a)
        c.remove("A")
        c.remove("C")
        print(c)
        for i in c:
            if i.isupper():
                break
        print("AC")
        exit()
print("WA")


a = input()
b = a[2:-1]
if a.startswith("A"):
    if b.count("C") == 1:
        c = list(a)
        c.remove("A")
        c.remove("C")
        for i in c:
            if i.isupper():
                print("WA")
                exit()
        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=str(input)
slist=list(S)
flag=0
if slist[0]!="A":
  flag=1
klist=slist[2:-1]
c=klist.count("C")
if c!=1:
  flag=1
if flag==0:
  print("AC")
else:
  print("WA")

S=str(input)
slist=list(S)
flag=0
if slist[0]!="A":
  flag=1
klist=slist[2:-1]
c=klist.count("C")
if c!=1:
  flag=1
del slist[0]
if "C" in slist:
  slist.remove("C")
SS=""
for x in slist:
  SS+=x
if SS.islower():
  pass
else:
  flag=1
if flag==0:
  print("AC")
else:
  print("WA")

S=str(input())
slist=list(S)
flag=0
if slist[0]!="A":
  flag=1
klist=slist[2:-1]
c=klist.count("C")
if c!=1:
  flag=1
del slist[0]
if "C" in slist:
  slist.remove("C")
SS=""
for x in slist:
  SS+=x
if SS.islower():
  pass
else:
  flag=1
if flag==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):
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')


S = input()
flg = 0
if S[0] == 'A':
    flg += 1
if S[1].isupper():
    flg += 1000
for i in range(2, len(S)-1):
    if S[i] == 'C':
        flg += 10
    elif S[i].isupper():
        flg += 1000
if S[-1].isupper():
    flg += 1000
print(flg)
if flg == 11:
    print('AC')
else:
    print('WA')


S = input()
flg = 0
if S[0] == 'A':
    flg += 1
if S[1].isupper():
    flg += 1000
for i in range(2, len(S)-1):
    if S[i] == 'C':
        flg += 10
    elif S[i].isupper():
        flg += 1000
if S[-1].isupper():
    flg += 1000
if flg == 11:
    print('AC')
else:
    print('WA')


Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
word = input('')

ans = 'WA'


if  (word[0] == 'A'):
    tmp = word[2:-1]
    number_c = 0
    for i in range(len(tmp)):
        if  tmp[i] == 'C':
            number_c += 1
            serial_c = i+2        
    if  number_c == 1:
        word_del = word[0:serial_c-1] + word[serial_c:]
        word_del = word_del[1:]
        
        if  word_del.islower():
            ans = 'AC'
print(ans)

word = input('')

ans = 'WA'

if  (word[0] == 'A'):
    tmp = word[2:-1]
    number_c = 0
    for i in range(len(tmp)):
        if  tmp[i] == 'C':
            number_c += 1
            serial_c = i+2
    if  number_c == 1:
        word_del = word[0:serial_c] + word[serial_c+1:]
        word_del = word_del[1:]
        
        if  word_del.islower():
            ans = 'AC'
print(ans)

Verdicts: Wrong Answer

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

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

cnt = 0
for c in s:
    if c.isupper() and c == "A":
        cnt = cnt + 1

if cnt != 2:
    print("WA")
    exit()

if not s[0].isupper():
    print("WA")
    exit()

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

s = list(input())
ans = "AC"
if s[0] != "A" or s.count("C") !=1 or s[2:-1].count("C") != 1 or ''.join([i for i in s if i != "A" and i != "C"]).islower != True:
    ans = "WA"
print(ans)

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

Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
B = input()
A = B
a = 0
if S[0] == "A":
    if S[2:-2].count("C") == 1:
        if "C" in S[2:-2]:
            t = 2 + S[2:-2].index("C")
            S = str(S.lstrip("A"))
            S = str(S[0] + S[1:t-1] + S[t:])
            if S.islower():
                a = 1
if a == 1:
    print("AC")
else:
    print("WA")
    S = S.replace("A", "")
    if S.islower():
        pass


S = input()
a = 0
if S[0] == "A":
    if S.count("C") == 1:
        if S[2] == "C" or S[-2] == "C":
            S = str(S.replace("A", "", 1))
            S = str(S.replace("C", ""), 1)
            A = S.islower()
            if A == True:
                a = 1
if a == 1:
    print("AC")
else:
    print("WA")


S = input()
if S[0] == "A":
    print(S)
    if S[2] in "C" or S[-2] == "C":
        if not S[2] in "C" and S[-2] == "C":
            S = S.replace("C", "")
            S = S.replace("A", "")
            if S.islower() == True:
                print("AC")
            else:
                print("WA")
                exit()
        else:
            print("WA")
            exit()
    else:
            print("WA")
            exit()
else:
    print("WA")

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


S = input()
a = 0
if S[0] == "A":
    if S[2:-2].count("C") == 1:
        if "C" in S[2:-2]:
            S = str(S.replace("A", "", 1))
            S = str(S[0] + S[1:-2].replace("C", "", 1) + S[-2:])
            print(S)
            A = S.islower()
            if A == True:
                a = 1
if a == 1:
    print("AC")
else:
    print("WA")


B = input()
S = B
a = 0
if S[0] == "A":
    if S[2:-1].count("C") == 1:
        if "C" in S[2:-1]:
            t = 2 + S[2:-1].index("C")
            S = str(S.lstrip("A"))
            S = str(S[0] + S[1:t-1] + S[t:])
            if S.islower():
                a = 1
if a == 1:
    print("AC")
else:
    print("WA")

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted