problem_id
stringlengths 6
6
| user_id
stringlengths 10
10
| time_limit
float64 1k
8k
| memory_limit
float64 262k
1.05M
| problem_description
stringlengths 48
1.55k
| codes
stringlengths 35
98.9k
| status
stringlengths 28
1.7k
| submission_ids
stringlengths 28
1.41k
| memories
stringlengths 13
808
| cpu_times
stringlengths 11
610
| code_sizes
stringlengths 7
505
|
---|---|---|---|---|---|---|---|---|---|---|
p03289 | u159574168 | 2,000 | 1,048,576 | 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. | ['a = str(input())\n\nif a[0]=="A":\n if "C" in a[2:len(a)-1]:\n if len(ad)==len(a)-2:\n ad = a[1:].replace("C","")\n if ad.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")\n ', 'a = str(input())\n\nif a[0]=="A":\n if "C" in a[2:len(a)-1]:\n ad = a[1:].replace("C","")\n if len(ad)==len(a)-2:\n if ad.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")\n '] | ['Runtime Error', 'Accepted'] | ['s509273299', 's559620866'] | [3060.0, 3060.0] | [19.0, 18.0] | [335, 331] |
p03289 | u163449343 | 2,000 | 1,048,576 | 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. | ['s = input()\nif s[0] == "A":\n C = []\n for i in range(3, len(s)-2):\n if s[i] == "C":\n C.append(i)\n if len(C) != 1:\n print("WA")\n break \n else:\n up = False\n for j in range(1,len(s)):\n if j == C[0]:\n pass\n elif s[j].isupper:\n up = True\n if up:\n print("WA")\n else:\n print("AC")\nelse:\n print("WA")\n ', 's = list(input())\nif s[0] == "A":\n C = []\n for i in range(2, len(s)-1):\n if s[i] == "C":\n C.append(i)\n if len(C) != 1:\n print("WA")\n else:\n up = False\n for j in range(1,len(s)):\n if j == C[0]:\n continue\n elif not s[j].islower():\n up = True\n if up:\n print("WA")\n else:\n print("AC")\nelse:\n print("WA")\n \n'] | ['Runtime Error', 'Accepted'] | ['s652876183', 's207382064'] | [3060.0, 3060.0] | [17.0, 17.0] | [361, 367] |
p03289 | u163791883 | 2,000 | 1,048,576 | 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. | ['s=input()\nif s[0] =="A" and s[2:-1].count("C") ==1:\n if s[1:].replace("C").islower:\n print("AC")\n else:\n print(\'WA\') \nelse:\n print(\'WA\')', 's=input()\nprint(s[2:-1])\nif s[0] =="A" and s[2:-1].count("C") ==1:\n if s[1:].replace("C").islower:\n print("AC")\n else:\n print(\'WA\') \nelse:\n print(\'WA\')', "s=input()\nprint(s[1:].replace('C', ''))\nif s[0] =='A' and s[2:-1].count('C') ==1 and s.replace('A', '').replace('C', '').islower:\n print('AC')\nelse:\n print('WA')", "s=input()\nif s[0] =='A' and s[2:-1].count('C') ==1 and s[1:].replace('C', '').islower():\n print('AC')\nelse:\n print('WA')"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s025594855', 's027886951', 's107520115', 's810107151'] | [2940.0, 3060.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0] | [146, 161, 163, 122] |
p03289 | u173178698 | 2,000 | 1,048,576 | 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. | ["S = input()\ns = list(S)\nj= 0\ncount = 0\nif not s[0] == 'A':\n print('WA')\n exit()\n\nfor i in s[2:-1]:\n if i == 'C':\n count += 1\n tmp = j\n j += 1\nif not count == 1:\n print('WA')\n exit()\n\ndel S[0]\ndel S[tmp-1]\n\nif S.isupper():\n print('WA')\n exit()\n\nprint('AC')", "s = list(input())\nj= 2\ncount = 0\nif not s[0] == 'A':\n print('WA')\n exit()\n\nfor i in s[2:-1]:\n if i == 'C':\n count += 1\n tmp = j\n j += 1\nif not count == 1:\n print('WA')\n exit()\n\ndel s[0]\ndel s[tmp-1]\ns = ''.join(s)\n\nif s.islower():\n print('AC')\n exit()\n\nprint('WA')"] | ['Runtime Error', 'Accepted'] | ['s270276113', 's562964193'] | [3064.0, 3064.0] | [17.0, 17.0] | [293, 302] |
p03289 | u175426149 | 2,000 | 1,048,576 | 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. | ["S = input()\n\nif S[0] == 'A':\n if 1 < S.find('C') < len(S) - 1:\n S.strip('C')\n if not 'C' in S:\n print('AC')\n exit()\n\nprint('WA')", "S = input()\n\nif S[0] == 'A':\n index = S.find('C')\n new_S = S[1:index] + S[(index + 1):]\n if 1 < index < len(S) - 1 and new_S.islower():\n print('AC')\n exit()\n\nprint('WA')"] | ['Wrong Answer', 'Accepted'] | ['s038446591', 's488863894'] | [2940.0, 2940.0] | [19.0, 17.0] | [167, 192] |
p03289 | u177411511 | 2,000 | 1,048,576 | 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. | ['import sys\n\nstdin = sys.stdin\n\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nns = lambda: stdin.readline().rstrip() # ignore trailing spaces\n\nalpha2num = lambda c: ord(c) - ord(\'a\') + 1\n\ns = input()\nans = "WA"\nif s[0] == "A" and s.count("C") == 1:\n if 2 <= s.index("C") <= len(s) - 2:\n for i in range(1, len(s)):\n if i != s.index("C") and 1 <= alpha2num(s[i]) <= 26:\n ans = "AC"\n continue\n else:\n ans = "WA"\n break\nprint(ans)', 'import sys\n\nstdin = sys.stdin\n\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nns = lambda: stdin.readline().rstrip() # ignore trailing spaces\n\nalpha2num = lambda c: ord(c) - ord(\'a\') + 1\n\ns = input()\nans = "WA"\nif s[0] == "A" and s.count("C") == 1:\n if 2 <= s.index("C") <= len(s) - 2:\n for i in range(1, len(s)):\n if i == s.index("C"):\n continue\n elif 1 <= alpha2num(s[i]) <= 26:\n ans = "AC"\n else:\n ans = "WA"\n break\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s333920973', 's201578830'] | [3064.0, 3064.0] | [18.0, 17.0] | [549, 563] |
p03289 | u178432859 | 2,000 | 1,048,576 | 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. | ['s = list(input())\nif (s[0] == "A") and (s[2:-1].count("C")):\n print("aa")\n s[0] = "a"\n s[s[2:-2].index("C")+2] = "c"\n l = list()\n for i in range(len(s)):\n l.append(s[i].lower())\n #(s,l)\n if s == l:\n print("AC")\n exit()\nprint("WA")', 's = list(input())\nif len(s)\nif (s[0] == "A") and (s[2:-2].count("C")==1):\n print("aa")\n s[0] = "a"\n s[s[2:-2].index("C")+2] = "c"\n l = list()\n for i in range(len(s)):\n l.append(s[i].lower())\n #(s,l)\n if s == l:\n print("AC")\n exit()\nprint("WA")', 's = list(input())\nif (s[0] == "A") and (s[2:-2].count("C")==1):\n print("aa")\n s[0] = "a"\n s[s[2:-2].index("C")+2] = "c"\n l = list()\n for i in range(len(s)):\n l.append(s[i].lower())\n #(s,l)\n if s == l:\n print("AC")\n exit()\nprint("WA")', 's = list(input())\nif (s[0] == "A") and (s[2:-1].count("C")==1):\n s[0] = "a"\n s[s[2:-1].index("C")+2] = "c"\n l = list()\n for i in range(len(s)):\n l.append(s[i].lower())\n #(s,l)\n if s == l:\n print("AC")\n exit()\nprint("WA")'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s647457038', 's912286546', 's979344281', 's035853198'] | [3064.0, 2940.0, 3064.0, 3064.0] | [17.0, 17.0, 20.0, 17.0] | [272, 285, 275, 259] |
p03289 | u184817817 | 2,000 | 1,048,576 | 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. | ["s = input()\nif s[0] == 'A' and s[2,-1].count('C') == 1 and s[1:].replace('C').islower():\n print('AC')\nelse:\n print('WA')", "s = input()\nif s[0] == 'A' and s[2:-1].count('C') == 1 and s[1:].replace('C','').islower():\n print('AC')\nelse:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s119102569', 's578846685'] | [2940.0, 2940.0] | [17.0, 17.0] | [126, 129] |
p03289 | u185325486 | 2,000 | 1,048,576 | 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. | ["S = input()\n\nif re.fullmatch(r'A[a-z]+C[a-z]+', S):\n print('AC')\nelse:\n print('WA')", "import re\nS = input() \nprint('AC' if re.fullmatch(r'A[a-z]+C[a-z]+', S) else 'WA')"] | ['Runtime Error', 'Accepted'] | ['s404070499', 's626751817'] | [2940.0, 3316.0] | [17.0, 22.0] | [89, 84] |
p03289 | u186206732 | 2,000 | 1,048,576 | 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. | ["\n\nS = input()\n\nans = 'WA'\n\nif S[0] == 'A' and S[2:-1].count('C') == 1:\n a = S[2:-1].replace('C','c')\n if a.islower() and S[-1].islower()\n ans='AC'\n \nprint(ans)\n \n ", "\n\nS = input()\n\nans = 'WA'\n\nif S[0] == 'A' and S[2:-1].count('C') == 1:\n a = S[2:-1].replace('C','c')\n if a.islower() and S[-1].islower() and S[1].islower():\n ans='AC'\n \nprint(ans)\n \n"] | ['Runtime Error', 'Accepted'] | ['s939295807', 's598435751'] | [2940.0, 2940.0] | [17.0, 17.0] | [189, 205] |
p03289 | u188244611 | 2,000 | 1,048,576 | 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. | ["# ABC 104 B, accepted\nfrom collections import Counter\n\nS = input()\nif S[0] == 'A':\n t = Counter(S[2:-1])\n if t['C'] == 1:\n S=S.replace('A', '')\n S=S.replace('C', '')\n print(S)\n if S.islower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')\n\n", "# ABC 104 B, accepted\nfrom collections import Counter\n\nS = input()\nif S[0] == 'A':\n t = Counter(S[2:-1])\n if t['C'] == 1:\n S=S.replace('A', '')\n S=S.replace('C', '')\n if S.islower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')\n\n"] | ['Wrong Answer', 'Accepted'] | ['s604674435', 's401730828'] | [3316.0, 3316.0] | [23.0, 21.0] | [343, 326] |
p03289 | u189575640 | 2,000 | 1,048,576 | 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. | ['S = str(input())\nif S[0] == "A":\n S = "a" + S[1:]\n print(S)\n if "C" in S[2:-1]:\n cs = False\n for i,s in enumerate(S[2:-1]):\n if not(cs) and s == "C":\n S = S[:i+2] + "c" + S[i+3:]\n print(S)\n cs = True\n if S.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', 'S = str(input())\nif S[0] == "A":\n S = "a" + S[1:]\n if "C" in S[2:-1]:\n cs = False\n for i,s in enumerate(S[2:-1]):\n if not(cs) and s == "C":\n S = S[:i+2] + "c" + S[i+3:]\n cs = True\n if S.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s137913677', 's635110740'] | [3064.0, 3060.0] | [17.0, 17.0] | [416, 378] |
p03289 | u190907730 | 2,000 | 1,048,576 | 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. | ['S=input()\nif S[0]=="A" and S[2:-1].count("C")==1 and S.count("[A-Z]"):\n print("AC")\nelse:\n print("WA")\n', 'import re\nS=input()\nif S[0]=="A" and S[2:-1].count("C")==1 and len(re.findall("[A-Z]")):\n print("AC")\nelse:\n print("WA")\n', 'import re\nS=input()\nif S[0]=="A" and S[2:-1].count("C")==1 and len(re.findall("[A-Z]",S))==2:\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s203416641', 's546010142', 's193047194'] | [2940.0, 3188.0, 3188.0] | [19.0, 19.0, 20.0] | [105, 123, 128] |
p03289 | u192541825 | 2,000 | 1,048,576 | 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. | ['str=list(input())\nflag=True\nif str[0]!=\'A\':\n flag=False\n str[0]=\'a\'\ncnt=0\nfor i in range(2,len(str)-1):\n if str[i]==\'C\':\n cnt+=1\n if cnt==1:\n str[i]=\'c\'\nif cnt!=1:\n flag=False\n\ntmp="".join(str)\nif not tmp.islower():\n flag=False\n\nif flag==True:\n print("AC")\nelse:\n print("WA")', 'str=input()\nflag=True\nif str[0]!=\'A\':\n flag=False\n str[0]=\'a\'\ncnt=0\nfor i in range(2,len(str)-2):\n if str[i]==\'C\':\n cnt+=1\n if cnt==1:\n str[i]=\'c\'\nif cnt!=1:\n flag=False\n\nif str.islower():\n flag=False\n\nif flag==True:\n print("AC")\nelse:\n print("WA")', 'str=list(input())\nflag=True\nif str[0]!=\'A\':\n flag=False\nstr[0]=\'a\'\ncnt=0\nfor i in range(2,len(str)-1):\n if str[i]==\'C\':\n cnt+=1\n if cnt==1:\n str[i]=\'c\'\nif cnt!=1:\n flag=False\n\ntmp="".join(str)\nprint(tmp)\nif not tmp.islower():\n flag=False\n\nif flag==True:\n print("AC")\nelse:\n print("WA', 'str=list(input())\nflag=True\nif str[0]!=\'A\':\n flag=False\nstr[0]=\'a\'\ncnt=0\nfor i in range(2,len(str)-1):\n if str[i]==\'C\':\n cnt+=1\n if cnt==1:\n str[i]=\'c\'\nif cnt!=1:\n flag=False\n\ntmp="".join(str)\nprint(tmp)\nif not tmp.islower():\n flag=False\n\nif flag==True:\n print("AC")\nelse:\n print("WA")', 'str=list(input())\nflag=True\nif str[0]!=\'A\':\n flag=False\nstr[0]=\'a\'\ncnt=0\nfor i in range(2,len(str)-1):\n if str[i]==\'C\':\n cnt+=1\n if cnt==1:\n str[i]=\'c\'\nif cnt!=1:\n flag=False\n\ntmp="".join(str)\nif not tmp.islower():\n flag=False\n\nif flag==True:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s063299165', 's635002220', 's749821257', 's901021760', 's606117317'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [321, 294, 326, 328, 317] |
p03289 | u193927973 | 2,000 | 1,048,576 | 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. | ['s=input()\nls=len(s)\nc1=s[0]=="A"\nc2=list(s[2:ls-1]).count("S")==1\nif c1 and c2:\n s=s.replace("A", "a")\n s=s.replace("S", "s")\n if s.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 's=input()\nls=len(s)\nc1=s[0]=="A"\nc2=list(s[2:ls-1]).count("C")==1\nif c1 and c2:\n s=s.replace("A", "a")\n s=s.replace("C", "c")\n if s.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s260293050', 's757856471'] | [3060.0, 3060.0] | [17.0, 17.0] | [205, 205] |
p03289 | u194894739 | 2,000 | 1,048,576 | 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. | ["S = input()\nSlist = list(S)\nL = len(S)\nif S[0] == 'A' and 'C' in S[1:L-1] and Slist.count('C') == 1:\n Slist.remove('A', 'C')\n flag = True\n for s in Slist:\n if s.isupper():\n flag = False\n if flag:\n print('AC')\n exit()\nprint('WA')\n", "S = input()\nSlist = list(S)\nL = len(S)\nif S[0] == 'A' and 'C' in S[2:L-1] and Slist.count('C') == 1:\n Slist.remove('A')\n Slist.remove('C') \n flag = True\n for s in Slist:\n if s.isupper():\n flag = False\n if flag:\n print('AC')\n exit()\nprint('WA')\n"] | ['Runtime Error', 'Accepted'] | ['s736230107', 's572846258'] | [3064.0, 3060.0] | [18.0, 18.0] | [273, 291] |
p03289 | u197300773 | 2,000 | 1,048,576 | 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. | ['def chk(s):\n if s[0]!="A" or s[2:len(s)-1].count("C")!=1: return "WA"\n l=s.index("C")\n print(l)\n for i in range(len(s)):\n if i not in [0,l] and s[i] not in "abcdefghijklmnopqrstuvwxyz": return "WA"\n return "AC"\n \n\n\ns=input()\nprint(chk(s))', 'import sys\ns=input()\n\nif s[0]!="A" or s[3:-1].count(\'C\')!=1: print("WA"),sys.exit()\n\ni=s.find("C",3,-1)\ns=s[1:i]+s[i+1:]\nprint("AC" if s[1:].islower() else "WA")', 'def chk(s):\n if s[0]!="A" or s[2:len(s)-1].count("C")!=1: return "WA"\n l=s.index("C")\n for i in range(len(s)):\n if i not in [0,l] and s[i] not in "abcdefghijklmnopqrstuvwxyz": return "WA"\n return "AC"\n \n\n\ns=input()\n\nprint(chk(s))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s170195460', 's791390239', 's032092407'] | [3060.0, 3060.0, 3060.0] | [24.0, 17.0, 18.0] | [263, 161, 251] |
p03289 | u202826462 | 2,000 | 1,048,576 | 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. | ['s = list(input())\n\na = False\nc = False\nsmall = False\nfor i in range(len(s)):\n if i == 0 and s[i] == "A":\n a = True\n if a == True and i >= 2 and i < len(s) - 1 and s[i] == "C" and c == False:\n c = True\n elif s[i] >= "a" and s[i] <= "z":\n small = True\n else:\n small = False\n break\n\nif a == True and c == True and small == True:\n print("AC")\nelse:\n print("WA")', 's = list(input())\n\na = False\nc = False\nsmall = False\nfor i in range(len(s)):\n if i == 0 and s[i] == "A":\n a = True\n elif a == True and i >= 2 and i < len(s) - 1 and s[i] == "C" and c == False:\n c = True\n elif s[i] >= "a" and s[i] <= "z":\n small = True\n else:\n small = False\n break\n\nif a == True and c == True and small == True:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s333656567', 's252325866'] | [3064.0, 3064.0] | [17.0, 17.0] | [410, 412] |
p03289 | u209620426 | 2,000 | 1,048,576 | 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. | ['s = input()\nif s.find("A") == 0:\n s = s.replace("A","",1)\n if s[2:-2].count("C") == 1:\n s = s[2:-2].replace("C","")\n if s.islower() == True:\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', "s = input()\npart_of_s = s[2:-1]\nsub_s = s.replace('A','')\nsub_s = sub_s.replace('C','')\n\nif s[0] != 'A' or part_of_s.count('C') != 1 or sub_s != sub_s.lower():\n print('WA')\n exit()\n\nprint('AC')"] | ['Wrong Answer', 'Accepted'] | ['s475789915', 's563383362'] | [3060.0, 2940.0] | [17.0, 17.0] | [274, 199] |
p03289 | u209918867 | 2,000 | 1,048,576 | 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. | ['a=input();b=a[1:].replace(\'C\',\'\');print(\'WAAC\'[a[0]=="A"and1==a[2:-1].count("C")and b.lower()==b::2])', 'a=input();b=a[1:].replace(\'C\',\'\');print(\'WAAC\'[a[0]=="A"and 1==a[2:-1].count("C")and b.lower()==b::2])'] | ['Runtime Error', 'Accepted'] | ['s988935889', 's326447986'] | [2940.0, 2940.0] | [18.0, 17.0] | [101, 102] |
p03289 | u211160392 | 2,000 | 1,048,576 | 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. | ['S = input()\nalp = "abcdefghijklmnopqrstuvwxyzC"\nans = "AC"\nif S[0] != "A":\n ans = "WA"\nflag = 0\nfor C in S[2:-1]:\n if C == "C":\n flag+=1\n if not c in alp:\n ans = "WA"\nif flag != 1:\n ans = "WA"\nif not S[1] in alp[:-1]:\n ans = "WA"\nif not S[-1] in alp[:-1]:\n ans = "WA"\n\nprint(ans)\n', '\nS = input()\nalp = "abcdefghijklmnopqrstuvwxyz"\nalpC = "abcdefghijklmnopqrstuvwxyzC"\n\nans = "AC"\nif S[0] != "A":\n ans = "WA"\ncountC = 0\nfor i in S[2:-1]:\n if i == "C":\n countC += 1\n if not i in alpC:\n ans = "WA"\nif countC != 1:\n ans = "WA"\nif not S[1] in alp:\n ans = "WA"\nif not S[-1] in alp:\n ans = "WA"\npirnt(ans)', 'S = input()\nalp = "abcdefghijklmnopqrstuvwxyz"\nalpC = "abcdefghijklmnopqrstuvwxyzC"\n\nans = "AC"\nif S[0] != "A":\n ans = "WA"\ncountC = 0\nfor i in S[2:-1]:\n if i == "C":\n countC += 1\n if not i in alpC:\n ans = "WA"\nif countC != 1:\n ans = "WA"\nif not S[1] in alp:\n ans = "WA"\nif not S[-1] in alp:\n ans = "WA"\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s008924436', 's485497086', 's194849351'] | [3060.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [312, 347, 346] |
p03289 | u217086212 | 2,000 | 1,048,576 | 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. | ['import sys\ns = input()\n\nl = len(s)\nif s[0] != "A":\n print("WA")\n sys.exit()\nss = s[2:l-1]\nif ss.count("C") != 1:\n print("WA")\n sys.exit()\n\ncidx = ss.find("C")+2\nsss = s[1:cidx]+s[cidx+1:]\nprint(sss)\nif sss.islower():\n print("AC")\n sys.exit()\n\nprint("WA")', 'import sys\ns = input()\n\nl = len(s)\nif s[0] != "A":\n print("WA")\n sys.exit()\nss = s[2:l-1]\nif ss.count("C") != 1:\n print("WA")\n sys.exit()\n\ncidx = ss.find("C")+2\nsss = s[1:cidx]+s[cidx+1:]\nif sss.islower():\n print("AC")\n sys.exit()\n\nprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s570660122', 's814603914'] | [3064.0, 3060.0] | [18.0, 17.0] | [273, 263] |
p03289 | u220345792 | 2,000 | 1,048,576 | 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. | ["S = input()\n\na = S.count('A')\nc = S.count('C')\n\ni = S.find('C')\nif S[0] == 'A' and a == 1 and c == 1:\n test = S[1:i]+S[i+1:]\n if test.islower():\n print('AC')\n\n \nprint('WC')", "S = input()\n\na = S.count('A')\nc = S[2:-1].count('C')\n\ni = S.find('C')\nif S[0] == 'A' and a == 1 and c == 1:\n temp = S[1:i]+S[i+1:]\n if 1 < i and i < len(S)-1 and temp.islower():\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')\n"] | ['Wrong Answer', 'Accepted'] | ['s517688773', 's854969847'] | [3060.0, 3060.0] | [17.0, 17.0] | [192, 256] |
p03289 | u223646582 | 2,000 | 1,048,576 | 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. | ["S = input()\nprint(S[2:-1])\n#if S[0] == 'A' and 'C' in S[2:-1] and S[1:].replace('C', '', 1).lower():\n#\tprint('AC')\n#else:\n#\tprint('WA')\n", "S = input()\nif S[0] == 'A' and 'C' in S[2:-1] and S[1:].replace('C', '', 1).islower():\n\tprint('AC')\nelse:\n\tprint('WA')\n"] | ['Wrong Answer', 'Accepted'] | ['s165827294', 's855382893'] | [2940.0, 3064.0] | [17.0, 17.0] | [136, 119] |
p03289 | u223904637 | 2,000 | 1,048,576 | 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. | ["s=list(input())\nw=0\nc=0\nif s[0]!='A':\n w=1\nif s[1].isupper():\n w=1\nfor i in range(2,len(s)-1):\n if s[i]!='C' and s[i].isupper():\n w=1\n else:\n c+=1\nif s[-1].isupper():\n w=1\nif w==0 and c==1:\n print('AC')\nelse:\n print('WA')", "s=list(input())\nw=0\nc=0\nif s[0]!='A':\n w=1\nif s[1].isupper():\n w=1\nfor i in range(2,len(s)-1):\n if s[i]!='C' and s[i].isupper():\n w=1\n elif s[i]=='C':\n c+=1\nif s[-1].isupper():\n w=1\nif w==0 and c==1:\n print('AC')\nelse:\n print('WA')\n"] | ['Wrong Answer', 'Accepted'] | ['s195912051', 's272582333'] | [3064.0, 3060.0] | [18.0, 17.0] | [256, 267] |
p03289 | u224554402 | 2,000 | 1,048,576 | 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. | ["a = input()\ndef atcoder(p):\n count = 0\n if p[0]=='A':\n count += 1\n count_C=0\n for i in range(len(p)-2):\n if p[i+2]=='C':\n count_C += 1\n if count_C == 1:\n count += 1\n count_c = 0\n for i in range(len(p)-2):\n if p[i].upper() ==p[i]:\n count_c+=1\n if count_c ==2:\n count += 1\n if count ==3:\n print('Yes')\n else:\n print('No')\n \natcoder(a)", "a = input()\ndef atcoder(p):\n count = 0\n if p[0]=='A':\n count += 1\n \n count_C=0\n for i in range(len(p)-2):\n if p[i+2]=='C':\n count_C += 1\n if count_C == 1:\n count += 1\n \n count_c = 0\n for i in range(len(p)-1):\n if p[i].upper() ==p[i]:\n count_c+=1\n if p[len(p)-1]==p[len(p)-1].upper():\n count_c+=2\n if len(p)==3:\n count_c+=2\n if count_c ==2:\n count += 1\n \n \n if count ==3:\n print('AC')\n else:\n print('WA')\n \natcoder(a)\n "] | ['Wrong Answer', 'Accepted'] | ['s983215266', 's956986708'] | [3064.0, 3064.0] | [18.0, 18.0] | [441, 562] |
p03289 | u226155577 | 2,000 | 1,048,576 | 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. | ['S = input()\nif S[0] == \'A\':\n i = S[2:-1].find("C")\n if i != -1:\n i += 2\n for j in range(len(S)):\n if i > 0 and i != j:\n if ord(\'a\') <= ord(S[i]) <= ord(\'z\'):\n print("AC")\n exit(0)\nprint("WA")\n', 'S = input()\nif S[0] == \'A\':\n i = S[2:-1].find("C")\n c = S[2:-1].count("C")\n if i != -1 and c == 1:\n i += 2\n for j in range(len(S)):\n if j > 0 and i != j:\n if not ord(\'a\') <= ord(S[j]) <= ord(\'z\'):\n break\n else:\n print("AC")\n exit(0)\nprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s540373317', 's053357531'] | [3060.0, 3060.0] | [18.0, 18.0] | [276, 342] |
p03289 | u230717961 | 2,000 | 1,048,576 | 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. | ['s = input()\nans = "WA"\n\nif s[0] == "A" and s[2:-2].count("C") == 1:\n tmp = s[1:]\n tmp.replace("C","")\n ans = "AC" if tmp.islower() else "WA"\n \nprint(ans)', 's = input()\nans = "WA"\n\nif s[0] == "A" and a[2:-2].count("C") == 1:\n tmp = s[1:]\n tmp.replace("C","")\n ans = "AC" if tmp.islower() else "WA"\n \nprint(ans)', 's = input()\nans = "WA"\n\nif s[0] == "A" and s[2:-1].count("C") == 1:\n tmp = s[1:]\n tmp = tmp.replace("C","")\n ans = "AC" if tmp.islower() else "WA"\n \nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s197727119', 's376212966', 's099605666'] | [9024.0, 9108.0, 9000.0] | [26.0, 30.0, 28.0] | [157, 157, 163] |
p03289 | u232374873 | 2,000 | 1,048,576 | 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. | ["S = input()\nflaglow = True\nflagAC = False\n\nfor i in range(len(S)):\n if S[i].isupper:\n flaglow = False\nif S[0]=='A' and S[2:-1].count('C') == 1:\n flagAC = True\n\nif flaglow and flagAC:\n print('AC')\nelse:\n print('WA')", "S = input()\nAS = ''\nflag = False\nhereC = 0\n\nif S[0]=='A' and S[2:-1].count('C') == 1:\n flag = True\n hereC = S[2:-1].find('C')+2\nfor i in range(1,len(S)):\n if i != hereC:\n AS += S[i]\n\nif flag and AS.islower():\n print('AC')\nelse:\n print('WA')\n"] | ['Wrong Answer', 'Accepted'] | ['s279421257', 's470756708'] | [3064.0, 3060.0] | [17.0, 18.0] | [233, 263] |
p03289 | u233438794 | 2,000 | 1,048,576 | 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. | ['inp = input()\nremain = inp[1:-2] + inp[-1]\nif inp[0] == "A" && inp[-2] == "C":\n if remain.islower():\n return "AC"\nreturn "WC"', 'inp = input()\ncount = 0\nindex = 0\nfor i in range(len(inp[2:-1])):\n if inp[2:-1][i] == "C":\n count += 1\n index = i\nif inp[0] == "A" and count == 1 and (inp[1:2+index]+inp[3+index:]).islower():\n print("AC")\nelse: \n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s488906563', 's086059130'] | [2940.0, 3064.0] | [17.0, 17.0] | [129, 237] |
p03289 | u235376569 | 2,000 | 1,048,576 | 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. | ['import sys\nS=input()\nfirst=S[0]\nsecond=S[1]\nlast=S[len(S)-1]\ncnt=0\nmoji=[i for i in "abcdefghijklmnopqrstuvwxyz"]\n\n\nif first=="A":\n for i in range(2,len(S)-1):\n print(i)\n if S[i]=="C":\n cnt+=1\n else:\n if (S[i] in moji)==False:\n print("WA")\n sys.exit()\n\n if cnt==1 and ((last in moji)==True) and ((second in moji)==True):\n print("AC")\n else:\n print("WA")\n \nelse:\n print("WA")', 'import sys\nS=input()\nfirst=S[0]\nsecond=S[1]\nlast=S[len(S)-1]\ncnt=0\nmoji=[i for i in "abcdefghijklmnopqrstuvwxyz"]\n\n\nif first=="A":\n for i in range(2,len(S)-1):\n \n if S[i]=="C":\n cnt+=1\n else:\n if (S[i] in moji)==False:\n print("WA")\n sys.exit()\n\n if cnt==1 and ((last in moji)==True) and ((second in moji)==True):\n print("AC")\n else:\n print("WA")\n \nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s981548412', 's061928294'] | [3064.0, 3064.0] | [18.0, 18.0] | [442, 432] |
p03289 | u236536206 | 2,000 | 1,048,576 | 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. | ['import sys\ns=input()\nc=0\nif s[0]=="A":\n for i in range(2,len(s)-2):\n if s[i]=="C":\n c+=1\n C_nobasyo=i\n else:\n print("WA")\n sys.exit()\n #print(c)=1\n if c==1:\n text=s\n #print(text)\n text=text.replace("C","")\n text=text.lstrip("A")\n #print(text)\n if text.islower()==True:\n print("AC")\n else:\n print("WA")\n sys.exit()\n else:\n print("WA")\n sys.exit()\nelse:\n print("WA")', 'import sys\ns=input()\nc=0\nif s[0]=="A":\n for i in range(2,len(s)-1):\n if s[i]=="C":\n c+=1\n C_nobasyo=i\n #print(c)=1\n if c==1:\n text=s\n #print(text)\n text=text.replace("C","")\n text=text.lstrip("A")\n #print(text)\n if text.islower()==True:\n print("AC")\n else:\n print("WA")\n sys.exit()\n else:\n print("WA")\n sys.exit()\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s958802695', 's332043995'] | [3064.0, 3064.0] | [18.0, 18.0] | [533, 472] |
p03289 | u242518667 | 2,000 | 1,048,576 | 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. | ["s=input()\n\nif s[0]=='A':\n if s[2:-1].count('C')==1:\n index=s[2:-1].index('C')\n if tmp==tmp.lower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')\n\n", "s=input()\nprint('AC' if 'C' in s[2:-1] and 'A' in s and s[1:].replace('C','',1).islower() else 'WA')\n"] | ['Runtime Error', 'Accepted'] | ['s632483467', 's904549358'] | [2940.0, 2940.0] | [17.0, 17.0] | [232, 101] |
p03289 | u248670337 | 2,000 | 1,048,576 | 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. | ['s=input()\nprint("AC" if s[0]=="A" and C in s[2:-1] and s[1:0].replace("C","c",1).islower() else "WA")', 's=input()\nprint("AC" if s[0]=="A" and "C" in s[2:-1] and s[1:0].replace("C","c",1).islower() else "WA")', 's=input()\nprint("AC" if (s[0]=="A") and ("C" in s[2:-1]) and (s[1:].replace("C","",1).islower()) else "WA")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s245419337', 's313984386', 's952241913'] | [2940.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0] | [101, 103, 107] |
p03289 | u252210202 | 2,000 | 1,048,576 | 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. | ['S = list(input())\nL = S[2:len(S)-1]\na = 0\nfor i in range(len(S)):\n if 64 < (ord(S[i])) <= 90:\n a = a+1\n\nif L.count("C") == 1 and S[0] == "A" and a == 1:\n print("AC")\nelse:\n print("WA")\n', 'S = list(input())\nL = S[2:len(S)-1]\na = 0\nfor i in range(len(S)):\n if 65 < (ord(S[i])) <= 90:\n a = a+1\n\nif L.count("C") == 1 and S[0] == "A" and a == 1:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s030471675', 's872058826'] | [3060.0, 3060.0] | [17.0, 17.0] | [201, 200] |
p03289 | u252964975 | 2,000 | 1,048,576 | 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. | ['S=str(input())\nletter="ABCDEFGHIJKLMNO"\ncondition1 = S[0]==\'A\'\ncondition2 = len([1 for x in S[2:len(S)-1] if x=="C"]) == 1\ncondition3 = len([1 for x in S if len([1 for y in letter if y>10])==1]) == 2\nif condition1 & condition2 & condition3:\n print(\'AC\')\nelse:\n print(\'WA\')', 'S=str(input())\nletter="ABCDEFGHIJKLMNOPQRSTUVWXYZ"\ncondition1 = S[0]==\'A\'\ncondition2 = len([1 for x in S[2:len(S)-1] if x=="C"]) == 1\ncount=0\nfor i in len(S):\n if len([1 for x in letter if x==S[i]]) == 1:\n count = count + 1\ncondition3 = count == 2\nif condition1 & condition2 & condition3:\n print(\'AC\')\nelse:\n print(\'WA\')\n', 'S=str(input())\nletter="ABCDEFGHIJKLMNOPQRSTUVWXYZ"\ncondition1 = S[0]==\'A\'\ncondition2 = len([1 for x in S[2:len(S)-1] if x=="C"]) == 1\ncount=0\nfor i in range(len(S)):\n if len([1 for x in letter if x==S[i]]) == 1:\n count = count + 1\ncondition3 = count == 2\nif condition1 & condition2 & condition3:\n print(\'AC\')\nelse:\n print(\'WA\')\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s117223931', 's927513921', 's277182198'] | [3060.0, 3064.0, 3060.0] | [17.0, 18.0, 18.0] | [274, 327, 334] |
p03289 | u253321779 | 2,000 | 1,048,576 | 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. | ['def piyo():\n s = list(str(input()))\n c = 0\n if s[0]!="A":\n return "WA"\n if s[1]=="C" or s[2]=="C" or s[len(s)-2]=="C" or s[len(s)-1]=="C":\n return "WA"\n for hage in s:\n if hage!="A" and hage!="C":\n if hage.isupper():\n return "WA"\n if hage=="C":\n c+=1\n if c>1:\n return "WA"\n return "AC"\n \nif __name__ == \'__main__\':\n hoge=piyo()\n print(hoge)\n', 'def piyo():\n s = list(str(input()))\n c = 0\n a = 0\n if s[0]!="A":\n return "WA"\n if s[1]=="C" or s[len(s)-1]=="C":\n return "WA"\n for hage in s:\n if hage!="A" and hage!="C":\n if hage.isupper():\n return "WA"\n if hage=="C":\n c+=1\n if hage=="A":\n a+=1\n if c>1 or c==0:\n return "WA"\n if a>1:\n return "WA"\n return "AC"\n \nif __name__ == \'__main__\':\n hoge=piyo()\n print(hoge)'] | ['Wrong Answer', 'Accepted'] | ['s029019347', 's323947202'] | [3064.0, 3064.0] | [18.0, 18.0] | [447, 502] |
p03289 | u255001744 | 2,000 | 1,048,576 | 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. | ['s = input()\nans = "AC"\nif s[0] != \'A\':\n ans = "WA"\ncnt = 0\nfor i in s[2:-1]:\n if i.isupper() and i!=\'C\':\n ans ="WA"\n elif i==\'C\':\n cnt +=1\n\nif cnt!=1:\n flag=False\nprint("AC"if flag else "WA")\n', 's = input()\nans = "AC"\nif s[0] != \'A\':\n ans = "WA"\ncnt = 0\nfor i in range(len(s)):\n if s[i].isupper():\n if i == 1 or i!=\'C\' or i==len(s)-1:\n ans = "WA"\n cnt+=1\nif cnt!=1:\n ans="WA"\nprint(ans)\n', 's = input()\nans = "AC"\nif s[0] != \'A\':\n ans = "WA"\ncnt = 0\nfor i in range(1,len(s)):\n if s[i].isupper():\n if i == 1 or s[i]!= "C" or i==len(s)-1:\n ans = "WA"\n cnt+=1\nif cnt!=1:\n ans="WA"\nprint(ans)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s012805204', 's857696181', 's466233756'] | [3064.0, 3060.0, 3060.0] | [18.0, 17.0, 19.0] | [218, 226, 232] |
p03289 | u256281774 | 2,000 | 1,048,576 | 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. | ['S = input()\nflag = False\nif S[0] == "A":\n count = 0\n for i,j in enumerate(S[2:-1]):\n if j == "C":\n count+=1\n ind = i+2\n if count == 1:\n tmp = S[1:ind]+A[ind+1:]\n if tmp == tmp.lower():\n flag = True\n \nif flag:\n print("AC")\nelse:\n print("WA")', 'S = input()\nflag = False\nif S[0] == "A":\n count = 0\n for i,j in enumerate(S[2:-1]):\n if j == "C":\n count+=1\n ind = i+2\n if count == 1:\n tmp = S[1:ind]+S[ind+1:]\n if tmp == tmp.lower():\n flag = True\n \nif flag:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s687259174', 's054794561'] | [3060.0, 3060.0] | [17.0, 17.0] | [320, 320] |
p03289 | u256464928 | 2,000 | 1,048,576 | 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. | ["s = input()\nS = s[2:-1]\nif 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:]:\n print('AC')\nelse:\n print('WA')", 's = input()\nS = s[2:-1]\nif s[0]==\'A\' and S.count(\'C\')==1 and s[1:].replace("C","",1).islower():\n print(\'AC\')\nelse:\n print(\'WA\')'] | ['Wrong Answer', 'Accepted'] | ['s236975383', 's970732144'] | [3060.0, 2940.0] | [19.0, 18.0] | [189, 129] |
p03289 | u259979862 | 2,000 | 1,048,576 | 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. | ['import copy\n\ndef main():\n string = input()\n if string[0] == "A":\n cnt = 0\n index = 0\n for i in range(2, len(string)-1):\n if string[i] == "C":\n cnt += 1\n index = i\n if cnt == 1:\n cp_str = copy.copy(string)\n string = "a" + string[1:index-1] + "c" + string[index+1:]\n if string == cp_str.lower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\n else:\n print("WA")\n\n\nif __name__ == "__main__":\n main()\n\n', 'import copy\n\ndef main():\n string = input()\n if string[0] == "A":\n cnt = 0\n index = 0\n for i in range(2, len(string)-1):\n if string[i] == "C":\n cnt += 1\n index = i\n if cnt == 1:\n cp_str = copy.copy(string)\n string = "a" + string[1:index-1] + "c" + string[index+1:]\n print(string)\n print(cp_str)\n if string == cp_str.lower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\n else:\n print("WA")\n\n\nif __name__ == "__main__":\n main()', 'import copy\n\ndef main():\n string = input()\n str_list = list(string)\n if str_list[0] == "A":\n cnt = 0\n index = 0\n for i in range(2, len(str_list)-1):\n if str_list[i] == "C":\n cnt += 1\n index = i\n if cnt == 1:\n str_list[0] = "a"\n str_list[index] = "c"\n str_changed = "".join(str_list)\n if str_changed.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\n\n else:\n print("WA")\n\n\nif __name__ == "__main__":\n main()'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s075349061', 's114477551', 's624607760'] | [3700.0, 3572.0, 3444.0] | [111.0, 155.0, 22.0] | [585, 635, 614] |
p03289 | u263830634 | 2,000 | 1,048,576 | 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. | ["import sys\nS = str(input())\n#print (S)\nif S[0:1] == 'A':\n S2 = S[2:-1]\n a = S2.count('C')\n b = S.count ('C')\n c = S.count ('A')\n print (S2)\n if a == 1 and b == 1 and c == 1:\n for i in S:\n if i == 'A' or i == 'C':\n pass\n else:\n if i != i.lower():\n print ('WA')\n sys.exit()\n print ('AC')\n sys.exit()\nprint ('WA')\n", "import sys\nS = str(input())\n#print (S)\n\nflag = True\n\nif S[0:1] != 'A':\n flag = False\n\nS2 = S[2:-1]\nx = S2.count('C')\nif x != 1:\n flag = False\n\na = 0\nc = 0\nfor i in S:\n if i == 'A':\n a += 1\n if i == 'C':\n c += 1\n if a >= 2 or c >= 2:\n flag = False\n if i != 'A' and i != 'C':\n if i != i.lower():\n flag = False\n\nif flag:\n print ('AC')\nelse:\n print ('WA')"] | ['Wrong Answer', 'Accepted'] | ['s679729416', 's606998533'] | [3064.0, 3064.0] | [17.0, 17.0] | [440, 415] |
p03289 | u266874640 | 2,000 | 1,048,576 | 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. | ['s = list(input())\ncount = 0\n\nif s[0] == "A":\n for i in range(2,len(s)-1):\n if s[i] == "C":\n count += 1\n if count != 1:\n print("WA")\n exit()\n else:\n number = s.index("C")\nelse:\n print("WA")\n exit()\n\ns.remove(0)\ns.remove(number)\n\nfor j in s:\n c = j.lower()\n if c == j:\n continue\n else:\n print("WA")\n exit()\nprint("AC")\n', 's = list(input())\ncount = 0\n\nif s[0] == "A":\n for i in range(2,len(s)-1):\n if s[i] == "C":\n count += 1\n if count != 1:\n print("WA")\n exit()\n else:\n number = s.index("C")\nelse:\n print("WA")\n exit()\n\ndel s[number]\ndel s[0]\n\nfor j in s:\n c = j.lower()\n if c == j:\n continue\n else:\n print("WA")\n exit()\nprint("AC")\n'] | ['Runtime Error', 'Accepted'] | ['s062012982', 's776328415'] | [3064.0, 3064.0] | [17.0, 17.0] | [401, 395] |
p03289 | u272557899 | 2,000 | 1,048,576 | 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. | ['s = input()\nt = list(s)\nx = 0\ny = 0\nz = 0\nr = []\n\nif t[0] == "A":\n x = 1\n \nr.append(t[1])\nr.append(t[len(t) - 1])\n\nfor i in range(2,len(t) - 1): \n if t[i] == "C":\n y += 1\n else:\n r.append(t[i])\n\nfor j in r:\n if j.isupper():\n z = 1\n\nif x = 1 and y = 1 and z = 0:\n print("AC")\nelse:\n print("WA")\n', 's = input()\nt = list(s)\nx = 0\ny = 0\nz = 0\nr = []\n\nif t[0] == "A":\n x = 1\n \nr.append(t[1])\nr.append(t[len(t) - 1])\n\nfor i in range(2,len(t) - 1): \n if t[i] == "C":\n y += 1\n else:\n r.append(t[i])\n\nfor j in r:\n if j.isupper():\n z = 1\n\nif x == 1 and y == 1 and z == 0:\n print("AC")\nelse:\n print("WA")\n'] | ['Runtime Error', 'Accepted'] | ['s119241741', 's271323571'] | [3064.0, 3064.0] | [17.0, 17.0] | [310, 313] |
p03289 | u273038590 | 2,000 | 1,048,576 | 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. | ['s=input()\nif s[0]=="A" and "C" in s[2] and s[1:].replace("C","",1).islower():\n print(s)\nelse:\n print("WA")', 's=input()\nif s[0]=="A" and "C" in s[2:-1] and s[1:].replace("C","",1).islower():\n print(s)\nelse:\n print("WA")', 's=input()\nif s[0]=="A" and "C" in s[2:-1] and s[1:].replace("C","",1).islower():\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s862823104', 's996300970', 's420426166'] | [2940.0, 3060.0, 2940.0] | [17.0, 19.0, 17.0] | [112, 115, 118] |
p03289 | u276115223 | 2,000 | 1,048,576 | 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. | ["# ABC 104: B – AcCepted\ns = input()\n\nlowers = 'abcdefghijklmnopqrstuvwxyz'\nis_satisfied = 'AC'\n\nprint(s[2:-1])\n\nif s[0] == 'A' and s[2:-1].count('C') == 1:\n for letter in s:\n if letter != 'A' and letter != 'C':\n if letter not in lowers:\n is_satisfied = 'WA'\n break\nelse:\n is_satisfied = 'WA'\n\nprint(is_satisfied)", "# ABC 104: B – AcCepted\ns = input()\nalphabets = 'abcdefghijklmnopqrstuvwxyz'\n\nisMeet = 'AC'\n\nif s[0] == 'A':\n if s[2:-1].count('C') == 1:\n t = s[1:].replace('C', '')\n for c in t:\n if c not in alphabets:\n isMeet = 'WA'\n break\n else:\n isMeet = 'WA'\nelse:\n isMeet = 'WA'\n\nprint(isMeet)"] | ['Wrong Answer', 'Accepted'] | ['s144073865', 's910948552'] | [3060.0, 3060.0] | [17.0, 17.0] | [368, 355] |
p03289 | u276204978 | 2,000 | 1,048,576 | 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. | ["S = input()\nd = [chr(ord('A')+i) for i in range(26)]\nfirst = S[0] == 'A'\nsecond = sum([1 if i == 'C' else 0 for i in S[2:-2] ])\nthird = sum([1 if i in d else 0 for i in S ])\nprint(first, second, third)\nif first and second and third == 2:\n print('AC')\nelse:\n print('WA')", 'import re\nprint(re.match("A[a-z]+C[a-z]+$", input()) and "AC" or "WA")'] | ['Wrong Answer', 'Accepted'] | ['s803017575', 's647135863'] | [3064.0, 3188.0] | [17.0, 19.0] | [275, 70] |
p03289 | u277641173 | 2,000 | 1,048,576 | 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. | ['s=input()\nlenlen=len(s)\ncount=0\nif s[0]=="A":\n t=s[2:lenlen-1]\n for i in range(0,len(t)):\n if t[i]=="C":\n count+=1\n if count==1:\n tttt=0\n for j in range(0,lenlen):\n if not 97<=ord(s[j])<=122:\n tttt+=1\n if tttt==2:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")\n ', 's=input()\nlenlen=len(s)\ncount=0\nif s[0]=="A":\n t=s[2:lenlen-1]\n for i in range(0,len(t)):\n if t[i]=="C":\n count+=1\n if count==1:\n tttt=0\n for j in range(0,lenlen):\n if not 97<=ord(s[j])<=122:\n tttt+=1\n if tttt==2:\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")\n '] | ['Wrong Answer', 'Accepted'] | ['s033117690', 's447846201'] | [3060.0, 3060.0] | [17.0, 18.0] | [341, 337] |
p03289 | u280552586 | 2,000 | 1,048,576 | 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. | ["s = list(input())\n\nbl = False\n\nif s[0] == 'A' and s[2:len(s)-1].count('C') == 1:\n s[2:len(s)-1].remove('C')\n s.remove('A')\n ss = ''.join(s)\n if ss.islower():\n bl = True\n\nprint('AC' if bl else 'WA')\n", "s = list(input())\n\nbl = False\ns1 = s[1]\ns2 = s[2:len(s)-1]\ns3 = s[-1]\n\nif s[0] == 'A' and s[2:len(s)-1].count('C') == 1:\n s2.remove('C')\n s2 = ''.join(s2)\n ss = s1+s2+s3\n if ss.islower():\n bl = True\n\nprint('AC' if bl else 'WA')\n"] | ['Wrong Answer', 'Accepted'] | ['s801709027', 's371408937'] | [2940.0, 3060.0] | [17.0, 17.0] | [217, 247] |
p03289 | u298297089 | 2,000 | 1,048,576 | 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. | ["S = input()\nflag = True\nif S[0] != 'A' or S[2:-2].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:\n flag = False\nfor i in range(2,len(S)-1):\n if s[i] != 'C' and s[i].lower() != s[i]:\n flag = False\nprint('AC' if flag else 'WA')", "S = input()\nflag = True\nif S[0] != 'A' or S[2:-2].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:\n flag = False\nfor i in range(2,len(S)-1):\n if s != 'C' and s.lower() != s:\n flag = False\nprint('AC' if flag else 'WA')", "S = input()\nflag = True\nif S[0] != 'A' or S[2:-1].count('C') != 1 or S[1].lower() != S[1] or S[-1].lower() != S[-1]:\n flag = False\nfor i in range(2,len(S)-1):\n if S[i] != 'C' and S[i].lower() != S[i]:\n flag = False\nprint('AC' if flag else 'WA')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s535392440', 's750585802', 's091809814'] | [3064.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [249, 240, 249] |
p03289 | u305366205 | 2,000 | 1,048,576 | 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. | ["S = input()\nif S[0] == 'A' and S[2:-1].count('C') == 1:\n print(S[2:-1])\n index_c = S[2:-1].index('C')\n S = S[1:2 + index_c] + S[3 + index_c:]\n if S.islower():\n print('AC')\n exit()\nprint('WA')", "S = input()\nif S[0] == 'A' and S[2:-1].count('C') == 1:\n index_c = S[2:-1].index('C')\n S = S[1:2 + index_c] + S[3 + index_c:]\n if S.islower():\n print('AC')\n exit()\nprint('WA')"] | ['Wrong Answer', 'Accepted'] | ['s931101431', 's721447761'] | [3060.0, 3060.0] | [17.0, 17.0] | [217, 198] |
p03289 | u305965165 | 2,000 | 1,048,576 | 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. | ['s = input()\n\nif s[0] != "A":\n print("WA")\n exit()\n\nif s[1].isupper() or s[-1].isupper():\n print("WA")\n exit()\n\ncount = 0\nfor i in s[2:]:\n if s[i].isupper():\n if s[i] == "C":\n count += 1\n else:\n print("WA")\n exit()\n \n\nif count == 1:\n print("AC")\nelse:\n print("WA")', 's = input()\n\nif s[0] != "A":\n print("WA")\n exit()\n\nif s[1].isupper() or s[-1].isupper():\n print("WA")\n exit()\n\ncount = 0\nfor s_ in s[2:]:\n if s_.isupper():\n if s_ == "C":\n count += 1\n else:\n print("WA")\n exit()\n \n\nif count == 1:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s410157231', 's050725135'] | [3060.0, 3060.0] | [17.0, 18.0] | [338, 335] |
p03289 | u308684517 | 2,000 | 1,048,576 | 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. | ['s = list(input())\ncount = 0\nflag = 1\nif s[0] == "A":\n s[0] = s[0].lower()\n\nfor i in range(2, len(s)-1):\n if s[i] == "C":\n s[i] = s[i].lower()\n count += 1\nss = "".join(s)\nif ss.isupper() or count != 1:\n flag = 0\nelse:\n flag = 0\nif flag == 1: print("AC")\nelse: print("WA")\n', 's = list(input())\ncount = 0\nflag = 1\nif s[0] == "A":\n s[0] = s[0].lower()\nelse:\n flag = 0\nfor i in range(2, len(s)-1):\n if s[i] == "C":\n s[i] = s[i].lower()\n count += 1\nss = "".join(s)\nif not(ss.islower()) or count != 1:\n flag = 0\nif flag == 1: print("AC")\nelse: print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s419055433', 's167551341'] | [3060.0, 3064.0] | [17.0, 19.0] | [297, 300] |
p03289 | u310431893 | 2,000 | 1,048,576 | 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. | ['S=input()\nif S[0]!="A":\n print("WA")\nelif len([i for i in S[3:-2] if i == "C"]) != 1:\n print("WA")\nelif len([i for i in S if i.islower()]) != len(S)-2:\n print("WA")\nelse:\n print("AC")\n ', 'S=input()\nif S[0]!="A":\n print("WA")\nelif len([i for i in S[3:-1] if i == "C"]) != 1:\n print("WA")\nelif len([i for i in S if i.islower()]) != len(S)-2:\n print("WA")\nelse:\n print("AC")', 'S=input()\nif S[0] != "A":\n print("WA")\nelif len([i for i in S[2:-1] if i == "C"]) != 1:\n print("WA")\nelif len([i for i in S if i.islower()]) != len(S)-2:\n print("WA")\nelse:\n print("AC")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s350149464', 's858742461', 's549377320'] | [3060.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0] | [190, 187, 189] |
p03289 | u310549140 | 2,000 | 1,048,576 | 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. | ["S = input()\nif S[0] == 'A' and S[2:-1].count('C')==1 and sum([for c in S c.isupper()])==2 :\n print('AC')\nelse:\n print('WA')", "S = input()\nif S[0] == 'A' and S[2:-1].count('C')==1 and sum([c.isupper() for c in S])==2 :\n print('AC')\nelse:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s594666909', 's658801889'] | [2940.0, 3064.0] | [18.0, 19.0] | [125, 125] |
p03289 | u323680411 | 2,000 | 1,048,576 | 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. | ['from sys import stdin\n\n\ndef main() -> None:\n s = next_str()\n print(("WA", "AC")[judge(s)])\n\n\ndef judge(s: str) -> bool:\n flg = False\n n = len(s)\n\n for i in range(n):\n if i == 0 and s[i] != \'A\':\n return False\n elif 2 <= i < n - 1 and s[i] == \'C\' and not flg:\n flg = True\n elif s[i] != s[i].lower():\n return False\n\n if not flg:\n return False\n return True\n\n\ndef next_str() -> str:\n result = ""\n while True:\n tmp = stdin.read(1)\n if tmp.strip() != "":\n result += tmp\n elif tmp != \'\\r\':\n break\n return result\n\n\nif __name__ == \'__main__\':\n main()', 'from sys import stdin\n\n\ndef main() -> None:\n s = next_str()\n print(("WA", "AC")[judge(s)])\n\n\ndef judge(s: str) -> bool:\n flg = False\n n = len(s)\n\n for i in range(n):\n if i == 0:\n if s[i] != \'A\':\n return False\n elif 2 <= i < n - 1 and s[i] == \'C\' and not flg:\n flg = True\n elif s[i] != s[i].lower():\n return False\n\n if not flg:\n return False\n return True\n\n\ndef next_str() -> str:\n result = ""\n while True:\n tmp = stdin.read(1)\n if tmp.strip() != "":\n result += tmp\n elif tmp != \'\\r\':\n break\n return result\n\n\nif __name__ == \'__main__\':\n main()'] | ['Wrong Answer', 'Accepted'] | ['s506390862', 's187475671'] | [3064.0, 3064.0] | [17.0, 17.0] | [677, 693] |
p03289 | u327668449 | 2,000 | 1,048,576 | 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. | ['# INPUT\na = input()\n\n\n# PROCESS\nanswer = ""\n\nif(a[0] != "A"):\n answer = "WA"\nelse:\n a_list = list(a)\n b_list = a[2:-1]\n if (not b_list.count("C") == 1):\n answer = "WA"\n else:\n C_index = a.find("C")\n a_list.pop(C_index)\n a_join = "".join(a_list)\n if(a_join.islower()):\n answer = "AC"\n else:\n answer = "WA"\n\n# OUTPUT\nprint(answer)', '# INPUT\na = input()\n\n\n# PROCESS\nanswer = ""\n\nif(a[0] != "A"):\n answer = "WA"\nelse:\n a_list = list(a)\n b_list = a[2:-1]\n if (not b_list.count("C") == 1):\n answer = "WA"\n else:\n c = a[1:]\n c_index = c.find("C")\n c_list = list(c)\n c_list.pop(c_index)\n c_join = "".join(c_list)\n\n if(c_join.islower()):\n answer = "AC"\n else:\n answer = "WA"\n\n# OUTPUT\nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s560778519', 's349812657'] | [3060.0, 3064.0] | [17.0, 17.0] | [361, 397] |
p03289 | u328131364 | 2,000 | 1,048,576 | 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. | ["s = str(input())\n\nflag = 0\n\nif s[0] == 'A':\n s = s[0].lower() + s[1:]\n print(s)\n\n for i in range(2, len(s)-1):\n if s[i] == 'C':\n flag += 1\n s = s[:(i-1)] + s[i].lower() + s[i+1:]\n print(s)\n break\n \n if s.islower():\n flag += 1\n\n\nif flag == 2:\n print('AC')\nelse:\n print('WC')", 'S = input()\n \n \nif S[0] != "A":\n print("WA")\n \nelif "C" in S:\n a = S.index("C")\n \n if 2 <= a <= len(S)-2:\n S = S.replace("A", "", 1).replace("C", "", 1)\n \n if S.islower():\n print("AC")\n \n else:\n print("WA")\n \n else:\n print("WA")\n \nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s755540708', 's761547318'] | [3064.0, 3060.0] | [17.0, 18.0] | [354, 328] |
p03289 | u329143273 | 2,000 | 1,048,576 | 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. | ['s=input()\nif s[0]==\'A\':\n if s[2:-1].count(\'C\')==1:\n if s[1:].replace("C","",1).islower():\n print("AC")\n else:\n print("NO")\n exit()\n print("NO")\n exit()\nprint("NO")', 's=input()\nif s[0]==\'A\':\n if s[2:-1].count(\'C\')==1:\n if s[1:].replace("C","",1).islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s116978540', 's058534971'] | [3060.0, 2940.0] | [20.0, 18.0] | [187, 184] |
p03289 | u341087021 | 2,000 | 1,048,576 | 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. | ["s = list(input())\n\nflag = True\n\nif s[0] != 'A':\n flag = False\n\nl = s[2:len(s)-1]\n\ncount = 0\nc = 0\nfor i,x in enumerate(l):\n if x == 'C':\n count += 1\n c = i\n\nif count != 1:\n flag = False\n\nfor x in s:\n if x not in list('abcdefghijklmnopqrstuvwxyz'):\n flag = False\n\nif flag:\n print('AC')\nelse:\n print('WA')", "s = list(input())\n\nflag = True\n\nif s[0] != 'A':\n flag = False\n\nl = s[2:len(s)-1]\n\ncount = 0\nc = 0\nfor i,x in enumerate(l):\n if x == 'C':\n count += 1\n c = i\n\nif count != 1:\n flag = False\n\ns.pop(2+c)\ns.pop(0)\n\nfor x in s:\n if x not in list('abcdefghijklmnopqrstuvwxyz'):\n flag = False\n\nif flag:\n print('AC')\nelse:\n print('WA')"] | ['Wrong Answer', 'Accepted'] | ['s727041977', 's254370455'] | [3064.0, 3064.0] | [18.0, 19.0] | [342, 363] |
p03289 | u341855122 | 2,000 | 1,048,576 | 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. | ['i = input()\n\nflag = 0\n\nif i[0] is not "A":\n flag = 1\n\nif i[2:-2].count("C") == 1:\n flag = 1\n\nfor j in range(65,26+65):\n if (chr(j) == "A" )or (chr(j)=="C"):\n continue\n if chr(j) in i:\n flag = 1\n\nfor j in range(65,26+65):\n if chr(j) in i[-1]+i[1]:\n flag = 1\n\n\nif flag == 1:\n print("WA")\nelse:\n print("AC")\n', 'i = input()\n\nflag = i[2:-1].count("C")\n\nif i[0] is not "A":\n flag = 0\n\nimport re\n\nprint(i[2:-1])\nprint(re.findall("A[a-z][a-z,C]{"+str(len(i)-3)+"}[a-z]",i),flag)\n\nif re.findall("A[a-z][a-z,C]{"+str(len(i)-3)+"}[a-z]",i) and (flag == 1):\n print("AC")\n\nelse:\n print("WA")\n', 'i = input()\n\nflag = i[2:-1].count("C")\n\nif i[0] is not "A":\n flag = 0\n\nimport re\nif re.findall("A[a-z][a-z,C]{"+str(len(i)-3)+"}[a-z]",i) and (flag == 1):\n print("AC")\n\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s478398977', 's991862261', 's711286075'] | [3064.0, 3188.0, 3188.0] | [17.0, 19.0, 19.0] | [347, 280, 197] |
p03289 | u345778634 | 2,000 | 1,048,576 | 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. | ['def main():\n S = input()\n flag = True\n cnt = 0\n for i in range(len(S)):\n if not(i == 0 and S[i] == \'A\'):\n print("WA")\n return\n elif 2 <= i <= len(S)-1 and S[i] == \'C\':\n cnt += 1\n elif S[i].isupper():\n print("WA")\n return\n if cnt == 1:\n print("AC")\n else:\n print("WA")\n \nmain()', 'def main():\n S = input()\n flag = True\n cnt = 0\n for i in range(len(S)):\n if i == 0:\n if S[i] != \'A\':\n print("WA")\n return\n else:\n if 2 <= i <= len(S)-2 and S[i] == \'C\':\n cnt += 1\n elif S[i].isupper():\n print("WA")\n return\n if cnt == 1:\n print("AC")\n else:\n print("WA")\n \nmain()'] | ['Wrong Answer', 'Accepted'] | ['s959786430', 's427177166'] | [3060.0, 3060.0] | [17.0, 17.0] | [395, 442] |
p03289 | u349585489 | 2,000 | 1,048,576 | 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. | ["s = input()\nif s[0] == 'A' and s[2:-1].count('C')==1:\n c=0\n for i in s:\n if i.islower():c+=1\n if c==2:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')", "s = input()\nif s[0] == 'A' and s[2:-1].count('C')==1:\n c=0\n for i in s:\n if i.isupper():c+=1\n if c==2:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')"] | ['Wrong Answer', 'Accepted'] | ['s118241899', 's334748828'] | [3060.0, 3060.0] | [17.0, 17.0] | [190, 190] |
p03289 | u350049649 | 2,000 | 1,048,576 | 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. | ["S=input()\nans='WA'\ntmp=0\nfor i in range(2:len(S)-1):\n if S[i]=='C':\n tmp+=1\n \nif tmp==1:\n ans='AC'\n \nprint(ans)\n\n ", "S=input()\n\ndef solve():\n temp=0\n if S[0]!='A':\n print('WA')\n return\n if not 'a'<=S[1]<='z':\n print('WA')\n return\n for i in range(2,len(S)-1):\n if S[i]=='C':\n temp+=1\n if temp>1:\n print('WA')\n return\n if temp==0:\n print('WA')\n return\n \n if not 'a'<=S[len(S)-1]<='z':\n print('WA')\n return\n \n print('AC')\n\nsolve()"] | ['Runtime Error', 'Accepted'] | ['s063329994', 's843049820'] | [2940.0, 3064.0] | [18.0, 17.0] | [124, 372] |
p03289 | u350093546 | 2,000 | 1,048,576 | 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. | ["s=input()\nif s[0]='A':\n if s[2:-1].count('C')==1:\n s=s[2:-1].replace('C','c')\n s=s[0].replace('A','a')\n if islower(s)==True:\n print('AC')\n else: print('WA')\nelse: print('WA')", "s=input()\nans='AC'\nif s[0]!='A':\n ans='WA'\nelif s[2:-1].count('C')!=1:\n ans='WA'\ns=sorted(s)\nif s[2:].islower()==False:\n ans='WA'\nprint(ans)", "s=input()\nans='AC'\nif s[0]!='A':\n ans='WA'\nelif s[2:-1].count('C')!=1:\n ans='WA'\nif ans=='AC':\n s=s.replace('A','')\n s=s.replace('C','')\n if s.islower!=False:\n ans='WA'\nprint(ans)", "s=input()\nans='AC'\nif s[0]!='A':\n ans='WA'\nelif s[2:-1].count('C')!=1:\n ans='WA'\nif ans=='AC':\n s=s[1:]\n s=s.replace('C','')\n if s.islower!=False:\n ans='WA'\nprint(ans)\n", "s=input()\nans='AC'\nif s[0]!='A':\n ans='WA'\ns=s[1:]\nif s[1:-1].count('C')!=1:\n ans='WA'\ns=s.replace('C','c')\nfor i in s:\n if i.islower()==False:\n ans='WA'\n break\nprint(ans)\n"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s165641493', 's370648904', 's417381399', 's692188799', 's906992927'] | [2940.0, 8996.0, 9068.0, 9000.0, 9032.0] | [17.0, 21.0, 29.0, 30.0, 26.0] | [192, 143, 187, 176, 181] |
p03289 | u350836088 | 2,000 | 1,048,576 | 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. | ['S = list(input())\nl = len(S)\nif S[0]=="A" and "C" in S[3:l-1]:\n S.remove("A")\n S.remove("C")\n S = "".join(S)\n if S.isupper():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")\n \n ', 'S = list(input())\nl = len(S)\nif S[0]=="A" and "C" in S[2:l-1]:\n S.remove("A")\n S.remove("C")\n S = "".join(S)\n if S.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")\n \n '] | ['Wrong Answer', 'Accepted'] | ['s560036099', 's113180749'] | [2940.0, 2940.0] | [17.0, 17.0] | [195, 195] |
p03289 | u353919145 | 2,000 | 1,048,576 | 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. | ['s = input()\nif 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():\n print("AC" , end="")\nelse:\n print("WA" , end="")\n\n\n', 's = input()\n res = "AC"\n for i in s:\n if (i!="A" and i!="C" and i.isupper() == True):\n res = "WA"\n break;\n\n if (res == "AC" and s[0]=="A" and s.count("C")==1 and s.index("C")>1 and s.index("C")<len(s)-1 ):\n print("AC")\n else:\n print("WA")', 's = input()\nf = False\nf2 = True\nc = 0\nif s[0] =="A":\n f = True\nfor x in s[2:len(s)-1]:\n if x == "C":\n c +=1\n else:\n if x.isupper() or s[-1].isupper():\n f2 = False\nif not s[1].islower():\n f2 = False\nif f and c == 1 and f2:\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s384166371', 's635560173', 's510703893'] | [3060.0, 2940.0, 3060.0] | [17.0, 18.0, 17.0] | [190, 294, 297] |
p03289 | u354916249 | 2,000 | 1,048,576 | 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. | ["S = input()\nflag = 0\n\nif S[0] == 'A':\n flag += 1\n\nfor i in range(2,len(S)-1):\n if S[i] == 'C':\n flag += 1\n l = len(S)\n\nS.strip('A')\nS.strip('C')\n\nif not S.islower():\n if flag == 2 and len(S) == l-2:\n print('AC')\n else:\n print('WA') \nelse:\n print('WA')", "S = input()\nflag = 0\n\nif S[0] == 'A':\n flag += 1\n\nfor i in range(2,len(S)-1):\n if S[i] == 'C':\n flag += 1\n C = i\n\nfor i in range(1,len(S)):\n if i != 'C':\n if not S[i].islower():\n flag *= 0\n\nif flag == 2:\n print('AC')\nelse:\n print('WA')", "S = input()\nCount = 0\n\nif S[0] != 'A':\n print('WA')\n\nelse:\n if S[1].isupper() or S[-1].isupper():\n print('WA')\n else:\n for i in S[2:]:\n if i.isupper():\n if Count==0 and i == 'C':\n Count += 1\n else:\n print('WA')\n exit()\n if Count == 1:\n print('AC')\n else:\n print('WA')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s850844507', 's944537253', 's161459559'] | [3064.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [297, 282, 425] |
p03289 | u359474860 | 2,000 | 1,048,576 | 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. | ['S = input()\nif S[0] == "A" and S[2:-1].count("C") == 1:\n S = S.replace("A","").replace("C","")\n print(S)\n if all(i.islower for i in S):\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 'S = input()\nif S[0] == "A" and S[2:-1].count("C") == 1:\n S = S.replace("A","").replace("C","")\n if all(i.islower() for i in S):\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s357717121', 's823897077'] | [3060.0, 3060.0] | [19.0, 21.0] | [216, 205] |
p03289 | u361826811 | 2,000 | 1,048,576 | 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. | ["\n\nimport sys\n\n# import itertools\n# import numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nsys.setrecursionlimit(10 ** 7)\n\nS = readline().decode('utf8').rstrip()\nlis = list(S)\nprint(lis)\nif lis[0] == 'A' and 2 <= lis.index('C') <= len(lis) - 1:\n st = ''.join(lis[1:lis.index('C')] + lis[lis.index('C') + 1:])\n print(st)\n if st.lower():\n print('AC')\n else:\n print('WA')\n\nelse:\n print('WA')\n", "\n\nimport sys\n\n# import itertools\n# import numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nsys.setrecursionlimit(10 ** 7)\n\nS = readline().decode('utf8').rstrip()\nlis = list(S)\n# print(lis)\nprint(lis.index('C'))\nprint(len(lis))\nif lis[0] == 'A' and 2 <= lis.index('C') <= len(lis) - 2:\n st = ''.join(lis[1:lis.index('C')] + lis[lis.index('C') + 1:])\n # print(st)\n if st.lower():\n print('AC')\n else:\n print('WA')\n\nelse:\n print('WA')\n", "\n\nimport sys\n\n# import itertools\n# import numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nsys.setrecursionlimit(10 ** 7)\n\nS = list(readline().decode('utf8').rstrip())\nbl = S[0] == 'A'\nbl &= ('C' in S[2:-1])\n\nif bl:\n S.remove('A')\n S.remove('C')\n\nbl &= all('a' <= x <= 'z' for x in S)\n\nprint('AC' if bl else 'WA')\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s310316522', 's708060086', 's048762515'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [534, 576, 436] |
p03289 | u362560965 | 2,000 | 1,048,576 | 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. | ['import sys\nS = list(input())\n# S = "Atcoder"\n# S = list(S)\n\nif S[0] != "A":\n print("WA")\n sys.exit()\nelif S[1].isupper():\n print("WA")\n sys.exit()\nelif S[-1].isupper():\n print("WA")\n sys.exit()\nelif "C" in S[2:-1]:\n S.remove("C")\n S.remove(0)\n S = str(S)\n if S.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 'import sys\nS = input()\n\nif S[0] != "A":\n print("WA")\n sys.exit()\n\nSS = S[2:-2]\nif "C" in SS:\n SS.pop("C")\n if SS.islower():\n print("AC")\n else:\n print("WA")\n\nelse:\n print("WA")', 'S = list(input())\n\nif S[0] != "A":\n print("WA")\nelif "C" in S[2:-1]:\n S.remove("C")\n del S[0]\n S = str(S)\n if S.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s758170061', 's926988369', 's827643648'] | [3064.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [373, 208, 209] |
p03289 | u363118893 | 2,000 | 1,048,576 | 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. | ['import re\n\nS = str(input())\n\nans = "AC"\n\nuppercount = len(re.findall(\'[a-z]\', S))\nif not uppercount == 2:\n ans = "WA"\n\nif not S[0] == "A":\n ans = "WA"\n\ncfind = S[2:-1].find("C")\nif cfind < 0 and uppercount == 1:\n ans = "WA"\n\nif not S[1:cfind+2].islower and S[cfind+3:].islower():\n ans = "WA"\n\nprint(ans)\n', 'import re\n\nS = str(input())\n\nans = "AC"\n\nuppercount = len(re.findall(\'[A-Z]\', S))\nif not uppercount == 2:\n ans = "WA"\n\nif not S[0] == "A":\n ans = "WA"\n\ncfind = S[2:-1].find("C")\nif cfind < 0:\n ans = "WA"\n\nif not S[1:cfind+2].islower and S[cfind+3:].islower():\n ans = "WA"\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s525892413', 's296917457'] | [3188.0, 3188.0] | [20.0, 19.0] | [316, 296] |
p03289 | u365364616 | 2,000 | 1,048,576 | 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. | ["S = input()\nk = 0\nif S[0] == 'A' and S[3:-1].count('C') == 1:\n for i in range(len(S)):\n if S[i].isupper()\n if k == 2:\n print('WA')\n break\n k += 1\n print('AC')\nelse:\n print('WA')", "S = input()\nk = 0\nif S[0] == 'A' and S[2:-1].count('C') == 1:\n for i in range(len(S)):\n if S[i].isupper():\n if k == 2:\n print('WA')\n exit()\n k += 1\n print('AC')\nelse:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s300856908', 's846070417'] | [2940.0, 3060.0] | [17.0, 17.0] | [245, 247] |
p03289 | u366886346 | 2,000 | 1,048,576 | 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. | ['s=input()\nyn=0\nif s.count("C")==1 and s[0]=="A" and s[1]!="C" and s[len(s)-1]!="C":\n for i in range(2,len(s)-1):\n if ord(s[i])<96:\n if s[i]!="C":\n yn=1\n if yn==1:\n print("No")\n else:\n print("Yes")\nelse:\n print("No")\n', 's=input()\nyn=0\nif s[0]=="A" and ord(s[2])>95 and ord(s[len(s)-1])>95 and s.count("C")==1:\n for i in range(len(s)-3):\n if s[i+2]!="C" and ord(s[i+2])<92:\n yn=1\n if yn==1:\n print("WA")\n else:\n print("AC")\nelse:\n print("WA")\n', 's=input()\nyn=0\nnum=0\ncount=0\nfor i in range(len(s)):\n if i==0:\n if s[0]!="A":\n yn=1\n break\n elif i==1 or i==(len(s))-1:\n if s[i]=="C":\n yn=1\n break\n else:\n if s[i]=="C":\n count+=1\n num=ord(s[i])\n if num<93:\n yn=1\n break\nif yn==1:\n print("WA")\nelif count==0 or count>1:\n print("WA")\nelse:\n print("AC")\n', 's=input()\nyn=0\nif s[0]=="A" and ord(s[1])>95 and ord(s[len(s)-1])>95 and s.count("C")==1:\n for i in range(len(s)-3):\n if s[i+2]!="C" and ord(s[i+2])<92:\n yn=1\n if yn==1:\n print("WA")\n else:\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s479855192', 's663034257', 's982016986', 's828925757'] | [3060.0, 9132.0, 3064.0, 9048.0] | [18.0, 21.0, 17.0, 21.0] | [275, 266, 431, 266] |
p03289 | u371132735 | 2,000 | 1,048,576 | 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. | ['print("Yes")', '# abc104_b.py\nS = input()\nupper_cnt=0\nprint(S[2:-1])\nfor i,c in enumerate(S):\n if (i==0 and c!="A") or S[2:-1].count("C")!=1 or (i==1 and not c.islower()):\n print(\'WA\')\n exit()\n if i>=1 and c.isupper():\n upper_cnt+=1\n if upper_cnt >1:\n print(\'WA\')\n exit()\nprint(\'AC\')\n\n', '# abc104_b.py\nS = input()\nupper_cnt=0\nfor i,c in enumerate(S):\n if (i==0 and c!="A") or S[2:-1].count("C")!=1 or (i==1 and not c.islower()):\n print(\'WA\')\n exit()\n if i>=1 and c.isupper():\n upper_cnt+=1\n if upper_cnt >1:\n print(\'WA\')\n exit()\nprint(\'AC\')\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s032940033', 's422762864', 's364750953'] | [2940.0, 3060.0, 3064.0] | [17.0, 18.0, 17.0] | [12, 314, 299] |
p03289 | u371409687 | 2,000 | 1,048,576 | 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. | ['s=input()\nans="AC"\ncnt1=0\ncnt2=0\ncnt3=0\nfor i in range(len(s)):\n if i==0:\n if s[i]!="A":\n ans="WA"\n if i==1:\n cnt1+=s[i].isupper()*1\n if i>=2:\n if i==len(s)-1:\n if s[i]=="C":\n ans="WA"\n elif s[i]=="C":\n cnt2+=1\n else:\n cnt3+=s[i].isupper()*1\nif cnt1!=0 or cnt2!=1 or cnt!=0:\n ans="WA"\nprint(ans)', 's=input()\nans="Yes"\ncnt1=0\ncnt2=0\nfor i in range(len(s)):\n if i==0:\n if s[i]!="A":\n ans="No"\n if i==1:\n cnt1+=s[i].isupper()*1\n if i>=2:\n if i==len(s)-1:\n if s[i]=="C":\n ans="No"\n elif s[i]=="C":\n cnt2+=1\n else:\n cnt2+=s[i].isupper()*1\nif cnt1!=0 or cnt2!=1:\n ans="No"\nprint(ans)', 's=input()\nans="Yes"\ncnt1=0\ncnt2=0\nfor i in range(len(s)):\n if i==0:\n if s[i]!="A":\n ans="No"\n if i==1:\n cnt1+=s[i].isupper()*1\n if i>=2:\n if s[i]=="C":\n cnt2+=1\n else:\n cnt2+=s[i].isupper()*1\nif cnt1!=0 or cnt2!=1:\n ans="No"\nprint(ans)', 's=input()\nans="AC"\ncnt1=0\ncnt2=0\ncnt3=0\nfor i in range(len(s)):\n if i==0:\n if s[i]!="A":\n ans="WA"\n if i==1:\n cnt1+=s[i].isupper()*1\n if i>=2:\n if i==len(s)-1:\n if s[i]=="C":\n ans="WA"\n elif s[i].isupper()*1>0:\n ans="WA"\n elif s[i]=="C":\n cnt2+=1\n else:\n cnt3+=s[i].isupper()*1\nif cnt1!=0 or cnt2!=1 or cnt3!=0:\n ans="WA"\nprint(ans)'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s005944900', 's045722936', 's874122081', 's913419574'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0] | [401, 385, 308, 464] |
p03289 | u371467115 | 2,000 | 1,048,576 | 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. | ["s=input()\nans='WA'\nif s[0]=='A':\n if S[2:-1].count('C')==1:\n c=s.index('C')\n if s[1:c].islower() and s[c:].islower:\n ans='AC'\nprint(ans)", "s=input()\nans='WA'\nif s[0]=='A':\n if s[2:-1].count('C')==1:\n c=s.index('C')\n if s[1:c].islower() and s[c+1:].islower():\n ans='AC'\nprint(ans)\n"] | ['Runtime Error', 'Accepted'] | ['s597216296', 's642327695'] | [2940.0, 2940.0] | [18.0, 18.0] | [148, 153] |
p03289 | u371686382 | 2,000 | 1,048,576 | 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. | ["s = input()\nl = len(s)\n\nif s[0] == 'A':\n if s[3:l - 2].count('C') == 1:\n idx = s[3:l - 2].index('C') + 3\n if s[1:idx].islower() and s[idx + 1:].islower():\n print('AC')\n quit()\nprint('WA')", "s = input()\nl = len(s)\n\nif s[0] == 'A':\n if s[3:l - 1].count('C') == 1:\n idx = s[2:l - 1].index('C') + 2\n if s[1:idx].islower() and s[idx + 1:].islower():\n print('AC')\n quit()\nprint('WA')", "s = input()\nl = len(s)\n\nif s[0] == 'A':\n if s[:3].count('C') == 1 ^ s[l-2:].count('C') == 1:\n try:\n idx = s[:3].index('C')\n except:\n pass\n try:\n idx = s[l-2:] + l-2\n except:\n pass\n if s[1:idx].islower() and s[idx+1:].islower():\n print('Yes')\n quit()\nprint('WA')", "s = input()\nl = len(s)\n\nif s[0] == 'A':\n if s[2:l - 1].count('C') == 1:\n idx = s[2:l - 1].index('C') + 2\n if s[1:idx].islower() and s[idx + 1:].islower():\n print('AC')\n quit()\nprint('WA')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s271276933', 's417023968', 's729830179', 's732081922'] | [3060.0, 3060.0, 3060.0, 3060.0] | [19.0, 17.0, 19.0, 17.0] | [204, 204, 307, 204] |
p03289 | u374802266 | 2,000 | 1,048,576 | 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. | ["s=input()\nprint('Yes' if s[0]=='A' and 'C' in s and 1<s.index('C') and s.index('C')+1<len(s) and sum([c.isupper() for c in s])==2 else 'No')", "s=input()\nprint('AC' if s[0]=='A' and 'C' in s and 1<s.index('C') and s.index('C')+1<len(s) and sum([c.isupper() for c in s])==2 else 'WA')"] | ['Wrong Answer', 'Accepted'] | ['s754191806', 's561750344'] | [8996.0, 9096.0] | [30.0, 28.0] | [140, 139] |
p03289 | u375500286 | 2,000 | 1,048,576 | 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. | ['s=input()\nss=s.replace("A","a")\nss=ss.replace("C","c")\nprint(s[2:len(s)-2])\nif s[0]=="A" and s[2:len(s)-1].count("C")==1 and ss.islower():\n print("AC")\nelse :\n print("WA")', 's=input()\nss=s.replace("A","a")\nss=ss.replace("C","c")\nprint(s[2:len(s)-2])\nif s[0]=="A" and s[2:len(s)-1].count("c")==1 and ss.islower()==True:\n print("AC")\nelse :\n print("WA")', 's=input()\nss=s.replace("A","a")\nss=ss.replace("C","c")\nprint(s[2:len(s)-2])\nif s[0]=="A" and s[2:len(s)-1].count("c")==1 and ss.islower():\n print("AC")\nelse :\n print("WA")', 's=input()\nss=s.replace("A","a")\nss=ss.replace("C","c")\nif s[0]=="A" and s[2:len(s)-1].count("C")==1 and ss.islower():\n print("AC")\nelse :\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s170405944', 's348956081', 's789603529', 's521052346'] | [3060.0, 3060.0, 3064.0, 2940.0] | [18.0, 18.0, 17.0, 18.0] | [177, 183, 177, 156] |
p03289 | u377989038 | 2,000 | 1,048,576 | 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. | ['s = input()\n\nif s[0] != "A":\n print("WA")\n exit()\n\nif s[3:-1] not in "C":\n print("WA")\n exit()\n\nif s[1:].replace("C", "").lower() == s[1:].replace("C", ""):\n print("AC")\nelse:\n print("WA")\n', 's = input()\n\nif s[0] != "A":\n print("WA")\n exit()\n\nif s[3:-1] not in "C" or s[:2] in "C" or s[-1] in "C":\n print("WA")\n exit()\n\nif s[1:].replace("C", "").lower() == s[1:].replace("C", ""):\n print("AC")\nelse:\n print("WA")\n', 's = input()\n\nif s[0] != "A":\n print("WA")\n exit()\n\nif s[2:-1] not in "C":\n print("WA")\n exit()\n\nif s[1:].replace("C", "").lower() == s[1:].replace("C", ""):\n print("AC")\nelse:\n print("WA")\n', 's = input()\n\nif s[0] != "A":\n print("WA")\n exit()\n\nif s[2:-1].count("C") != 1:\n print("WA")\n exit()\n\nif s[1:].replace("C", "").lower() == s[1:].replace("C", ""):\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s072613288', 's616455255', 's760016671', 's240865536'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 18.0, 17.0] | [207, 239, 207, 211] |
p03289 | u379689509 | 2,000 | 1,048,576 | 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. | ['s = str(input())\ni = len(s)\n\nsc = s.lstrip("A")\nsb = sc.replace("C", "")\n\nif s[0] == "A" and s[2:i - 1].count("C") == 1 and sb.islower() is True:\n print("AC")\n\nelse:\n print("WA")\n\nprint(sb)\n', 's = str(input())\ni = len(s)\n\nsc = s.lstrip("A")\nsb = sc.replace("C", "")\n\nif s[0] == "A" and s[2:i - 1].count("C") == 1 and sb.islower() is True:\n print("AC")\n\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s115518656', 's676736756'] | [2940.0, 2940.0] | [17.0, 17.0] | [196, 185] |
p03289 | u380793800 | 2,000 | 1,048,576 | 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. | ['s = list(input())\n\nif s[0] != "A":\n print("WA")\n exit()\nif not s[2:-2].count("c" == 1):\n print("WA")\n exit()\nfor t in s:\n if t.isupper() and t != "A" and t != "C":\n print("WA")\n exit()\n\nprint("AC")\n', 's = list(input())\n\nif s[0] != "A":\n print("WA")\n exit()\nif not s[2:-2].count("C" == 1):\n print("WA")\n exit()\nfor t in s:\n if t.isupper() and t != "A" and t != "C":\n print("WA")\n exit()\n\nprint("AC")\n\n', 's = list(input())\n\nif s[0] != "A":\n print("WA")\n exit()\nif s[2:-1].count("C") != 1:\n print("WA")\n exit()\nfor t in s:\n if t.isupper() and t != "A" and t != "C":\n print("WA")\n exit()\n\nprint("AC")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s092690932', 's626069198', 's003242188'] | [3060.0, 2940.0, 3060.0] | [17.0, 17.0, 19.0] | [227, 228, 223] |
p03289 | u380933932 | 2,000 | 1,048,576 | 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. | ['s=input()\nans="AC"\nif s[0]!="A":\n ans="WA"\nc=0\nidx=0\nfor i in range(2,len(s)-2):\n if s[i]=="C":\n c+=1\n idx=i\nif c!=1:\n ans="WA"\nsmall={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}\nfor i in range(1,len(s)+1):\n if i!=idx:\n if s[i] not in small:\n ans="WA"\n break\nprint(ans)\n', 's=input()\nans="AC"\nif s[0]!="A":\n ans="WA"\nc=0\nidx=0\nfor i in range(2,len(s)-1):\n if s[i]=="C":\n c+=1\n idx=i\nif c!=1:\n ans="WA"\nsmall={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}\nfor i in range(1,len(s)):\n if i!=idx:\n if s[i] not in small:\n ans="WA"\n break\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s194955954', 's913855382'] | [3064.0, 3064.0] | [18.0, 17.0] | [386, 384] |
p03289 | u382176416 | 2,000 | 1,048,576 | 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. | ["s_list=list(input())\n\ndef out_wa():\n print('WA')\n\nif s_list[0]!='A':\n out_wa()\nelse:\n count=0\n for i in range(2,len(s_list)-2):\n if s_list[i] == 'C':\n count+=1\n\n if count != 1:\n out_wa()\n else:\n s = ''.join(s_list)\n l_s=s.lower()\n print(s)\n print(l_s)\n if l_s !=s:\n out_wa()\n else:\n print('AC')", "s_list=list(input())\n\ndef out_wa():\n print('WA')\n\nif s_list[0]!='A':\n out_wa()\nelse:\n count=0\n for i in range(2,len(s_list)-1):\n if s_list[i] == 'C':\n count+=1\n\n if count != 1:\n out_wa()\n else:\n s = ''.join(s_list)\n l_s=s.lower()\n print(s)\n print(l_s)\n if l_s !=s:\n out_wa()\n else:\n print('AC')", "s_list=list(input())\n\ndef out_wa():\n print('WA')\n\nif s_list[0]!='A':\n out_wa()\nelse:\n count=0\n for i in range(2,len(s_list)-1):\n if s_list[i] == 'C':\n count+=1\n\n if count != 1:\n out_wa()\n else:\n s = ''.join(s_list)\n s=s.replace('A','')\n s=s.replace('C','')\n l_s=s.lower()\n if l_s !=s:\n out_wa()\n else:\n print('AC')\n "] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s304829998', 's773411684', 's722680158'] | [3060.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0] | [339, 339, 363] |
p03289 | u382431597 | 2,000 | 1,048,576 | 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. | ['import sys\ns = input()\njudge = 1\nif s[0] != "A":\n judge = 0\n\nif not s[1] != "C" and s[len(s) -1] != "C" and s.count("C") == 1:\n judge = 0\n\ns.replace("A","a").replace("C","c")\n\nif s.islower() and judge == 1:\n print("AC")\nelse:\n print("WA")', 'import sys\ns = input()\njudge = 0\nif s[0] == "A":\n judge += 1\n\nif s[1] != "C" and s[len(s) -1] != "C" and s.count("C") == 1:\n judge += 1\n\ns = s.replace("A","a").replace("C","c")\n#print(s,judge)\nif s.islower() and judge == 2:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s728057894', 's842486037'] | [3060.0, 3060.0] | [17.0, 17.0] | [250, 267] |
p03289 | u384679440 | 2,000 | 1,048,576 | 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. | ["S = input()\nans = 'WA'\nif S[0] == 'A':\n\tif S[2:-2].count('C') == 1:\n\t\tp = 0\n\t\tfor i in range(2, len(S) - 1):\n\t\t\tif S[i] == 'C':\n\t\t\t\tp = i\n\t\tif S[1:p].islower() and S[p+1:].islower():\n\t\t\tprint(S[1:p])\n\t\t\tprint(S[p+1:])\n\t\t\tans = 'AC'\nprint(ans)", "S = input()\nans = 'WA'\nif S[0] == 'A':\n\tif S[2:-1].count('C') == 1:\n\t\tp = 0\n\t\tfor i in range(2, len(S)-1):\n\t\t\tif S[i] == 'C':\n\t\t\t\tp = i\n\t\tif S[1:p].islower() and S[p+1:].islower():\n\t\t\tans = 'AC'\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s827182707', 's556220695'] | [3064.0, 3060.0] | [17.0, 18.0] | [242, 205] |
p03289 | u385167811 | 2,000 | 1,048,576 | 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. | ['s = str(input())\nflag = 0\nflag2 = 0\nif s[0] == \'A\':\n for i in range(2,len(s)-2):\n if s[i] == \'C\':\n flag += 1\n for i in range(1,len(s)):\n if s[i] == s[i].upper():\n flag2 += 1\nprint(flag,flag2)\nif flag == 1 and flag2 == 1:\n print("AC")\nelse:\n print("WA")', 's = str(input())\nflag = 0\nflag2 = 0\nif s[0] == \'A\':\n for i in range(2,len(s)-1):\n if s[i] == \'C\':\n flag += 1\n for i in range(1,len(s)):\n if s[i] == s[i].upper():\n flag2 += 1\n#print(flag,flag2)\nif flag == 1 and flag2 == 1:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s622350975', 's575830191'] | [3064.0, 3060.0] | [18.0, 18.0] | [300, 301] |
p03289 | u386089355 | 2,000 | 1,048,576 | 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. | ['s = input()\n\nls_flag = [0, 1, 1]\n\nfor i in range(len(s)):\n if s[i].isupper is True:\n if (s[i] != "A") or (s[i] != "C"):\n ls_flag[0] = 1\n break\n\nif s[0] == "A" and ("A" not in s[1:] is True):\n ls_flag[1] = 0\n\nif s[2:-1].count("C") == 1 and s.count("C") == 1:\n ls_flag[2] = 0\n \nif sum(ls_flag) == 0:\n print("AC")\nelse:\n print("WA")', 's = input()\n\nls_flag = [0, 1, 1]\n\nfor i in range(len(s)):\n if (s[i] != "A") or (s[i] != "C"):\n if s[i].isupper is True:\n ls_flag[0] = 1\n break\n\nif s[0] == "A" and ("A" not in s[1:] is True):\n ls_flag[1] = 0\n\nif s[2:-1].count("C") == 1 and s.count("C") == 1:\n ls_flag[2] = 0\n \nif sum(ls_flag) == 0:\n print("AC")\nelse:\n print("WA")', "s = input()\n\nflag = [0] * 3\n\nif s[0] == 'A':\n\tflag[0] += 1\n\ts = 'a' + s[1:]\n\nCcnt = 0\nfor i in range(2, len(s) - 1):\n\tif s[i] == 'C':\n\t\tCcnt += 1\n\t\ts = s[:i] + 'c' + s[i+1:]\n\nif Ccnt == 1:\n\tflag[1] = 1\n\nif s.islower() is True:\n\tflag[2] = 1\n\n\nif sum(flag) == 3:\n\tprint('AC')\nelse:\n\tprint('WA')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s348072986', 's763527036', 's552505738'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [376, 376, 292] |
p03289 | u390618988 | 2,000 | 1,048,576 | 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. | ["from sys import stdin\nimport re\n\nS = stdin.readline().rstrip()\n\npattern1 = r'A[a-z]C[a-z]{1, 7}'\npattern2 = r'A[a-z]{2}C[a-z]{1, 6}'\npattern3 = r'A[a-z]{3}C[a-z]{1, 5}'\npattern4 = r'A[a-z]{4}C[a-z]{1, 4}'\npattern5 = r'A[a-z]{4}C[a-z]{1, 3}'\npattern6 = r'A[a-z]{4}C[a-z]{1, 2}'\npattern7 = r'A[a-z]{4}C[a-z]{1}'\n\nif (re.match(pattern1, S)) or (re.match(pattern2, S)) or (re.match(pattern3, S)) or (re.match(pattern4, S)) \\\n or (re.match(pattern5, S)) or (re.match(pattern6, S)) or (re.match(pattern7, S)):\n print('AC')\nelse:\n print('WA')", "from sys import stdin\nimport re\n\nS = stdin.readline().rstrip()\n\npattern1 = r'A[a-z]C[a-z]{1, 7}'\npattern2 = r'A[a-z]{2}C[a-z]{1, 6}'\npattern3 = r'A[a-z]{3}C[a-z]{1, 5}'\npattern4 = r'A[a-z]{4}C[a-z]{1, 4}'\npattern5 = r'A[a-z]{5}C[a-z]{1, 3}'\npattern6 = r'A[a-z]{6}C[a-z]{1, 2}'\npattern7 = r'A[a-z]{7}C[a-z]{1}'\n\nif (re.match(pattern1, S)) or (re.match(pattern2, S)) or (re.match(pattern3, S)) or (re.match(pattern4, S)) \\\n or (re.match(pattern5, S)) or (re.match(pattern6, S)) or (re.match(pattern7, S)):\n print('AC')\nelse:\n print('WA')", 'from sys import stdin\nimport re\n\nS = stdin.readline().rstrip()\nprint(S)\n\npattern1 = r"^A([a-z])C([a-z]{1,7})$"\npattern2 = r\'^A([a-z]){2}C([a-z]{1,6})$\'\npattern3 = r\'^A([a-z]){3}C([a-z]{1,5})$\'\npattern4 = r\'^A([a-z]){4}C([a-z]{1,4})$\'\npattern5 = r\'^A([a-z]){5}C([a-z]{1,3})$\'\npattern6 = r\'^A([a-z]){6}C([a-z]{1,2})$\'\npattern7 = r\'^A([a-z]){7}C([a-z]{1})$\'\n\nif (re.match(pattern1, S)) or (re.match(pattern2, S)) or (re.match(pattern3, S)) or (re.match(pattern4, S)) \\\n or (re.match(pattern5, S)) or (re.match(pattern6, S)) or (re.match(pattern7, S)):\n print(\'AC\')\nelse:\n print(\'WA\')\n', "from sys import stdin\nimport re\n\nS = stdin.readline().rstrip()\n\npattern1 = r'A.C[a-z]{1, 7}'\npattern2 = r'A[a-z]{2}C[a-z]{1, 6}'\npattern3 = r'A[a-z]{3}C[a-z]{1, 5}'\npattern4 = r'A[a-z]{4}C[a-z]{1, 4}'\npattern5 = r'A[a-z]{4}C[a-z]{1, 3}'\npattern6 = r'A[a-z]{4}C[a-z]{1, 2}'\npattern7 = r'A[a-z]{4}C[a-z]{1}'\n\nif (re.match(pattern1, S)) or (re.match(pattern2, S)) or (re.match(pattern3, S)) or (re.match(pattern4, S)) \\\n or (re.match(pattern5, S)) or (re.match(pattern6, S)) or (re.match(pattern7, S)):\n print('AC')\nelse:\n print('WA')", 'from sys import stdin\nimport re\n\nS = stdin.readline().rstrip()\n\npattern1 = r"^A([a-z])C([a-z]{1,7})$"\npattern2 = r\'^A([a-z]){2}C([a-z]{1,6})$\'\npattern3 = r\'^A([a-z]){3}C([a-z]{1,5})$\'\npattern4 = r\'^A([a-z]){4}C([a-z]{1,4})$\'\npattern5 = r\'^A([a-z]){5}C([a-z]{1,3})$\'\npattern6 = r\'^A([a-z]){6}C([a-z]{1,2})$\'\npattern7 = r\'^A([a-z]){7}C([a-z]{1})$\'\n\nif (re.match(pattern1, S)) or (re.match(pattern2, S)) or (re.match(pattern3, S)) or (re.match(pattern4, S)) \\\n or (re.match(pattern5, S)) or (re.match(pattern6, S)) or (re.match(pattern7, S)):\n print(\'AC\')\nelse:\n print(\'WA\')'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s472317484', 's767524342', 's872921239', 's921976763', 's500525501'] | [3188.0, 3188.0, 3188.0, 3188.0, 3188.0] | [20.0, 20.0, 20.0, 20.0, 20.0] | [548, 548, 594, 544, 584] |
p03289 | u393512980 | 2,000 | 1,048,576 | 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. | ['S = input()\nif S[0] != \'A\':\n print("WA")\nelse:\n if \'C\' not in S[2:] or S[2:].count(\'C\') > 1:\n print("WA")\n else:\n S[0:1].lower()\n i = S.find(\'C\')\n S[i:i+1].lower()\n if S.islower():\n print("AC")\n else:\n print("WA")', 'S = input()\nif S[0] != \'A\':\n print("WA")\nelse:\n if \'C\' not in S[2:-1] or S[2:-1].count(\'C\') > 1:\n print("WA")\n else:\n S[0:1].lower()\n i = S.find(\'C\')\n S[i:i+1].lower()\n if S.islower():\n print("AC")\n else:\n print("WA")', 'S = input()\nif S[0] != \'A\':\n print("WA")\nelse:\n if \'C\' not in S[2:-1] or S[2:-1].count(\'C\') > 1:\n print("WA")\n else:\n i = S.find(\'C\')\n S = S[0:1].lower() + S[1:i] + S[i:i+1].lower() + S[i+1:]\n if S.islower():\n print("AC")\n else:\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s219555007', 's226060701', 's085802365'] | [3060.0, 3060.0, 3060.0] | [18.0, 17.0, 17.0] | [244, 248, 269] |
p03289 | u394721319 | 2,000 | 1,048,576 | 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. | ["S = list(input())\n\np = S[0]+S[2]\nq = S[0]+S[-2]\n\nflag = 0\nfor i in range(1,len(S)):\n if i != 2 and i != len(S)-2:\n if not S[i].islower():\n print('WA')\n exit()\n else:\n if S[i] != 'C':\n print('WA')\n exit()\n\nif (p == 'AC' and q != 'AC') or (p != 'AC' and q == 'AC'):\n print('AC')\nelse:\n print('WA')\n", "S = input()\n\nc = 0\nfor i in S:\n if i.isupper():\n c += 1\n\nif S[0] != 'A' or S[-1].isupper() or c != 2 or 'C' not in S[2:-1]:\n print('WA')\nelse:\n print('AC')\n"] | ['Wrong Answer', 'Accepted'] | ['s899761773', 's226073362'] | [8900.0, 2940.0] | [26.0, 19.0] | [366, 172] |
p03289 | u396266329 | 2,000 | 1,048,576 | 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. | ['s = input()\nif s[0] != \'A\':\n print(\'WA\')\n exit()\nsho = ord(\'a\')\nok = 0\nfor i in s[2: len(s) - 1]:\n if ord(i) < sho:\n if ord(i) == ord("C"):\n ok += 1\n else:\n print("WA")\n exit()\nif ord(s[0]) < sho or ord(s[1]) < sho or ord(s[len(s) - 1]) < sho:\n print("WA")\n exit()\nif ok == 1:\n print("AC")\nelse:\n print("WA")', 's = input()\nif s[0] != \'A\':\n print(\'WA\')\n exit()\nsho = ord(\'a\')\nok = 0\nfor i in s[2: len(s) - 1]:\n if ord(i) < sho:\n if ord(i) == ord("C"):\n ok += 1\n else:\n print("WA")\n exit()\nif ord(s[1]) < sho or ord(s[len(s) - 1]) < sho:\n print("WA")\n exit()\nif ok == 1:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s031390980', 's167042934'] | [3064.0, 3064.0] | [17.0, 17.0] | [336, 317] |
p03289 | u396391104 | 2,000 | 1,048,576 | 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. | ['s = input()\nprint("AC" if s[1]=="A" and s[2:-1].count("C")==1 and s[1:].replace("C","").islower() else "WA")', 's = input()\nprint("AC" if s[0]=="A" and s[2:-1].count("C")==1 and s[1:].replace("C","").islower() else "WA")'] | ['Wrong Answer', 'Accepted'] | ['s204842839', 's091647274'] | [2940.0, 2940.0] | [17.0, 17.0] | [108, 108] |
p03289 | u396495667 | 2,000 | 1,048,576 | 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. | ["s =list(input())\nans =0\nfor i in range(len(s)):\n if s[0] =='A':\n a = s.pop(0)\n if s[1] =='C':\n a = s.pop(1)\n else:\n ans =1\ns = ''.join(s) \n\nprint('AC' if s.islower() and ans ==0 else 'WA')", "s =list(input())\nans =0\nfor i in range(len(s)):\n if s[0] =='A':\n a = s.pop(0)\n if s[2:-1].count('C') ==1:\n a = s.pop(1)\ns = ''.join(s) \nprint('AC' if s.islower() else 'WA')", "s = input()\nif s[0] =='A':\n if s[2:-1].count('C') ==1:\n if len([i for i in s if i.islower()]) == (len(s)-2):\n print('AC')\n exit()\nprint('WA')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s081894477', 's870537440', 's101833855'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [206, 189, 155] |
p03289 | u403355272 | 2,000 | 1,048,576 | 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. | ['s = input()\nif s[0] == \'A\':\n if s[2:-1].count(\'C\') == 1:\n for i in range(1, len(s)):\n if 97 <= ord(s[i]) <= 122:\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")\n', 's = input()\ncount_c = 0\n\nif s[0] == \'A\':\n if s[2:-1].count(\'C\') == 1:\n for i in range(1, len(s)):\n if 97 <= ord(s[i]) <= 122:\n continue\n else:\n count_c += 1\n if count_c > 1:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")\n\nif count_c == 1:\n print("AC")\n'] | ['Wrong Answer', 'Accepted'] | ['s456819197', 's592996780'] | [2940.0, 3060.0] | [17.0, 17.0] | [218, 303] |
p03289 | u404075214 | 2,000 | 1,048,576 | 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. | ['import re\nS = input()\n\nflag = 0\nif S[0] == "A":\n for i in S[2:-1]:\n if i == "C":\n flag += 1\n if flag == 1:\n if S.count(r\'[A-Z]\') == 2:\n print("AC")\n quit()\nprint("WA")\n', 'import re\nS = input()\n\nflag = 0\nif S[0] == "A":\n for i in S[2:-1]:\n if i == "C":\n flag += 1\n if flag == 1:\n if len(re.findall(r\'[A-Z]\',S)) == 2:\n print("AC")\n quit()\nprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s226156776', 's449371406'] | [3188.0, 3188.0] | [19.0, 19.0] | [221, 231] |
p03289 | u404676457 | 2,000 | 1,048,576 | 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. | ["import sys\ns = list(input())\n\nif s[0] != 'A':\n print('WA')\n sys.exit(0)\nfor i in range(2, len(s) - 1):\n if [i] == 'C':\n s.pop(i)\n break\nelse:\n print('WA')\n sys.exit(0)\n\nif ''.join(s[1:]) == ''.join(s[1:]).lower():\n print('AC')\nelse:\n print('WA')", "import sys\ns = list(input())\n \nif s[0] != 'A':\n print('WA')\n sys.exit(0)\n\nfor i in range(2, len(s) - 1):\n if s[i] == 'C':\n s.pop(i)\n break\nelse:\n print('WA')\n sys.exit(0)\n \nif ''.join(s[1:]) == ''.join(s[1:]).lower():\n print('AC')\nelse:\n print('WA')"] | ['Wrong Answer', 'Accepted'] | ['s346756106', 's571525270'] | [3064.0, 3064.0] | [18.0, 17.0] | [280, 284] |
p03289 | u410118019 | 2,000 | 1,048,576 | 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. | ["s = input()\nif s[0] == 'A' and 'C' in s[2:-2]:\n c = s.index('C')\n if s[1:c] + s[c+1:] == (s[1:c] + s[c+1:]).lower:\n print('AC')\n exit()\nprint('WA')", "s = input()\nif s[0] == 'A' and 'C' in s[2:-1]:\n c = s.index('C')\n if s[1:c] + s[c+1:] == (s[1:c] + s[c+1:]).lower():\n print('AC')\n exit()\nprint('WA')"] | ['Wrong Answer', 'Accepted'] | ['s293346347', 's688812383'] | [3060.0, 3060.0] | [17.0, 17.0] | [155, 157] |
p03289 | u414558682 | 2,000 | 1,048,576 | 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. | ["s = input()\nans = True\n\nif s[0] != 'A':\n ans = False\n# print(s.count('C'))\nindex = -1\nif s[2:-2].count('C') == 1:\n index = s.index('C')\n # print(index)\nelse:\n ans = False\n\n \nfor i in range(len(s)):\n if i == 0:\n continue\n if i == index:\n continue\n if not s[i].isupper():\n ans = False\n\n\nif ans:\n print('AC')\nelse:\n print('WA')", "s = input()\nans = True\n\nif s[0] != 'A':\n ans = False\n # print(f's[0]:{s[0]}')\n\nindex = -1\nbetween_bigin_3_and_end_2 = s[2:-1]\ncount = between_bigin_3_and_end_2.count('C')\nif count == 1:\n index = s.index('C')\n # print(index)\nelse:\n ans = False\n # print(f'between_bigin_3_and_end_2:{between_bigin_3_and_end_2}')\n # print(f'count:{count}')\n\n \nfor i in range(len(s)):\n if i == 0:\n continue\n if i == index:\n continue\n if not s[i].islower():\n ans = False\n\n\nif ans:\n print('AC')\nelse:\n print('WA')"] | ['Wrong Answer', 'Accepted'] | ['s776221981', 's250539230'] | [9004.0, 9048.0] | [29.0, 33.0] | [375, 550] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.