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 = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
cnt = 0
for i in s[2:-1]:
    if i.isupper() and i!='C':
        ans ="WA"
    elif i=='C':
        cnt +=1

if cnt!=1:
    flag=False
print("AC"if flag else "WA")


s = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
cnt = 0
for i in range(len(s)):
    if s[i].isupper():
        if i == 1 or i!='C' or i==len(s)-1:
            ans = "WA"
        cnt+=1
if cnt!=1:
    ans="WA"
print(ans)


s = input()
ans = "AC"
if s[0] != 'A':
    ans = "WA"
cnt = 0
for i in range(1,len(s)):
    if s[i].isupper():
        if i == 1 or s[i]!= "C" or i==len(s)-1:
            ans = "WA"
        cnt+=1
if cnt!=1:
    ans="WA"
print(ans)


Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
S = input()
flag = False
if S[0] == "A":
    count = 0
    for i,j in enumerate(S[2:-1]):
        if j == "C":
            count+=1
            ind = i+2
    if count == 1:
        tmp = S[1:ind]+A[ind+1:]
        if tmp == tmp.lower():
            flag = True
            
if flag:
    print("AC")
else:
    print("WA")

S = input()
flag = False
if S[0] == "A":
    count = 0
    for i,j in enumerate(S[2:-1]):
        if j == "C":
            count+=1
            ind = i+2
    if count == 1:
        tmp = S[1:ind]+S[ind+1:]
        if tmp == tmp.lower():
            flag = True
            
if flag:
    print("AC")
else:
    print("WA")

Verdicts: Runtime Error

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

Submission attempts (in order):
s = input()
S = s[2:-1]
if s[0]=='A' and S.count('C')==1 and s[:s.index('C')].lower()==s[:s.index('C')] and s[s.index('C')+1:].lower()==s[s.index('C')+1:]:
  print('AC')
else:
  print('WA')

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

def main():
    string = input()
    if string[0] == "A":
        cnt = 0
        index = 0
        for i in range(2, len(string)-1):
            if string[i] == "C":
                cnt += 1
                index = i
        if cnt == 1:
            cp_str = copy.copy(string)
            string = "a" + string[1:index-1] + "c" + string[index+1:]
            if string == cp_str.lower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")


if __name__ == "__main__":
    main()



import copy

def main():
    string = input()
    if string[0] == "A":
        cnt = 0
        index = 0
        for i in range(2, len(string)-1):
            if string[i] == "C":
                cnt += 1
                index = i
        if cnt == 1:
            cp_str = copy.copy(string)
            string = "a" + string[1:index-1] + "c" + string[index+1:]
            print(string)
            print(cp_str)
            if string == cp_str.lower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")


if __name__ == "__main__":
    main()

import copy

def main():
    string = input()
    str_list = list(string)
    if str_list[0] == "A":
        cnt = 0
        index = 0
        for i in range(2, len(str_list)-1):
            if str_list[i] == "C":
                cnt += 1
                index = i
        if cnt == 1:
            str_list[0] = "a"
            str_list[index] = "c"
            str_changed = "".join(str_list)
            if str_changed.islower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")

    else:
        print("WA")


if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import sys
S = str(input())
#print (S)
if S[0:1] == 'A':
    S2 = S[2:-1]
    a = S2.count('C')
    b = S.count ('C')
    c = S.count ('A')
    print (S2)
    if a == 1 and b == 1 and c == 1:
        for i in S:
            if i == 'A' or i == 'C':
                pass
            else:
                if i != i.lower():
                    print ('WA')
                    sys.exit()
        print ('AC')
        sys.exit()
print ('WA')


import sys
S = str(input())
#print (S)

flag = True

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

S2 = S[2:-1]
x = S2.count('C')
if  x != 1:
    flag = False

a = 0
c = 0
for i in S:
    if i == 'A':
        a += 1
    if i == 'C':
        c += 1
    if a >= 2 or c >= 2:
        flag = False
    if i != 'A' and i != 'C':
        if i != i.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 = list(input())
count = 0

if s[0] == "A":
    for i in range(2,len(s)-1):
        if s[i] == "C":
            count += 1
    if count != 1:
        print("WA")
        exit()
    else:
        number = s.index("C")
else:
    print("WA")
    exit()

s.remove(0)
s.remove(number)

for j in s:
    c = j.lower()
    if c == j:
        continue
    else:
        print("WA")
        exit()
print("AC")


s = list(input())
count = 0

if s[0] == "A":
    for i in range(2,len(s)-1):
        if s[i] == "C":
            count += 1
    if count != 1:
        print("WA")
        exit()
    else:
        number = s.index("C")
else:
    print("WA")
    exit()

del s[number]
del s[0]

for j in s:
    c = j.lower()
    if c == j:
        continue
    else:
        print("WA")
        exit()
print("AC")


Verdicts: Runtime Error

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

Submission attempts (in order):
s = input()
t = list(s)
x = 0
y = 0
z = 0
r = []

if t[0] == "A":
  x = 1
  
r.append(t[1])
r.append(t[len(t) - 1])

for i in range(2,len(t) - 1): 
  if t[i] == "C":
    y += 1
  else:
    r.append(t[i])

for j in r:
  if j.isupper():
    z = 1

if x = 1 and y = 1 and z = 0:
  print("AC")
else:
  print("WA")


s = input()
t = list(s)
x = 0
y = 0
z = 0
r = []

if t[0] == "A":
  x = 1
  
r.append(t[1])
r.append(t[len(t) - 1])

for i in range(2,len(t) - 1): 
  if t[i] == "C":
    y += 1
  else:
    r.append(t[i])

for j in r:
  if j.isupper():
    z = 1

if x == 1 and y == 1 and z == 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=input()
if s[0]=="A" and "C" in s[2] and s[1:].replace("C","",1).islower():
    print(s)
else:
    print("WA")

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

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):
# ABC 104: B – AcCepted
s = input()

lowers = 'abcdefghijklmnopqrstuvwxyz'
is_satisfied = 'AC'

print(s[2:-1])

if s[0] == 'A' and s[2:-1].count('C') == 1:
    for letter in s:
        if letter != 'A' and letter != 'C':
            if letter not in lowers:
                is_satisfied = 'WA'
                break
else:
    is_satisfied = 'WA'

print(is_satisfied)

# ABC 104: B – AcCepted
s = input()
alphabets = 'abcdefghijklmnopqrstuvwxyz'

isMeet = 'AC'

if s[0] == 'A':
    if s[2:-1].count('C') == 1:
        t = s[1:].replace('C', '')
        for c in t:
            if c not in alphabets:
                isMeet = 'WA'
                break
    else:
        isMeet = 'WA'
else:
    isMeet = 'WA'

print(isMeet)

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()
d = [chr(ord('A')+i) for i in range(26)]
first = S[0] == 'A'
second = sum([1 if i == 'C' else 0 for i in S[2:-2] ])
third = sum([1 if i in d else 0 for i in S ])
print(first, second, third)
if first and second and third == 2:
    print('AC')
else:
    print('WA')

import re
print(re.match("A[a-z]+C[a-z]+$", input()) and "AC" or "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()
lenlen=len(s)
count=0
if s[0]=="A":
  t=s[2:lenlen-1]
  for i in range(0,len(t)):
    if t[i]=="C":
      count+=1
  if count==1:
    tttt=0
    for j in range(0,lenlen):
      if not 97<=ord(s[j])<=122:
        tttt+=1
    if tttt==2:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")
    

s=input()
lenlen=len(s)
count=0
if s[0]=="A":
  t=s[2:lenlen-1]
  for i in range(0,len(t)):
    if t[i]=="C":
      count+=1
  if count==1:
    tttt=0
    for j in range(0,lenlen):
      if not 97<=ord(s[j])<=122:
        tttt+=1
    if tttt==2:
      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 = list(input())

bl = False

if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
    s[2:len(s)-1].remove('C')
    s.remove('A')
    ss = ''.join(s)
    if ss.islower():
        bl = True

print('AC' if bl else 'WA')


s = list(input())

bl = False
s1 = s[1]
s2 = s[2:len(s)-1]
s3 = s[-1]

if s[0] == 'A' and s[2:len(s)-1].count('C') == 1:
    s2.remove('C')
    s2 = ''.join(s2)
    ss = s1+s2+s3
    if ss.islower():
        bl = True

print('AC' if bl 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()
flag = True
if S[0] != 'A' or S[2:-2].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:
  flag = False
for i in range(2,len(S)-1):
  if s[i] != 'C' and s[i].lower() != s[i]:
    flag = False
print('AC' if flag else 'WA')

S = input()
flag = True
if S[0] != 'A' or S[2:-2].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:
  flag = False
for i in range(2,len(S)-1):
  if s != 'C' and s.lower() != s:
    flag = False
print('AC' if flag else 'WA')

S = input()
flag = True
if S[0] != 'A' or S[2:-1].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:
  flag = False
for i in range(2,len(S)-1):
  if S[i] != 'C' and S[i].lower() != S[i]:
    flag = False
print('AC' if flag else 'WA')

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
S = input()
if S[0] == 'A' and S[2:-1].count('C') == 1:
    print(S[2:-1])
    index_c = S[2:-1].index('C')
    S = S[1:2 + index_c] + S[3 + index_c:]
    if S.islower():
        print('AC')
        exit()
print('WA')

S = input()
if S[0] == 'A' and S[2:-1].count('C') == 1:
    index_c = S[2:-1].index('C')
    S = S[1:2 + index_c] + S[3 + index_c:]
    if S.islower():
        print('AC')
        exit()
print('WA')

Verdicts: Wrong Answer

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

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

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

if s[1].isupper() or s[-1].isupper():
    print("WA")
    exit()

count = 0
for i in s[2:]:
    if s[i].isupper():
        if s[i] == "C":
            count += 1
        else:
            print("WA")
            exit()
        

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

s = input()

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

if s[1].isupper() or s[-1].isupper():
    print("WA")
    exit()

count = 0
for s_ in s[2:]:
    if s_.isupper():
        if s_ == "C":
            count += 1
        else:
            print("WA")
            exit()
        

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

Verdicts: Runtime Error

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

Submission attempts (in order):
s = list(input())
count = 0
flag = 1
if s[0] == "A":
    s[0] = s[0].lower()

for i in range(2, len(s)-1):
    if s[i] == "C":
        s[i] = s[i].lower()
        count += 1
ss = "".join(s)
if ss.isupper() or count != 1:
    flag = 0
else:
    flag = 0
if flag == 1: print("AC")
else: print("WA")


s = list(input())
count = 0
flag = 1
if s[0] == "A":
    s[0] = s[0].lower()
else:
    flag = 0
for i in range(2, len(s)-1):
    if s[i] == "C":
        s[i] = s[i].lower()
        count += 1
ss = "".join(s)
if not(ss.islower()) or count != 1:
    flag = 0
if flag == 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=input()
if S[0]!="A":
  print("WA")
elif len([i for i in S[3:-2] if i == "C"]) != 1:
  print("WA")
elif len([i for i in S if i.islower()]) != len(S)-2:
  print("WA")
else:
  print("AC")
  

S=input()
if S[0]!="A":
  print("WA")
elif len([i for i in S[3:-1] if i == "C"]) != 1:
  print("WA")
elif len([i for i in S if i.islower()]) != len(S)-2:
  print("WA")
else:
  print("AC")

S=input()
if S[0] != "A":
  print("WA")
elif len([i for i in S[2:-1] if i == "C"]) != 1:
  print("WA")
elif len([i for i in S if i.islower()]) != len(S)-2:
  print("WA")
else:
  print("AC")

Verdicts: Wrong Answer

Wrong Answer

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

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

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

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


def main() -> None:
    s = next_str()
    print(("WA", "AC")[judge(s)])


def judge(s: str) -> bool:
    flg = False
    n = len(s)

    for i in range(n):
        if i == 0 and s[i] != 'A':
            return False
        elif 2 <= i < n - 1 and s[i] == 'C' and not flg:
            flg = True
        elif s[i] != s[i].lower():
            return False

    if not flg:
        return False
    return True


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

from sys import stdin


def main() -> None:
    s = next_str()
    print(("WA", "AC")[judge(s)])


def judge(s: str) -> bool:
    flg = False
    n = len(s)

    for i in range(n):
        if i == 0:
            if s[i] != 'A':
                return False
        elif 2 <= i < n - 1 and s[i] == 'C' and not flg:
            flg = True
        elif s[i] != s[i].lower():
            return False

    if not flg:
        return False
    return True


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


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):
# INPUT
a = input()


# PROCESS
answer = ""

if(a[0] != "A"):
  answer = "WA"
else:
  a_list = list(a)
  b_list = a[2:-1]
  if (not b_list.count("C") == 1):
    answer = "WA"
  else:
    C_index = a.find("C")
    a_list.pop(C_index)
    a_join = "".join(a_list)
    if(a_join.islower()):
      answer = "AC"
    else:
      answer = "WA"

# OUTPUT
print(answer)

# INPUT
a = input()


# PROCESS
answer = ""

if(a[0] != "A"):
  answer = "WA"
else:
  a_list = list(a)
  b_list = a[2:-1]
  if (not b_list.count("C") == 1):
    answer = "WA"
  else:
    c = a[1:]
    c_index = c.find("C")
    c_list = list(c)
    c_list.pop(c_index)
    c_join = "".join(c_list)

    if(c_join.islower()):
      answer = "AC"
    else:
      answer = "WA"

# OUTPUT
print(answer)

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

flag = 0

if s[0] == 'A':
    s = s[0].lower() + s[1:]
    print(s)

    for i  in range(2, len(s)-1):
        if s[i]  == 'C':
            flag += 1
            s = s[:(i-1)] + s[i].lower() + s[i+1:]
            print(s)
            break
    
    if s.islower():
        flag += 1


if flag == 2:
    print('AC')
else:
    print('WC')

S = input()
 
 
if S[0] != "A":
    print("WA")
 
elif "C" in S:
    a = S.index("C")
 
    if 2 <= a <= len(S)-2:
        S = S.replace("A", "", 1).replace("C", "", 1)
        
        if S.islower():
            print("AC")
        
        else:
            print("WA")
 
    else:
        print("WA")
 
else:
    print("WA")

Verdicts: Wrong Answer

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

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

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

flag = True

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

l = s[2:len(s)-1]

count = 0
c = 0
for i,x in enumerate(l):
    if x == 'C':
        count += 1
        c = i

if count != 1:
    flag = False

for x in s:
    if x not in list('abcdefghijklmnopqrstuvwxyz'):
        flag = False

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

s = list(input())

flag = True

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

l = s[2:len(s)-1]

count = 0
c = 0
for i,x in enumerate(l):
    if x == 'C':
        count += 1
        c = i

if count != 1:
    flag = False

s.pop(2+c)
s.pop(0)

for x in s:
    if x not in list('abcdefghijklmnopqrstuvwxyz'):
        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):
i = input()

flag = 0

if i[0] is not "A":
    flag = 1

if i[2:-2].count("C") == 1:
    flag = 1

for j in range(65,26+65):
    if (chr(j) == "A" )or (chr(j)=="C"):
        continue
    if chr(j) in i:
        flag = 1

for j in range(65,26+65):
    if chr(j) in i[-1]+i[1]:
        flag = 1


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


i = input()

flag = i[2:-1].count("C")

if i[0] is not "A":
    flag = 0

import re

print(i[2:-1])
print(re.findall("A[a-z][a-z,C]{"+str(len(i)-3)+"}[a-z]",i),flag)

if re.findall("A[a-z][a-z,C]{"+str(len(i)-3)+"}[a-z]",i) and (flag == 1):
    print("AC")

else:
    print("WA")


i = input()

flag = i[2:-1].count("C")

if i[0] is not "A":
    flag = 0

import re
if re.findall("A[a-z][a-z,C]{"+str(len(i)-3)+"}[a-z]",i) and (flag == 1):
    print("AC")

else:
    print("WA")


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
def main():
    S = input()
    flag = True
    cnt = 0
    for i in range(len(S)):
        if not(i == 0 and S[i] == 'A'):
            print("WA")
            return
        elif 2 <= i <= len(S)-1 and S[i] == 'C':
            cnt += 1
        elif S[i].isupper():
            print("WA")
            return
    if cnt == 1:
        print("AC")
    else:
        print("WA")
            
main()

def main():
    S = input()
    flag = True
    cnt = 0
    for i in range(len(S)):
        if i == 0:
            if S[i] != 'A':
                print("WA")
                return
        else:
            if 2 <= i <= len(S)-2 and S[i] == 'C':
                cnt += 1
            elif S[i].isupper():
                print("WA")
                return
    if cnt == 1:
        print("AC")
    else:
        print("WA")
            
main()

Verdicts: Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
S=input()
ans='WA'
tmp=0
for i in range(2:len(S)-1):
  if S[i]=='C':
    tmp+=1
    
if tmp==1:
  ans='AC'
  
print(ans)

  

S=input()

def solve():
  temp=0
  if S[0]!='A':
    print('WA')
    return
  if not 'a'<=S[1]<='z':
    print('WA')
    return
  for i in range(2,len(S)-1):
    if S[i]=='C':
      temp+=1
      if temp>1:
        print('WA')
        return
  if temp==0:
    print('WA')
    return
    
  if not 'a'<=S[len(S)-1]<='z':
    print('WA')
    return
  
  print('AC')

solve()

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

s=input()
ans='AC'
if s[0]!='A':
  ans='WA'
elif s[2:-1].count('C')!=1:
  ans='WA'
s=sorted(s)
if s[2:].islower()==False:
  ans='WA'
print(ans)

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

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


s=input()
ans='AC'
if s[0]!='A':
  ans='WA'
s=s[1:]
if s[1:-1].count('C')!=1:
  ans='WA'
s=s.replace('C','c')
for i in s:
  if i.islower()==False:
    ans='WA'
    break
print(ans)


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
S = list(input())
l = len(S)
if S[0]=="A" and "C" in S[3:l-1]:
  S.remove("A")
  S.remove("C")
  S = "".join(S)
  if S.isupper():
    print("AC")
  else:
    print("WA")
else:
  print("WA")
  
  

S = list(input())
l = len(S)
if S[0]=="A" and "C" in S[2:l-1]:
  S.remove("A")
  S.remove("C")
  S = "".join(S)
  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()
if s[0]==s[0].upper()and s[2]==s[2].upper() and s[3:-1]==s[3:-1].lower()and s[1]==s[1].lower()and s[-1]==s[-1].lower():
    print("AC" , end="")
else:
    print("WA" , end="")




s = input()
    res = "AC"
    for i in s:
        if (i!="A" and i!="C" and i.isupper() == True):
            res = "WA"
            break;

    if (res == "AC" and s[0]=="A" and s.count("C")==1 and  s.index("C")>1 and s.index("C")<len(s)-1 ):
        print("AC")
    else:
        print("WA")

s = input()
f = False
f2 = True
c = 0
if s[0] =="A":
    f = True
for x in s[2:len(s)-1]:
    if x == "C":
        c +=1
    else:
        if x.isupper() or s[-1].isupper():
            f2 = False
if not s[1].islower():
    f2 = False
if f and c == 1 and f2:
    print("AC")
else:
    print("WA")


Verdicts: Wrong Answer

Runtime Error

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

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

if S[0] == 'A':
    flag += 1

for i in range(2,len(S)-1):
    if S[i] == 'C':
        flag += 1
        l = len(S)

S.strip('A')
S.strip('C')

if not S.islower():
    if flag == 2 and len(S) == l-2:
        print('AC')
    else:
        print('WA')    
else:
    print('WA')

S = input()
flag = 0

if S[0] == 'A':
    flag += 1

for i in range(2,len(S)-1):
    if S[i] == 'C':
        flag += 1
        C = i

for i in range(1,len(S)):
    if i != 'C':
        if not S[i].islower():
            flag *= 0

if flag == 2:
    print('AC')
else:
    print('WA')

S = input()
Count = 0

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

else:
    if S[1].isupper() or S[-1].isupper():
        print('WA')
    else:
        for i in S[2:]:
            if i.isupper():
                if Count==0 and i == 'C':
                    Count += 1
                else:
                    print('WA')
                    exit()
        if Count == 1:
            print('AC')
        else:
            print('WA')


Verdicts: Wrong Answer

Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):


import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = readline().decode('utf8').rstrip()
lis = list(S)
print(lis)
if lis[0] == 'A' and 2 <= lis.index('C') <= len(lis) - 1:
    st = ''.join(lis[1:lis.index('C')] + lis[lis.index('C') + 1:])
    print(st)
    if st.lower():
        print('AC')
    else:
        print('WA')

else:
    print('WA')




import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = readline().decode('utf8').rstrip()
lis = list(S)
# print(lis)
print(lis.index('C'))
print(len(lis))
if lis[0] == 'A' and 2 <= lis.index('C') <= len(lis) - 2:
    st = ''.join(lis[1:lis.index('C')] + lis[lis.index('C') + 1:])
    # print(st)
    if st.lower():
        print('AC')
    else:
        print('WA')

else:
    print('WA')




import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = list(readline().decode('utf8').rstrip())
bl = S[0] == 'A'
bl &= ('C' in S[2:-1])

if bl:
    S.remove('A')
    S.remove('C')

bl &= all('a' <= x <= 'z' for x in S)

print('AC' if bl else '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):
import sys
S = list(input())
# S = "Atcoder"
# S = list(S)

if S[0] != "A":
    print("WA")
    sys.exit()
elif S[1].isupper():
    print("WA")
    sys.exit()
elif S[-1].isupper():
    print("WA")
    sys.exit()
elif "C" in S[2:-1]:
    S.remove("C")
    S.remove(0)
    S = str(S)
    if S.islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")

import sys
S = input()

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

SS = S[2:-2]
if "C" in SS:
    SS.pop("C")
    if SS.islower():
        print("AC")
    else:
        print("WA")

else:
    print("WA")

S = list(input())

if S[0] != "A":
    print("WA")
elif "C" in S[2:-1]:
    S.remove("C")
    del S[0]
    S = str(S)
    if S.islower():
        print("AC")
    else:
        print("WA")
else:
    print("WA")

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
import re

S = str(input())

ans = "AC"

uppercount = len(re.findall('[a-z]', S))
if not uppercount == 2:
    ans = "WA"

if not S[0] == "A":
    ans = "WA"

cfind = S[2:-1].find("C")
if cfind < 0 and uppercount == 1:
    ans = "WA"

if not S[1:cfind+2].islower and S[cfind+3:].islower():
    ans = "WA"

print(ans)


import re

S = str(input())

ans = "AC"

uppercount = len(re.findall('[A-Z]', S))
if not uppercount == 2:
    ans = "WA"

if not S[0] == "A":
    ans = "WA"

cfind = S[2:-1].find("C")
if cfind < 0:
    ans = "WA"

if not S[1:cfind+2].islower and S[cfind+3:].islower():
    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()
k = 0
if S[0] == 'A' and S[3:-1].count('C') == 1:
    for i in range(len(S)):
        if S[i].isupper()
            if k == 2:
                print('WA')
                break
            k += 1
    print('AC')
else:
    print('WA')

S = input()
k = 0
if S[0] == 'A' and S[2:-1].count('C') == 1:
    for i in range(len(S)):
        if S[i].isupper():
            if k == 2:
                print('WA')
                exit()
            k += 1
    print('AC')
else:
    print('WA')

Verdicts: Runtime Error

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

Submission attempts (in order):
s=input()
yn=0
if s.count("C")==1 and s[0]=="A" and s[1]!="C" and s[len(s)-1]!="C":
    for i in range(2,len(s)-1):
        if ord(s[i])<96:
            if s[i]!="C":
                yn=1
    if yn==1:
        print("No")
    else:
        print("Yes")
else:
    print("No")


s=input()
yn=0
if s[0]=="A" and ord(s[2])>95 and ord(s[len(s)-1])>95 and s.count("C")==1:
    for i in range(len(s)-3):
        if s[i+2]!="C" and ord(s[i+2])<92:
            yn=1
    if yn==1:
        print("WA")
    else:
        print("AC")
else:
    print("WA")


s=input()
yn=0
num=0
count=0
for i in range(len(s)):
    if i==0:
        if s[0]!="A":
            yn=1
            break
    elif i==1 or i==(len(s))-1:
        if s[i]=="C":
            yn=1
            break
    else:
        if s[i]=="C":
            count+=1
        num=ord(s[i])
        if num<93:
            yn=1
            break
if yn==1:
    print("WA")
elif count==0 or count>1:
    print("WA")
else:
    print("AC")


s=input()
yn=0
if s[0]=="A" and ord(s[1])>95 and ord(s[len(s)-1])>95 and s.count("C")==1:
    for i in range(len(s)-3):
        if s[i+2]!="C" and ord(s[i+2])<92:
            yn=1
    if yn==1:
        print("WA")
    else:
        print("AC")
else:
    print("WA")


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
print("Yes")

# abc104_b.py
S = input()
upper_cnt=0
print(S[2:-1])
for i,c in enumerate(S):
    if (i==0 and c!="A") or S[2:-1].count("C")!=1 or (i==1 and not c.islower()):
        print('WA')
        exit()
    if i>=1 and c.isupper():
         upper_cnt+=1
    if upper_cnt >1:
        print('WA')
        exit()
print('AC')



# abc104_b.py
S = input()
upper_cnt=0
for i,c in enumerate(S):
    if (i==0 and c!="A") or S[2:-1].count("C")!=1 or (i==1 and not c.islower()):
        print('WA')
        exit()
    if i>=1 and c.isupper():
         upper_cnt+=1
    if upper_cnt >1:
        print('WA')
        exit()
print('AC')



Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
s=input()
ans="AC"
cnt1=0
cnt2=0
cnt3=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="WA"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="WA"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt3+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1 or cnt!=0:
    ans="WA"
print(ans)

s=input()
ans="Yes"
cnt1=0
cnt2=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="No"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="No"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt2+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1:
    ans="No"
print(ans)

s=input()
ans="Yes"
cnt1=0
cnt2=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="No"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if s[i]=="C":
            cnt2+=1
        else:
            cnt2+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1:
    ans="No"
print(ans)

s=input()
ans="AC"
cnt1=0
cnt2=0
cnt3=0
for i in range(len(s)):
    if i==0:
        if s[i]!="A":
            ans="WA"
    if i==1:
        cnt1+=s[i].isupper()*1
    if i>=2:
        if i==len(s)-1:
            if s[i]=="C":
                ans="WA"
            elif s[i].isupper()*1>0:
                ans="WA"
        elif s[i]=="C":
            cnt2+=1
        else:
            cnt3+=s[i].isupper()*1
if cnt1!=0 or cnt2!=1 or cnt3!=0:
    ans="WA"
print(ans)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
s=input()
ans='WA'
if s[0]=='A':
  if S[2:-1].count('C')==1:
    c=s.index('C')
    if s[1:c].islower() and s[c:].islower:
      ans='AC'
print(ans)

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


Verdicts: Runtime Error

Accepted