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 | u637918426 | 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())\nA_check = []\nC_check = []\nlower_check = []\n\nfor i in range(len(S)):\n if S[i] == 'A':\n A_check.append(i)\n \n if S[i] == 'C':\n C_check.append(i)\n \n if S[i].islower():\n lower_check.append(i)\n \n\nif len(A_check) != 1 or len(C_check) != 1 or len(lower_check) != (len(S) - 2):\n print('WA')\nelif A_check[0] != '0' or C_check[0] == len(S) - 1 or C_check[0] < 2:\n print('WA')\nelse:\n print('AC')\n", "S = list(input())\nA_check = []\nC_check = []\nlower_check = []\n\nfor i in range(len(S)):\n if S[i] == 'A':\n A_check.append(i)\n \n if S[i] == 'C':\n C_check.append(i)\n \n if S[i].islower():\n lower_check.append(i)\n \n\nif len(A_check) != 1 or len(C_check) != 1 or len(lower_check) != (len(S) - 2):\n print('No')\nelif A_check[0] != '0' or C_check[0] == len(S) - 1 or C_check[0] < 2:\n print('No')\nelse:\n print('Yes')", "S = list(input())\nA_check = []\nC_check = []\nlower_check = []\n\nfor i in range(len(S)):\n if S[i] == 'A':\n A_check.append(i)\n \n if S[i] == 'C':\n C_check.append(i)\n \n if S[i].islower():\n lower_check.append(i)\n \n\nif len(A_check) != 1 or len(C_check) != 1 or len(lower_check) != (len(S) - 2):\n print('WA')\nelif A_check[0] != 0 or C_check[0] == len(S) - 1 or C_check[0] < 2:\n print('WA')\nelse:\n print('AC')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s398343349', 's641941648', 's619331590'] | [3064.0, 3064.0, 3064.0] | [18.0, 17.0, 17.0] | [454, 454, 452] |
p03289 | u640603056 | 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. | ['\nimport sys\n\n\ndef ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))\ndef ISI(): return map(int, sys.stdin.readline().rstrip().split())\ndef II(): return int(sys.stdin.readline().rstrip())\ndef ISS(): return sys.stdin.readline().rstrip().split()\ndef IS(): return sys.stdin.readline().rstrip()\n\nS = IS()\nif S[0] == "A" and S[2] == "C" and islower(S[1])==True and islower(S[3:]):\n print("AC")\nelse:\n print("WA")\n', '\nimport sys\n\n\ndef ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))\ndef ISI(): return map(int, sys.stdin.readline().rstrip().split())\ndef II(): return int(sys.stdin.readline().rstrip())\ndef ISS(): return sys.stdin.readline().rstrip().split()\ndef IS(): return sys.stdin.readline().rstrip()\n\nS = IS()\nif S[0] == "A" and S.count("C") == 1 and S[-1] != "C":\n if S[1].islower() == True:\n if S[S.index("C")+1:].islower() == True:\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s159932571', 's832453560'] | [3060.0, 3064.0] | [17.0, 17.0] | [457, 591] |
p03289 | u641460756 | 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())\ndef h(list):\n count = 1\n C_count = 0\n for i in list:\n if len(list)-2>=count >= 3 and i == "C":\n C_count+=1\n count+=1\n return False\n\nif (s[0] == "A" and h(s)):\n print("AC")\nelse:\n print("WA")', 's = list(input())\nans = []\nflag = 0\ncounter = 0\nfor i in range(len(s)):\n if (i == 0 and s[i] == "A"):\n ans.append(1)\n counter = 1\n elif (i == 0 and s[i] != "A" and s[i].isupper()):\n print("WA")\n exit()\n elif (2 <= i <= len(s) - 2 and s[i] == "C" and flag ==0):\n ans.append(1)\n flag = 1\n counter = 1\n elif (2 <= i <= len(s) - 2 and s[i] == "C" and flag == 1):\n print("WA")\n exit()\n elif (counter == 0 and s[i].isupper()):\n print("WA")\n exit()\n counter = 0\nif (len(ans) == 2):\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s535398865', 's441583753'] | [3060.0, 3064.0] | [17.0, 17.0] | [251, 607] |
p03289 | u642528832 | 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()\nsl = []\nans = \'AC\'\n\nfor i in S:\n sl.append(i)\nif sl[0] != \'A\':\n ans = \'WA\'\nif sl[2:-1].count(\'C\') != 1:\n ans = \'WA\'\n\nif sl[1:].replace("C","c",1).islower() == False:\n ans = \'WA\'\n#print(sl)\nprint(ans)', 'S = input()\nsl = []\nans = \'AC\'\n\nfor i in S:\n sl.append(i)\nif S[0] != \'A\':\n ans = \'WA\'\nif S[2:-1].count(\'C\') != 1:\n ans = \'WA\'\n\nif S[1:].replace("C","c",1).islower() == False:\n ans = \'WA\'\n#print(sl)\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s828800671', 's442443133'] | [9012.0, 9056.0] | [24.0, 31.0] | [223, 220] |
p03289 | u644516473 | 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' and s[2:-1].count('C') == 1\\\n s.replace('A', '').replace('C', '').islower():\n ans = 'AC'\nprint(ans)", "s = input()\nans = 'WA'\nif s[0] == 'A' and s[2:-1].count('C') == 1\\\n s.replace('A', '').replace('C', '').islower():\n ans = 'AC'\nprint(ans)nn", "s = input()\nans = 'WA'\nif s[0] == 'A' and (s[3] == 'C' or s[-2] == 'C') and s[3]+s[-2] != 'CC' and s.islower():\n ans = 'AC'\nprint(ans)", "s = input()\nans = 'WA'\nif s[0] == 'A' and s[2:-1].count('C') == 1\\\n and s.replace('A', '').replace('C', '').islower():\n ans = 'AC'\nprint(ans)\n"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s104473130', 's133193701', 's141465655', 's039784258'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [140, 142, 135, 145] |
p03289 | u647656433 | 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 S = \'a\' + S[1:]\n print(S)\n if S[2:-1].count(\'C\') == 1:\n S = S[:S.index(\'C\')] + \'c\' + S[S.index(\'C\')+1:]\n print(S)\n if S.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', 'S = input()\nif S[0] == \'A\':\n S = \'a\' + S[1:]\n if S[2:-1].count(\'C\') == 1:\n S = S[:S.index(\'C\')] + \'c\' + S[S.index(\'C\')+1:]\n if S.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s249738894', 's809765912'] | [3060.0, 2940.0] | [18.0, 17.0] | [303, 274] |
p03289 | u657913472 | 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\nprint("AC"if re.match("/^A[a-z]+C[a-z]+$/",input())else"WA")', 'import re\nprint("AC"if re.match("^A[a-z]+C[a-z]+$",input())else"WA")'] | ['Wrong Answer', 'Accepted'] | ['s072163074', 's809986717'] | [3188.0, 3188.0] | [19.0, 19.0] | [70, 68] |
p03289 | u668503853 | 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" and S[2:-1].count("C")==1:\n s=S.find("C",2,-1)-\n SS=S[1:s]+S[s+1:]\n if SS.islower() is True:\n ans="AC"\nprint(ans)', 'S=input()\nans="WA"\nif S[0]=="A" and S[2:-1].count("C")==1:\n s=S.find("C",2,-1)\n S=S[1:s]+S[s+1:]\n if S.islower() is True:\n ans="AC"\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s263160635', 's764171224'] | [2940.0, 3064.0] | [17.0, 17.0] | [151, 148] |
p03289 | u669173971 | 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()\ncnt=0\nif s[0]!='A':\n print('WA')\nelif s[1].isuper():\n print('WA')\nelif s[-1].isuper():\n print('WA')\nelse:\n for i in range(2,len(s)-1):\n if s[i]=='C':\n cnt+=1\n else:\n if s[i].isupper():\n print('WA')\n sys.exit()\n if cnt==1:\n print('AC')\n else:\n print('WA')", "import sys\ns=input()\ncnt=0\nif s[0]!='A':\n print('WA')\nelif s[1].isupper():\n print('WA')\nelif s[-1].isupper():\n print('WA')\nelse:\n for i in range(2,len(s)-1):\n if s[i]=='C':\n cnt+=1\n else:\n if s[i].isupper():\n print('WA')\n sys.exit()\n if cnt==1:\n print('AC')\n else:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s349539817', 's931748015'] | [3064.0, 3060.0] | [18.0, 17.0] | [373, 375] |
p03289 | u669770658 | 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())\ns1 = ''\n\nif len(s) == 4:\n df = len(s)\nelse:\n df = len(s) - 1\n\nflag = False\n\nif s.count('C') == 1:\n for i in range(1, df):\n if s[i] == 'C':\n flag = True\n else:\n s1 += s[i]\nelse:\n flag = False\n\nif s1.islower() and len(s) <= 1:\n flag = True\nelse:\n flag = False\n\n\nif flag and s[0] == 'A':\n print('AC')\nelse:\n print('WA')", "# -*- coding: utf-8 -*-\n\n\ns = str(input())\n\nif len(s) <= 4:\n df = len(s)\nelse:\n df = len(s) - 1\n\nflag = False\n\nif s.count('C') == 1:\n for i in range(2, df):\n if s[i] == 'C':\n if s[0] == 'A':\n flag = True\n else:\n flag = False\n\nif flag:\n print('AC')\nelse:\n print('WA')", "# -*- coding: utf-8 -*-\n\n\ns = str(input())\n\ns1 = s[0] + s[2] + s[-2]\ns2 = ''\n\nfor i in range(len(s)):\n if i == 0 or i == 2 or i == (len(s) - 2):\n continue\n else:\n s2 += s[i]\n\nif s1.isupper() and s2.islower():\n print('AC')\n\nelse:\n print('WA')", "s = str(input())\ns1 = ''\n\nif len(s) == 4:\n df = len(s)\nelse:\n df = len(s) - 1\n\nflag = False\n\nif s.count('C') == 1:\n for i in range(1, df):\n if s[i] == 'C' and i <= 2:\n flag = True\n else:\n s1 += s[i]\nelse:\n flag = False\n\nif s1.islower() and len(s) <= 1:\n flag = True\nelse:\n flag = False\n\n\nif flag and s[0] == 'A':\n print('AC')\nelse:\n print('WA')", " = str(input())\ns1 = ''\n\nif len(s) == 4:\n df = len(s)\nelse:\n df = len(s) - 1\n s1 += s[df:]\n\nflag = False\n\nif s.count('C') == 1:\n for i in range(1, df):\n if s[i] == 'C' and i <= 2:\n flag = True\n else:\n s1 += s[i]\nelse:\n flag = False\n\nif s1.islower() and len(s) >= 1:\n flag = True\nelse:\n flag = False\n\nprint(s1)\n\nif flag and s[0] == 'A':\n print('AC')\nelse:\n print('WA')\n", "s = str(input())\n\nans = 'AC'\ncnt = 0\n\nif s[0] != 'A':\n ans = 'WA'\n\nfor i in range(1, len(s) + 1):\n if s[i].isupper():\n if i == 1 or i == len(s) - 1 or s[i] != 'C':\n ans = 'WA'\nelse:\n cnt += 1\n\nif cnt != 1:\n ans = 'WA'\n\nprint(ans)", "s = str(input())\n\nans = 'AC'\ncnt = 0\n\nif s[0] != 'A':\n ans = 'WA'\n\nfor i in range(1, len(s)):\n if s[i].isupper():\n if i == 1 or i == len(s) - 1 or s[i] != 'C':\n ans = 'WA'\n elif s[i] == 'C':\n cnt += 1\n\nif cnt != 1:\n ans = 'WA'\n\nprint(ans)", "s = str(input())\n\nans = 'AC'\ncnt = 0\n\nif s[0] != 'A':\n ans = 'WA'\n\nfor i in range(1, len(s)):\n if s[i].isupper():\n if i == 1 or i == len(s) - 1 or s[i] != 'C':\n ans = 'WA'\n else:\n cnt += 1\n\nif cnt != 1:\n ans = 'WA'\n\nprint(ans)\n", "s = str(input())\ns1 = ''\n\nif len(s) == 4:\n df = len(s)\nelse:\n df = len(s) - 1\n s1 += s[df:]\n\nflag = False\n\nif s.count('C') == 1:\n for i in range(1, df):\n if s[i] == 'C' and i <= 2:\n flag = True\n else:\n s1 += s[i]\nelse:\n flag = False\n\nif s1.islower() and len(s) <= 1:\n flag = True\nelse:\n flag = False\n\n\nif flag and s[0] == 'A':\n print('AC')\nelse:\n print('WA')\n", "s = str(input())\n\nans = 'AC'\n\nif s[0] != 'A':\n ans = 'WA'\n\nfor i in range(1, len(s)):\n if s[i].isupper():\n if i == 1 or i == len(s) - 1 or s[i] != 'C':\n ans = 'WA'\n\nif s.count('C') != 1:\n ans = 'WA'\n\nprint(ans)"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s203965697', 's256225827', 's264137074', 's397241451', 's572596534', 's687517216', 's872864040', 's890711865', 's945146642', 's333750956'] | [3064.0, 3064.0, 3060.0, 3064.0, 2940.0, 3064.0, 3188.0, 3060.0, 3064.0, 3060.0] | [17.0, 18.0, 17.0, 19.0, 17.0, 17.0, 19.0, 17.0, 18.0, 17.0] | [393, 332, 267, 404, 431, 259, 275, 264, 422, 237] |
p03289 | u672316981 | 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())\ntmp = 0\ncnt = 0\n\nif s[0]=='A':\n tmp += 1\nif s.count('C', 2, len(s))==1:\n tmp += 1\n\n\nif tmp!=2:\n print('WA')\n \nelse:\n list(s).remove('A')\n list(s).remove('C')\n t = s.upper()\n\n for i in range(len(s)):\n if s[i]!=t[i]:\n cnt += 1\n\n if cnt==len(s):\n print('AC')\n else:\n print('WA')", "s = str(input())\ncnt = 0\n\nif s[0]=='A' and s.count('C', 2, -1)==1:\n del list(s)[0]\n del list(s)[s.find('C', 1, -1)]\n t = s.upper()\n \n for i in range(len(s)):\n if s[i]==t[i].lower():\n cnt += 1\n if cnt==len(s):\n print('AC')\n else:\n print('WA')\n\nelse:\n print('WA')", "s = str(input())\ncnt = 0\nlst = []\n\nif s[0]=='A' and s.count('C', 2, -1)==1:\n\n for i in range(1,len(s)):\n if s[i] != s[s.find('C',2, -1)]:\n lst.append(s[i])\n\n t = ''.join(lst)\n\n if t== str(t.upper()).lower():\n print('AC')\n else:\n print('WA')\n\nelse:\n print('WA')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s050415477', 's455302334', 's747540979'] | [3064.0, 3064.0, 3064.0] | [18.0, 17.0, 17.0] | [354, 361, 307] |
p03289 | u673338219 | 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()\ncheck = 0\nif s[0] == "A":\n if s[2:len(s)-1].count("C") == 1:\n if s[1].lower() == s[1] and s[len(s)-1].lower() == s[len(s)-1]:\n s.lstrip("C")\n if s[1:len(s)].lower() == s[1:len(s)]:\n check = 1\n \nif check == 0:\n print("WA")\nelse:\n print("AC")\n \n \n \n ', 's = input()\ncheck = 0\nif s[0] == "A":\n if s[2:len(s)-1].count("C") == 1:\n if s[1].lower() == s[1] and s[len(s)-1].lower() == s[len(s)-1]:\n s.lstrip("C")\n if s[1:len(s)].lower() == s[1:len(s)]:\n check = 1\n \nif check = 0:\n print("WA")\nelse:\n print("AC")\n \n \n \n ', 's = input()\ncheck = 0\nif s[0] == "A":\n if s[2:len(s)-1].count("C") == 1:\n if s[1].lower() == s[1] and s[len(s)-1].lower() == s[len(s)-1]:\n t = s.replace("C","")\n if t[1:len(s)].lower() == t[1:len(s)]:\n check = 1\n \nif check == 0:\n print("WA")\nelse:\n print("AC")\n \n \n \n '] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s476098355', 's665715639', 's482146151'] | [3060.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0] | [304, 303, 312] |
p03289 | u681917640 | 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 is_upper_case(s):\n return not (ord(\'a\') <= ord(s) <= ord(\'z\'))\n\nS = 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\nupper_num = map(is_upper_case, S).count(True)\n\nif upper_num != 2: # expected only \'A\', \'C\'\n print("WA")\n exit()\n\nprint("AC")\n', 'def is_upper_case(s):\n return not (ord(\'a\') <= ord(s) <= ord(\'z\'))\n\nS = 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\nupper_num = list(map(is_upper_case, S)).count(True)\n\nif upper_num != 2: # expected only \'A\', \'C\'\n print("WA")\n exit()\n\nprint("AC")\n'] | ['Runtime Error', 'Accepted'] | ['s569516073', 's942473896'] | [3060.0, 3060.0] | [17.0, 19.0] | [301, 307] |
p03289 | u682997551 | 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\nS = input()\n\nif S[0] == 'A' and S[2:-1].count('C') == 1:\n S.replace('A', 'a', 1).replace('C', 'c', 1)\n if S == S.lower():\n print('AC')\n sys.exit()\n\nprint('WA')", "import sys\n\nS = input()\n\nif S[0] == 'A' and S[2:-1].count('C') == 1:\n s = S.replace('A', 'a', 1).replace('C', 'c', 1)\n if s == S.lower():\n print('AC')\n sys.exit()\n\nprint('WA')"] | ['Wrong Answer', 'Accepted'] | ['s513288455', 's153632874'] | [2940.0, 2940.0] | [18.0, 17.0] | [191, 195] |
p03289 | u685662874 | 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()\njudge='AC'\ncnt = 0\n\nfor i, s in enumerate(S):\n if i == 0:\n if s == 'A':\n continue\n else:\n judge='WA'\n break\n elif i == 2 and i > (len(S) - 2):\n if s == 'C':\n cnt += 1\n continue\n \n if s.isupper():\n judge = 'WA'\n break\n\nif cnt != 1:\n judge = 'WA'\nprint(judge)\n", "S=input()\njudge='AC'\ncnt = 0\n\nfor i in len(S):\n if S[i].isupper():\n if i == 0 or i == len(S) - 2 or S[i] != 'C':\n judge = 'WA'\n cnt+=1\n\nif cnt != 1:\n judge = 'WA'\nprint(judge)\n", "S=input()\njudge='AC'\ncnt = 0\nfor i, s in enumerate(S):\n if i == 0:\n if s != 'A':\n judge = 'WA'\n break\n elif i > 1 and i < len(s) - 2:\n if s == 'C':\n cnt += 1\n continue\n if s.isupper():\n judge = 'WA'\n break\n\nif cnt != 1:\n judge = 'WA'\nprint(judge)\n", 'S=input()\n\njudge = "AC" if (S[0] == \'a\' and S[2:-1].count(\'C\') == 1 and S[1:].replace(\'C\', \'\').islower()) else "WA"\nprint(judge)', "S=input()\njudge='AC'\ncnt = 0\n\nfor i in range(len(S)):\n if S[i].isupper():\n if i == 0 or i == len(S) - 2 or S[i] != 'C':\n judge = 'WA'\n cnt+=1\n\nif cnt != 1:\n judge = 'WA'\nprint(judge)\n", 'S=input()\n\njudge = "AC" if (S[0] == \'A\' and S[2:-1].count(\'C\') == 1 and S[1:].replace(\'C\', \'\').islower()) else "WA"\nprint(judge)'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s068600839', 's365763583', 's493706548', 's618884822', 's762619686', 's907356543'] | [3060.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [373, 207, 331, 128, 214, 128] |
p03289 | u686036872 | 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\nans=re.match("^A[a-z]+C[a-z]$+",input())\nprint("AC" if ans else "WA")', 'S = list(input())\nC = S[2:-1]\nif S[0] == "A" and "C" in C and C.count("C") == 1:\n S.remove("A")\n S.remove("C")\n print(S)\n T="".join(S)\n print(T)\n Y=T.lower()\n if T == Y:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")\n', 'import re\nans=re.match("A[a-z]+C[a-z]+$",input())\nprint("AC" if ans else "WA")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s194622209', 's413398130', 's417237393'] | [3312.0, 3060.0, 3188.0] | [24.0, 17.0, 19.0] | [79, 263, 78] |
p03289 | u690442716 | 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. | [" = list(input())\nL = len(A)\n\nans = 'WA'\nflag = 0\nf = 0\ncount = 0\nif A[0] == 'A':\n flag = flag + 1\n\nfor i in range(2,L-1):\n if A[i] == 'C':\n count = count + 1\n if f == 0:\n j = i\n f = 1\nif count == 1:\n flag = flag + 1\n\ncount = 0\nfor i in range(1,L-1):\n if A[i].islower():\n conut = count + 1\n if i == j:\n count = count - 1\nif count == 0:\n flag = flag + 1\n\nif flag == 3:\n ans = 'AC'\n \nprint(ans)", "A = list(input())\nL = len(A)\n\nans = 'WA'\nflag = 0\nf = 0\ncount = 0\nif A[0] == 'A':\n flag = flag + 1\n\nfor i in range(2,L-1):\n if A[i] == 'C':\n count = count + 1\n if f == 0:\n j = i\n f = 1\nif count == 1:\n flag = flag + 1\n\ncount = 0\nfor i in range(1,L-1):\n if A[i].isupper():\n conut = count + 1\n if i == j:\n count = count - 1\nif count == 0:\n flag = flag + 1\n\nif flag == 3:\n ans = 'AC'\n\nprint(ans)", "A = list(input())\nL = len(A)\n\nans = 'WA'\nflag = 0\nf = 0\nj = 0\n\nif A[0] == 'A':\n if A[0].isupper():\n flag = flag + 1\nprint(flag)\ncount = 0\ni=2\nwhile(1):\n if A[i] == 'C':\n if A[i].isupper():\n count = count + 1\n i = i + 1\n if (L-2-i < 0):\n break\nprint(count)\nif count == 1:\n flag = flag + 1\nprint(flag)\ncount = 0\nfor i in range(1,L-1):\n #print(A[i].isupper())\n if A[i].isupper():\n count = count + 1\n#print(count)\nif count == 1:\n flag = flag + 1\nprint(flag)\nif flag == 3:\n ans = 'AC'\n\nprint(ans)", "A = list(input())\nL = len(A)\n\nans = 'WA'\nflag = 0\nf = 0\nj = 0\n\nif A[0] == 'A':\n if A[0].isupper():\n flag = flag + 1\n#print(flag)\ncount = 0\nfor i in range(2,L-2):\n if A[i] == 'C':\n if A[i].isupper():\n count = count + 1\n \n#print(j)\nif count == 1:\n flag = flag + 1\n#print(flag)\ncount = 0\nfor i in range(1,L-1):\n print(A[i].isupper())\n if A[i].isupper():\n count = count + 1\n#print(count)\nif count == 1:\n flag = flag + 1\n#print(flag)\nif flag == 3:\n ans = 'AC'\n\nprint(ans)", "A = list(input())\nL = len(A)\n\nans = 'WA'\nflag = 0\nf = 0\nj = 0\n\nif A[0] == 'A':\n if A[0].isupper():\n flag = flag + 1\n#print(flag)\ncount = 0\ni=2\nwhile(1):\n if A[i] == 'C':\n if A[i].isupper():\n count = count + 1\n i = i + 1\n if (L-2-i < 0):\n break\n#print(count)\nif count == 1:\n flag = flag + 1\n#print(flag)\ncount = 0\nfor i in range(1,L):\n #print(A[i].isupper())\n if A[i].isupper():\n count = count + 1\nprint(count)\nif count == 1:\n flag = flag + 1\n#print(flag)\nif flag == 3:\n ans = 'AC'\n\nprint(ans)", "A = list(input())\nL = len(A)\n\nans = 'WA'\nflag = 0\nf = 0\nj = 0\n\nif A[0] == 'A':\n if A[0].isupper():\n flag = flag + 1\n#print(flag)\ncount = 0\ni=2\nwhile(1):\n if A[i] == 'C':\n if A[i].isupper():\n count = count + 1\n i = i + 1\n if (L-2-i < 0):\n break\n#print(count)\nif count == 1:\n flag = flag + 1\n#print(flag)\ncount = 0\nfor i in range(1,L):\n #print(A[i].isupper())\n if A[i].isupper():\n count = count + 1\n#print(count)\nif count == 1:\n flag = flag + 1\n#print(flag)\nif flag == 3:\n ans = 'AC'\n\nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s044082801', 's061952626', 's176522504', 's838253685', 's955538123', 's983130206'] | [2940.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [19.0, 17.0, 17.0, 18.0, 17.0, 17.0] | [473, 470, 557, 529, 558, 559] |
p03289 | u691896522 | 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()\ndef end():\n print("WA")\n exit()\nif s[0] != \'A\':\n end()\nflag = False\nfor i in s[3:-1]:\n if i == \'C\':\n if flag:\n end()\n flag = True\nif not flag:\n end()\n\nflag = False\nfor i in range(1,len(s)):\n if s[i].isupper():\n if flag:\n end()\n flag = True\n\nprint("AC")', 's = input()\ndef end():\n print("WA")\n exit()\nif s[0] != \'A\':\n end()\nflag = False\nfor i in s[2:-1]:\n if i == \'C\':\n if flag:\n end()\n flag = True\nif not flag:\n end()\n\nflag = False\nfor i in range(1,len(s)):\n if s[i].isupper():\n if flag:\n end()\n flag = True\n\nprint("AC")'] | ['Wrong Answer', 'Accepted'] | ['s336101568', 's397675826'] | [3064.0, 3064.0] | [17.0, 17.0] | [332, 332] |
p03289 | u692336506 | 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 isAC(S):\n if S[0] != 'A':\n return False\n if S[2:-1].count('C') != 1:\n return False\n S = S.remove('C')\n if not all('a' <= x <= 'z' for x in S):\n return False\n return True\n\nprint('AC' if isAC(input()) else 'WA')", "def isAC(S):\n if S[0] != 'A':\n return False\n if S[2:-1].count('C') != 1:\n return False\n S = S[1:].replace('C', '')\n if not all('a' <= x <= 'z' for x in S):\n return False\n return True\n\nprint('AC' if isAC(input()) else 'WA')"] | ['Runtime Error', 'Accepted'] | ['s407094299', 's847206494'] | [9060.0, 9104.0] | [26.0, 27.0] | [249, 258] |
p03289 | u696444274 | 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()\ncheack1 = False\ncheack2 = False\ncheack3 = False\ncount = 0\n\nif S[0]==\'A\':\n cheack1=True\n S = S.replace("A", "a")\n\nif S[1]=="C" or S[int(len(S))-1]=="C":\n cheack2==False\nelse:\n for i in range(2, int(len(S))-1):\n if S[i]=="C":\n count += 1\n\n if count==1:\n cheack2=True\n S = S.replace("C","c")\n\ncheack3 = S.islower()\n\nprint(str(cheack1)+" "+str(cheack2)+" "+str(cheack3))\nif cheack1 and cheack2 and cheack3:\n print("AC")\nelse:\n print("WA")', 'S = input()\ncheack1 = False\ncheack2 = False\ncheack3 = False\ncount = 0\n\nif S[0]==\'A\':\n cheack1=True\n S = S.replace("A", "a")\n\nif S[1]=="C" or S[int(len(S))-1]=="C":\n cheack2==False\nelse:\n for i in range(2, int(len(S))-1):\n if S[i]=="C":\n count += 1\n\n if count==1:\n cheack2=True\n S = S.replace("C","c")\n\ncheack3 = S.islower()\n\n#print(str(cheack1)+" "+str(cheack2)+" "+str(cheack3))\nif cheack1 and cheack2 and cheack3:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s070608432', 's537646955'] | [3064.0, 3064.0] | [18.0, 17.0] | [499, 500] |
p03289 | u696715721 | 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:-2].count('C')==1:\n if (s[1]+s[2:-2].replace('C', '')+s[-1]).islower()== 'True' :\n print('AC')\nelse:\n print('WA')", "s=input()\nif s[0]=='A':\n if s[2:-2].count('C')==1:\n if (s[1]+s[2:-2].replace('C', '')+s[-1]).islower() :\n \t\tprint('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')\n\n", "s=input()\nif s[0]=='A':\n if s[2:-1].count('C')==1:\n if (s[1]+s[2:-1].replace('C', '')+s[-1]).islower() :\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s101700459', 's984391114', 's789933908'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [155, 198, 228] |
p03289 | u697658632 | 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 f(s):\n u = 0\n for c in s:\n if c.isupper:\n u += 1\n return u == 1\ns = input()\nif s[0] == 'A' and s[2:-1].count('C') == 1 and f(s):\n print('AC')\nelse:\n print('WA')\n", "def f(s):\n u = 0\n for c in s:\n if c.isupper:\n u += 1\n return u == 1\ns = input()\nif s[0] == 'A' and s[2:-1].count('C') == 1 and f(s[1:]):\n print('AC')\nelse:\n print('WA')\n", "def f(s):\n u = 0\n for c in s:\n if c.isupper():\n u += 1\n return u == 1\ns = input()\nif s[0] == 'A' and s[2:-1].count('C') == 1 and f(s[1:]):\n print('AC')\nelse:\n print('WA')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s410628382', 's941982989', 's536186101'] | [2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0] | [178, 182, 184] |
p03289 | u702208001 | 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[3:-2] and s.replace('A', '').replace('C', '').islower() else 'WA')\n", "s = input()\nprint('AC' if s[0] == 'A' and 'C' in s[3:-2] else 'WA')", 's=input()\nprint("AC" if "C" in s[2:-1] and "A" in s and s[1:].replace("C","",1).islower() else "WA")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s035038067', 's372027986', 's911537951'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [118, 67, 100] |
p03289 | u704010888 | 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 and len(S)-2>=S.find('C')>=2:\n\tS=S.replace('A','a',1)\n\tS=S.replace('C','c',1)\n\tif S.islower():\n\t\tprint('Yes')\n\telse:\n\t\tprint('No')\nelse:\n\tprint('No')", "S=input()\nif S.find('A')==0 and S.find('C')>=2:\n S.strip('A')\n S.strip('C')\n if S.islower:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "S=input()\nif S.find('A')==0 and S.find('C')>=2:\n\tS.strip('A')\n\tS.strip('C')\n\tif S.islower:\n\t\tprint('Yes')\n\telse:\n\t\tprint('No')\nelse:\n\tprint('No')", "S=input()\nif S.find('A')==0 and S.find('C')>=2:\n S.strip('A')\n S.strip('C')\n if S.islower:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "S=input()\nif S.find('A')==0 and len(S)-2>=S.find('C')>=2:\n\tS=S.replace('A','a',1)\n\tS=S.replace('C','c',1)\n\tif S.islower():\n\t\tprint('AC')\n\telse:\n\t\tprint('WA')\nelse:\n\tprint('WA')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s315113240', 's430176258', 's804595833', 's994376913', 's055109942'] | [3060.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0, 17.0, 17.0] | [177, 154, 145, 154, 176] |
p03289 | u707659359 | 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\ndef main():\n S = input()\n\n l = len(S)\n\n if S[0] != "A":\n\n print("WA")\n return\n\n i = S.find("C")\n print(i)\n\n if 1<i and i<l-1:\n pass\n else:\n\n print("WA")\n return\n\n sl = list(S)\n sl.pop(i)\n sl.pop(0)\n\n s = "".join(sl)\n\n if s.islower():\n print("AC")\n return\n else:\n\n print("WA")\n return\n\nif __name__ == "__main__":\n main()', '\n\ndef main():\n S = input()\n\n l = len(S)\n\n if S[0] != "A":\n print("WA")\n return\n\n i = S.find("C")\n\n if 1<i and i<l-1:\n pass\n else:\n print("WA")\n return\n\n sl = list(S)\n sl.pop(i)\n sl.pop(0)\n\n s = "".join(sl)\n\n if s.islower():\n print("AC")\n return\n else:\n\n print("WA")\n return\n\nif __name__ == "__main__":\n main()'] | ['Wrong Answer', 'Accepted'] | ['s825288142', 's622980914'] | [3064.0, 3064.0] | [17.0, 17.0] | [426, 411] |
p03289 | u709304134 | 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. | ["#coding:utf-8\ns = input()\n\nif s[0]!='A':\n print ('WA')\n exit()\n\ncnt = 0\nprint (s[2:-1])\nfor char in s[2:-1]:\n if char=='C':\n cnt += 1\nif cnt!=1:\n print ('WA')\n exit()\n\ncnt_upper = 0\nfor char in s:\n cnt_upper += char.isupper()\nif cnt_upper != 2:\n print ('WA')\n exit()\n\nprint ('AC')\n", "#coding:utf-8\ns = input()\n\nif s[0]!='A':\n print ('WA')\n exit()\n\ncnt = 0\nfor char in s[2:-1]:\n if char=='C':\n cnt += 1\nif cnt!=1:\n print ('WA')\n exit()\n\ncnt_upper = 0\nfor char in s:\n cnt_upper += char.isupper()\nif cnt_upper != 2:\n print ('WA')\n exit()\n\nprint ('AC')\n"] | ['Wrong Answer', 'Accepted'] | ['s000866665', 's391018079'] | [3060.0, 3060.0] | [20.0, 17.0] | [312, 296] |
p03289 | u717993780 | 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("No")\n exit()\nif s.find("C") < 2 or s.find("C") == len(s)-1:\n print("No")\n exit()\nif s.count("C") != 1:\n print("No")\n exit()\ns = s.replace("A","",1)\ns = s.replace("C","")\nif s != s.lower():\n print("No")\n exit()\nprint("Yes")', 's = input()\nif s[0] != "A":\n print("WA")\n exit()\nif s.find("C") < 2 or s.find("C") == len(s)-1:\n print("WA")\n exit()\nif s.count("C") != 1:\n print("WA")\n exit()\ns = s.replace("A","",1)\ns = s.replace("C","")\nif s != s.lower():\n print("WA")\n exit()\nprint("AC")'] | ['Wrong Answer', 'Accepted'] | ['s867906518', 's056591387'] | [3064.0, 3064.0] | [20.0, 17.0] | [267, 266] |
p03289 | u726615467 | 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. | ['# encoding: utf-8\nS = input()\nabc = "abcdefghijklmnopqrstuvwxyz"\n\nstate = ""\n\nfor i, char in enumerate(S):\n \n if state == "" and char != "A": state = "WA"\n elif state == "A" and char == "C" and i < 2: state = "WA"\n elif state == "C" and char == "C": state = "WA"\n # main path\n elif state == "" and char == "A": state = "A"\n elif state == "A" and char == "C" and i > 1: state = "C"\n elif state == "C" and char in abc: state = "AC"\n \n if state in ("WA",):\n print(state)\n break\n else: continue\n \nelse:\n print("WA")\n', '# encoding: utf-8\nS = input()\n\nstate = ""\n\nfor i, char in enumerate(S):\n print(char,state)\n \n if state == "":\n if char == "A": state = "A"\n else: state = "WA"\n elif state == "A":\n if char == "C" and i < 2: state = "WA"\n elif char == "C": state = "C"\n elif char.isupper(): state = "WA"\n else: continue\n elif state == "C":\n if char == "C": state = "WA"\n elif char.isupper(): state = "WA"\n else: state = "AC"\n else: # AC\n if char.isupper(): state = "WA"\n \nelse:\n if state == "AC": print("AC")\n else: print("WA")\n', '# encoding: utf-8\nS = input()\n\nstate = ""\n\nfor i, char in enumerate(S):\n # print(char,state)\n \n if state == "":\n if char == "A": state = "A"\n else: state = "WA"\n elif state == "A":\n if char == "C" and i < 2: state = "WA"\n elif char == "C": state = "C"\n elif char.isupper(): state = "WA"\n else: continue\n elif state == "C":\n if char == "C": state = "WA"\n elif char.isupper(): state = "WA"\n else: state = "AC"\n else: # AC\n if char.isupper(): state = "WA"\n \nelse:\n if state == "AC": print("AC")\n else: print("WA")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s374670368', 's404555645', 's968713428'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0] | [585, 618, 620] |
p03289 | u735008991 | 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 S[3:-2].count("C") ==\n 1 and S[1:].replace("C", "", 1).islower() else "WA")\n', 'S = input()\nprint("AC" if S[0] == "A" and S[2:-1].count("C") ==\n 1 and S[1:].replace("C", "", 1).islower() else "WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s023484255', 's935449816'] | [2940.0, 2940.0] | [17.0, 17.0] | [123, 123] |
p03289 | u740767776 | 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()\nc = s[3:-1]\n\ncheck = True\ncount = 0\ncountUpper = 0\n\nif s[0] != "A":\n check = False\nfor i in c:\n if i == "C":\n count += 1\nif count != 1:\n check =False\nfor i in s:\n if i.isupper():\n countUpper += 1\n if countUpper != 2:\n check = False\n\nif check:\n print("AC")\nelse:\n print("WA")', 's = input()\nf = False\nC = 0\nUpper = 0\nfor i in range(len(s)):\n if s[0] != "A":\n break\n if s[i].isupper():\n Upper += 1\n if 2 <=i and i<=len(s)-2:\n if s[i] == "C":\n C += 1\nif Upper == 2 and C == 1:\n f = True\nif f:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s815980284', 's752387455'] | [3064.0, 3064.0] | [17.0, 17.0] | [328, 293] |
p03289 | u743272507 | 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\nflag = flag and s[0] == \'A\'\nCcount = 0\nfor i in range(1,len(s)):\n if ord(\'a\') <= ord(s[i]) and ord(s[i]) <= \'z\': continue\n if s[i] == \'C\' and 2 <= i and i <= len(s)-2:\n Ccount += 1\n else:\n flag = False\nprint("AC" if flag and Ccount == 1 else "WA")', 's = input()\nflag = True\nflag = flag and s[0] == \'A\'\nCcount = 0\nfor i in range(1,len(s)):\n if ord(\'a\') <= ord(s[i]) and ord(s[i]) <= ord(\'z\'): continue\n if s[i] == \'C\' and 2 <= i and i <= len(s)-2:\n Ccount += 1\n else:\n flag = False\nprint("AC" if flag and Ccount == 1 else "WA")\n'] | ['Runtime Error', 'Accepted'] | ['s713975666', 's982372334'] | [3188.0, 3060.0] | [19.0, 18.0] | [280, 286] |
p03289 | u746849814 | 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()\ncnt = S[2:-1].count('C')\n\nif s in S[1:]:\n if s.isupper() and s != 'C':\n print('WA')\n break\nelse:\n if S[0] == 'A' and cnt == 1:\n print('AC')\n else:\n print('WA')", "S = input()\ncnt = S[2:-1].count('C')\n \nfor s in S[1:]:\n if s.isupper() and s != 'C':\n print('WA')\n break\nelse:\n if S[0] == 'A' and cnt == 1:\n print('AC')\n else:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s407862807', 's839127075'] | [2940.0, 3060.0] | [17.0, 17.0] | [208, 210] |
p03289 | u747602774 | 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())\nprint(S)\nsmall = [chr(i) for i in range(97,97+26)]\nprint(small)\ncount = 0\nans = 'AC'\nfor i in range(len(S)):\n if i == 0:\n if S[i] != 'A':\n ans = 'WA'\n break\n elif i == 1:\n if S[i] not in small:\n ans = 'WA'\n break\n elif i != len(S)-1:\n if S[i] == 'C':\n count += 1\n elif S[i] not in small:\n ans = 'WA'\n break\n else:\n if S[i] not in small:\n ans = 'WA'\nif ans == 'AC' and count != 1:\n ans = 'WA'\nprint(ans)\n", "S = list(input())\nsmall = [chr(i) for i in range(97,97+26)]\ncount = 0\nans = 'AC'\nfor i in range(len(S)):\n if i == 0:\n if S[i] != 'A':\n ans = 'WA'\n break\n elif i == 1:\n if S[i] not in small:\n ans = 'WA'\n break\n elif i != len(S)-1:\n if S[i] == 'C':\n count += 1\n elif S[i] not in small:\n ans = 'WA'\n break\n else:\n if S[i] not in small:\n ans = 'WA'\nif ans == 'AC' and count != 1:\n ans = 'WA'\nprint(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s000898444', 's181556925'] | [3188.0, 3064.0] | [20.0, 17.0] | [559, 537] |
p03289 | u752898745 | 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 s[2]=='C' and str.islower(s[1]+s[3:]) else 'No')", "s=input()\nl=[]\nL=[s[0]]\nfor i in range(2,len(s)-1):\n if s[i]=='C':\n L.append(s[i])\n else:\n l.append(s[i])\nkomoji=''.join(l)\nkomoji+=(s[1]+s[len(s)-1])\n\nprint('AC' if L==['A','C'] and str.islower(komoji) else 'WA')"] | ['Wrong Answer', 'Accepted'] | ['s310995460', 's011992457'] | [2940.0, 3064.0] | [17.0, 17.0] | [87, 233] |
p03289 | u756158920 | 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. | ["# -*- coding: utf-8 -*- \ns = str(input())\nj1 = (s[0]=='A')\nj2 = ('c' in s[2:len(s)-1])\nj3 = (s[1:].islower())\n\nif j1 is j2 is j3 is True:\n print ('AC')\nelse:\n print ('WA')\n", "# -*- coding: utf-8 -*- \ns = str(input())\nj1 = (s[0]=='A')\nj2 = False\nj3 = False\n\nif 1 == s[2:len(s)-1].count('C'):\n j2 = True\n idx = s[2:len(s)-1].index('C')\n j3 = (s[1:2+idx].islower() and s[2+idx+1:].islower())\n\nif j1 is j2 is j3 is True:\n print ('AC')\nelse:\n print ('WA')\n"] | ['Wrong Answer', 'Accepted'] | ['s658513370', 's874367586'] | [2940.0, 3060.0] | [17.0, 19.0] | [339, 452] |
p03289 | u757030836 | 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\n\nans = 0\nnum = 0\ncnum = 0\nif S[0] == "A":\n ans += 1\n\nfor i in range(2,len(S)-1):\n if S[i] == "C":\n cnum += 1\n \nif cnum == 1:\n ans +=1\n\nfor j in range(len(S)):\n if j.islower() == True:\n num += 1\n\n \nif num == len(S)-2:\n ans +=1\n \n \n \n\nif ans ==3:\n print("AC")\nelse:\n print("WA")', 'import re\nprint("AC" if re.match("^A[a-z]+C[a-z]+$",input()) else "WA")'] | ['Runtime Error', 'Accepted'] | ['s140766093', 's803626095'] | [3064.0, 3188.0] | [17.0, 20.0] | [311, 71] |
p03289 | u757274384 | 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" or (s[2] != "C" and s[-1] != "C"):\n print("WA")\nelif s[0] == "A" and s[2] == "C":\n s = list(s)\n s.pop(0)\n s.pop(1)\n for i in s:\n if s[i] != s[i].lower():\n print("WA")\n exit()\nelif s[0] == "A" and s[-1] == "C":\n s = list(s)\n s.pop(0)\n s.pop(-1)\n for i in s:\n if s[i] != s[i].lower():\n print("WA")\n exit()\n \nprint("AC")\n', 's = input()\nn = len(s)\nif s[0] == "A" and s[2:n-1].count("C") == 1 and len(set(s.upper()) & set(s)) == 2:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s300118014', 's026397627'] | [3064.0, 2940.0] | [17.0, 17.0] | [386, 139] |
p03289 | u759360502 | 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\nN = list(input())\nkomoji = 0\noomoji = 0\nif N[0] == \'A\':\n if N[1].islower():\n for i in range(2, len(N)-1):\n if N[i] == \'C\':\n oomoji += 1\n if N[i].islower():\n komoji += 1\nif oomoji == 1 and komoji == len(N) - 3:\n print("AC")\nelse:\n print("WA")', 'import sys\nN = list(input())\nkomoji = 0\noomoji = 0\nif N[0] == \'A\':\n if N[1].islower():\n for i in range(2, len(N)-1):\n if N[i] == \'C\':\n oomoji += 1\n if N[i].islower():\n komoji += 1\n if N[-1].islower():\n komoji += 1\nif oomoji == 1 and komoji == len(N) - 3:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s247131997', 's196719234'] | [3060.0, 3064.0] | [17.0, 25.0] | [320, 372] |
p03289 | u759412327 | 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()\nalphabets = set(chr(ord(\'a\')+x) for x in range(26))\n\nf1 = (S[0]=="A")\nf2 = (S[2:-1].count("C")==1)\nf3 = (set(S)-set("AC")<=alphabets)\n\nanswer = \'AC\' if bl1 and bl2 and bl3 else \'WA\'\nprint(answer)\n', 'S = input()\n\nif S[0]=="A" and S[2:-1].count("C")==1 and S[1:].replace("C","c").islower():\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s280756878', 's111904459'] | [3060.0, 9000.0] | [17.0, 29.0] | [208, 123] |
p03289 | u761989513 | 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_2 = s[2:-1]\ns_3 = s[:2] + s_2.replace("C", "") + s[-1]\ns_3 = s_3.replace("A", "", 1)\nprint(s_3)\nif s[0] == "A" and s_2.count("C") == 1 and s_3.islower():\n print("AC")\nelse:\n print("WA")', 's = input()\ns_2 = s[2:-1]\ns_3 = s[:2] + s_2.replace("C", "") + s[-1]\ns_3 = s_3.replace("A", "", 1)\nprint(s_3)\nif s[0] == "A" and s_2.count("C") == 1 and s_3.islower():\n print("AC")\nelse:\n print("WA")', 's = input()\ns_2 = s[2:-1]\ns_3 = s[:2] + s_2.replace("C", "") + s[-1]\ns_3 = s_3.replace("A", "", 1)\nif s[0] == "A" and s_2.count("C") == 1 and s_3.islower():\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s355498434', 's994909547', 's008495107'] | [3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [201, 201, 191] |
p03289 | u763177133 | 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\nwa = False\n\nif s[0] != 'A':\n wa = True\nprint(s[2:-1])\nif s[2:-1].count('C') != 1:\n wa = True\n\nl_s = list(s)\n \ndel l_s[l_s.index('A')]\n\nif 'C' in l_s:\n\tdel l_s[l_s.index('C')]\n\nfor c in l_s:\n print(c.lower())\n if c != c.lower():\n wa = True\n \nif wa == True:\n print('WA')\nelse:\n print('AC')", "s = input()\n\nwa = False\n\nif s[0] != 'A':\n wa = True\nif s[2:-1].count('C') != 1:\n wa = True\n\nl_s = list(s)\n \nif 'A' in l_s:\n\tdel l_s[l_s.index('A')]\n\nif 'C' in l_s:\n\tdel l_s[l_s.index('C')]\n\nfor c in l_s:\n if c != c.lower():\n wa = True\n \nif wa == True:\n print('WA')\nelse:\n print('AC')"] | ['Runtime Error', 'Accepted'] | ['s331995457', 's731604427'] | [9140.0, 9032.0] | [30.0, 30.0] | [313, 295] |
p03289 | u767438459 | 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:-1] and len(re.findall(\'[A-Z]\', s))==2:\n print("AC")\nelse:\n print("WA")', 'import re\ns=input()\nif s[0]=="A" and "C" in s[2:-1] and len(re.findall(\'[A-Z]\', s))==2:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s642902362', 's511881188'] | [9036.0, 9764.0] | [26.0, 34.0] | [115, 125] |
p03289 | u769698512 | 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" and "C" in s[2:-1]:\n try:\n ss = s[2:-2]\n ss.remove("C")\n ss += s[-1]\n if \'\'.join(ss).islower():\n print("AC")\n else:\n print("WA")\n except:\n print("WA")\nelse:\n print("WA")\n', 's = input()\n\nif len(s) >= 4 and len(s) <= 10 and s[0]=="A" and s[2:-1].count("C")==1:\n try:\n ss = list(s[2:-1])\n ss.remove("C")\n ss = s[1] + ss + s[-1]\n if \'\'.join(ss).islower():\n print("AC")\n else:\n print("WA")\n except:\n print("WA")\nelse:\n print("WA")\n', 's = input()\n\nif len(s) >= 4 and len(s) <= 10 and s[0]=="A" and s[2:-1].count("C")==1:\n try:\n ss = list(s[2:-1])\n ss.remove("C")\n ss += s[-1]\n if s[1].islower() and \'\'.join(ss).islower():\n print("AC")\n else:\n print("WA")\n except:\n print("WA")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s677031637', 's841440993', 's098652452'] | [2940.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0] | [269, 326, 334] |
p03289 | u771532493 | 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=False\nS=input()\nif S[0]=='A':\n for i in range(1,len(S)-1):\n if i=='C':\n A=True\n break\n else:\n A=False\n if A is True:\n if S.iflower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')", "S=input()\nA=0\nif S[0]=='A':\n for i in range(2,len(S)-1):\n if S[i]=='C':\n A+=1\n B=i\n if A==1:\n S=S[1:B]+S[B+1:]\n if S.islower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')"] | ['Wrong Answer', 'Accepted'] | ['s563137311', 's562238129'] | [3060.0, 3060.0] | [18.0, 18.0] | [251, 238] |
p03289 | u777028980 | 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. | ['hoge=input()\nno=0\nif(hoge[0]=="A"):\n hoge.strip("A")\nelse:\n no=1\n\nif(hoge[0].islower()):\n hoge.strip(hoge[0])\nelse:\n no=1\n\nif(hoge[0]=="C"):\n hoge.strip("C")\nelse:\n no=1\n \nif(hoge.islower()==false):\n no=1\n \nif(no==0):\n print("AC")\nelse:\n print("WA")', '#ABC097B\nhoge=input()\nno=0\n\nif(hoge[0]=="A"):\n hoge=hoge.replace("A","a",1)\nelse:\n no=1\n \nif not(hoge[1].islower() and hoge[-1].islower()):\n no=1\n\nif(hoge.count("C")==1):\n hoge=hoge.replace("C","c",1)\nelse:\n no=1\n \nif(hoge.islower() and no==0):\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s721559162', 's756088695'] | [3064.0, 3060.0] | [19.0, 17.0] | [260, 303] |
p03289 | u780698286 | 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()\nif s[0] == "A" and s[2:-1].count("C") == 1:\n x = list(s)\n cnt = 0\n for i in range(len(x)):\n if x[i].isupper:\n cnt += 1\n if cnt == 2:\n print("AC")\n sys.exit()\nprint("WA")', 'import sys\ns = list(input())\nif s[0] == "A" and s[2:-1].count("C") == 1:\n cnt = 0\n for i in s:\n if s.isupper():\n cnt += 1\n if cnt == 2:\n print("AC")\n sys.exit()\nprint("WA")', "S = input()\nFlag = False\nif (S[0]=='A') and S[2:len(S)-1].count('C')==1:\n ReS = S.replace('C','')[1:]\n if ReS.islower():\n Flag = True\nif Flag:\n print('AC')\nelse:\n print('WA')\n"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s235098889', 's266588679', 's386329065'] | [9064.0, 9016.0, 9108.0] | [29.0, 27.0, 28.0] | [210, 189, 194] |
p03289 | u782098901 | 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\ncount = 0\ntf = True\nif S[0] != "A" or S[1] == "C" or S[-1] == "C":\n tf = False\n\nfor i in range(len(S)):\n\tif tf:\n\t\tbreak\n if i == 0:\n continue\n if S[i] == "C":\n count += 1\n elif not S[i].islower():\n tf = False\n\nif tf and count == 1:\n print("AC")\nelse:\n print("WA")\n', 'S = input()\n\ncount = 0\ntf = True\nif S[0] != "A" or S[1] == "C" or S[-1] == "C":\n tf = False\n\nfor i in range(len(S)):\n if tf:\n break\n if i == 0:\n continue\n if S[i] == "C":\n count += 1\n elif not S[i].islower():\n tf = False\n\nif tf and count == 1:\n print("AC")\nelse:\n print("WA")\n', 'S = input()\n\ncount = 0\ntf = True\nif S[0] != "A" or S[1] == "C" or S[-1] == "C":\n tf = False\n\nfor i in range(1, len(S)):\n if tf:\n break\n if i == 0:\n continue\n if S[i] == "C":\n count += 1\n elif not S[i].islower():\n tf = False\n\nif tf and count == 1:\n print("AC")\nelse:\n print("WA")\n', 'S = input()\n\ncount = 0\nans = True\n\nif S[0] != "A":\n ans = False\nif not "C" in S[2:-1]:\n ans = False\nfor s in S:\n if s.isupper():\n count += 1\nif count > 2:\n ans = False\n\nprint("AC" if ans else "WA")\n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s118369454', 's506981882', 's567379476', 's355719823'] | [3064.0, 3060.0, 3060.0, 2940.0] | [19.0, 17.0, 17.0, 17.0] | [316, 325, 328, 217] |
p03289 | u785578220 | 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. | ['#B AcCepted\nb = input()\na = list(b)\nc=z = len(b)\nd =""\nif a[0] == "A":\n a[0] = "a"\n c = 10000\nfor i in range(2,c):\n if a[i] == "C":\n a[i]="c"\n c+=1\nfor i in a:\n d+=i\nif d.islower() and c == 10001:\n print("AC")\nelse:\n print("WA")\n \n ', '#B AcCepted\nb = input()\na = list(b)\nc=z = len(b)\nd =""\nif a[0] == "A":\n a[0] = "a"\n c = 10000\nfor i in range(2,z-1):\n if a[i] == "C":\n a[i]="c"\n c+=1\nfor i in a:\n d+=i\nif d.islower() and c == 10001:\n print("AC")\nelse:\n print("WA")\n \n '] | ['Runtime Error', 'Accepted'] | ['s874293407', 's195466787'] | [3064.0, 3064.0] | [17.0, 17.0] | [270, 272] |
p03289 | u795844873 | 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\nnoAC = s.replace('A', '').replace('C', '')\ncontent = s[2:len(s)-1]\n\nif s[0] != 'A' or (not('C' in content)) or (not noAC.islower()):\n print('WA')\nelse:\n print('SC')\n", "s = input()\n\nnoAC = s.replace('A', '').replace('C', '', 1)\ncontent = s[2:len(s)-1]\n\nif s[0] != 'A' or (not('C' in content)) or (not noAC.islower()):\n print('WA')\nelse:\n print('AC')\n"] | ['Wrong Answer', 'Accepted'] | ['s817691159', 's565809276'] | [2940.0, 2940.0] | [17.0, 17.0] | [180, 183] |
p03289 | u802563409 | 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\nimport re\n\n\ncnt = 1\ninput_arr = []\nfor l in sys.stdin:\n input_arr.append(l.split("\\n")[0])\n if len(input_arr) == cnt:\n break\nS = input_arr[0]\nprint(S[1]+S[-1]+S[2:-1].replace("C","",1))\nif 4 <= len(S) <= 10 and\\\n len(re.sub("[a-z|A-Z]+", "", S)) == 0 and\\\n S[0] == "A" and\\\n S[2:-1].count("C") == 1 and\\\n len(re.sub(r\'[a-z]+\', \'\', S[1]+S[-1]+S[2:-1].replace("C","",1))) == 0:\n print("AC")\nelse:\n print("WA")', 'import sys\nimport re\n\n\ncnt = 1\ninput_arr = []\nfor l in sys.stdin:\n input_arr.append(l.split("\\n")[0])\n if len(input_arr) == cnt:\n break\nS = input_arr[0]\nif S[0] == "A" and len(re.sub(r\'[a-z]+\', \'\', S[1]+S[-0]+S[2:-1].replace("C","",1))) == 0:\n print("AC")\nelse:\n print("WA")', 'import sys\nimport re\n\n\ncnt = 1\ninput_arr = []\nfor l in sys.stdin:\n input_arr.append(l.split("\\n")[0])\n if len(input_arr) == cnt:\n break\nS = input_arr[0]\nif len(re.sub(r\'A[a-z]+C[a-z]+\', \'\', S)) == 0:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s113085849', 's881021071', 's105635004'] | [3188.0, 3188.0, 3188.0] | [19.0, 19.0, 19.0] | [459, 287, 244] |
p03289 | u802977614 | 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()\ns=s[1:]\ncount_C=0\nfor i in range(len(s)):\n if s[i]=="C":\n count_C+=1\nif count_C!=1:\n print("WA")\n exit()\ns.replace("C","")\nif not s.islower():\n print("WA")\n exit()\nprint("AC")', 's=input()\nif s[0]!="A":\n print("WA")\n exit()\ns=s[1:]\ncount_C=0\nfor i in range(len(s)-2):\n if s[i+1]=="C":\n count_C+=1\nif count_C!=1:\n print("WA")\n exit()\ns=s.replace("C","")\nif not s.islower():\n print("WA")\n exit()\nprint("AC")'] | ['Wrong Answer', 'Accepted'] | ['s602288768', 's208755886'] | [3064.0, 3064.0] | [17.0, 17.0] | [230, 236] |
p03289 | u803617136 | 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 string import ascii_lowercase\n\ns = list(input())\nans = 'AC'\n\ncnt = 0\nfor i, c in enumerate(s):\n if i == 0 and c != 'A':\n ans = 'WA'\n break\n if not c in ascii_lowercase:\n if i >= 2 and i <= len(s) - 2:\n if c == 'C':\n cnt += 1\n if cnt > 1:\n ans = 'WA'\n break\n else:\n ans = 'WA'\n \nprint(ans)", "from string import ascii_lowercase\n\ns = list(input())\nans = 'AC'\n\nif s[0] != 'A':\n ans = 'WA'\n\nif s[2:-1].count('C') != 1:\n ans = 'WA'\n\nif not s[1] in ascii_lowercase:\n ans = 'WA'\n\nif not s[-1] in ascii_lowercase:\n ans = 'WA'\n\nfor c in s[2:-1]:\n if c == 'C':\n continue\n if not c in ascii_lowercase:\n ans = 'WA'\n \nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s613778363', 's495155412'] | [3768.0, 3772.0] | [24.0, 29.0] | [424, 362] |
p03289 | u806855121 | 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\ncountA = 0\ncountC = 0\nfor i in range(len(S)):\n if i == 0:\n if S[i] != 'A':\n print('WA')\n quit()\n else:\n continue\n if S[i] == 'A':\n countA += 1\n elif S[i] == 'C':\n if i < 2 or i == len(S)-1:\n print('WA')\n quit()\n countC += 1\n elif not S[i].islower():\n print('WA')\n quit()\n if countA > 1 or countC > 1:\n print('WA')\n quit()\n\nif countA != 1 or countC != 1:\n print('WA')\n quit()\nprint('AC')", "S = input()\n\ncountA = 0\ncountC = 0\nfor i in range(len(S)):\n if i == 0:\n if S[i] != 'A':\n print('WA')\n quit()\n else:\n countA += 1\n continue\n if S[i] == 'C':\n if i < 2 or i == len(S)-1:\n print('WA')\n quit()\n countC += 1\n elif not S[i].islower():\n print('WA')\n quit()\n if countA > 1 or countC > 1:\n print('WA')\n quit()\n\nif countA != 1 or countC != 1:\n print('WA')\n quit()\nprint('AC')"] | ['Wrong Answer', 'Accepted'] | ['s593999843', 's898026069'] | [3064.0, 3064.0] | [18.0, 17.0] | [538, 520] |
p03289 | u807772568 | 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 = list(input())\nk = 0\nfor i in range(len(a)):\n\tif i == 0 and a[i] != "A":\n\t\tk = 1\n\t\tbreak\n\telif i >= 2 and i <= len(a)-2:\n\t\tif a[i] == "C":\n\t\t\tk += 2\n\t\telif a[i] > z or a[i] < a:\n\t\t\tk = 1\n\t\t\tbreak\n\telse:\n\t\tif a[i] > "z" or a[i] < "a":\n\t\t\tk = 1\n\t\t\tbreak\nif k == 2:\n\tprint("AC")\nelse:\n\tprint("WA")\n\n', 'a = list(input())\nk = 0\nfor i in range(len(a)):\n\tif i == 0 and a[i] != "A":\n\t\tk = 1\n\t\tbreak\n\telif i == 0:\n\t\tk = k\n\telif i >= 2 and i <= len(a)-2:\n\t\tif a[i] == "C":\n\t\t\tk += 2\n\t\telif a[i] <= "z" and a[i] >= "a":\n\t\t\tk = k\n\t\telse:\n\t\t\tk = 1\n\t\t\tbreak\n\telse:\n\t\tif a[i] <= "z" and a[i] >= "a":\n\t\t\tk = k\n\t\telse:\n\t\t\tk = 1\n\t\t\tbreak\nif k == 2:\n\tprint("AC")\nelse:\n\tprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s581415147', 's979126794'] | [3060.0, 3064.0] | [17.0, 17.0] | [299, 364] |
p03289 | u809819902 | 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()\nres="AC"\nif s[0]=="A":res="WA"\nelif s[2:-2].count("C")!=1:res="WA"\nelse:\n li=list(s)\n li.remove("A")\n li.remove("C")\n for i in li:\n if i!=i.lower():\n res="WA"\nprint(res)', 's=input()\nres="AC"\nif s[0]=="A":res="WA"\nelif s[2:-2].count("C")!=1:res="WA"\nelif "A" in s and "C" in s[2:-2]:\n li=list(s)\n li.remove("A")\n li.remove("C")\n for i in li:\n if i!=i.lower():\n res="WA"\nprint(res)', 's=input()\nres="AC"\nif s[0]!="A":res="WA"\nelif s[2:-1].count("C")!=1:res="WA"\nelse:\n li=list(s)\n li.remove("A")\n li.remove("C")\n for i in li:\n if i!=i.lower():\n res="WA"\nprint(res)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s570365401', 's602003456', 's562244661'] | [9104.0, 9128.0, 9100.0] | [30.0, 30.0, 31.0] | [209, 237, 209] |
p03289 | u810735437 | 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, B = map(int, input().split())\nN = int(input())\nS = input()\n\nif S[0] == \'A\' and (S[:3] + S[-2:]).count(\'C\') == 1:\n a = 0\n c = 0\n ng = 0\n for ch in S:\n if ch == \'A\':\n a += 1\n elif ch == \'C\':\n c += 1\n elif not ch.islower():\n ng += 1\n if a == 1 and c == 1 and ng == 0:\n print("AC")\n sys.exit(0)\nprint("WA")', '#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport array\nfrom bisect import *\nfrom collections import *\nimport fractions\nimport heapq \nfrom itertools import *\nimport math\nimport random\nimport re\nimport string\nimport sys\n\nS = input()\n\nif S[0] == \'A\' and S[2:-1].count(\'C\') == 1:\n S2 = S.replace(\'A\', \'\').replace(\'C\', \'\')\n if len(S2) == len(S) - 2 and S2.islower():\n print("AC")\n sys.exit(0)\nprint("WA")'] | ['Runtime Error', 'Accepted'] | ['s721492465', 's272446592'] | [3064.0, 7976.0] | [18.0, 395.0] | [388, 425] |
p03289 | u811000506 | 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 = False\ncount = 0\ntmp_str = ""\nif S.count("C") == 1 and S[0] == "A":\n flag = True\n for i in range(1,len(S),1):\n if S[i] == "C":\n count = i\n else:\n tmp_str += S[i]\n\nif (flag == True) and (count > 1) and (count < len(S)-1):\n print("Yes")\nelse:\n print("WA")', 'S = str(input())\nflag = False\ncount = 0\ntmp_str = ""\nif S.count("C") == 1 and S[0] == "A":\n flag = True\n for i in range(1,len(S),1):\n if S[i] == "C":\n count = i\n else:\n tmp_str += S[i]\n\nif (flag == True) and (count > 1) and (count < len(S)-1) and (tmp_str.islower() == True):\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s334587829', 's916087555'] | [3064.0, 3064.0] | [17.0, 18.0] | [296, 327] |
p03289 | u820351940 | 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()\nci = s.index("C")\nif s.index("A") == 0 and 2 <= ci < len(s) - 2:\n tmp = list(s)\n del tmp[0]\n del tmp[ci]\n if re.match("^[a-z]*$", "".join(tmp)):\n print("AC")\n exit()\nprint("WA")', 'import re\ns = input()\nprint("AC" if re.match(s, "A.C.*") else "WA")', 'import re\ns = input()\nprint("AC" if re.match("$A[a-z]C[a-z]*^", s) else "WA")', 'import re\ns = input()\nci = s.find("C")\nif s.find("A") == 0 and 2 <= ci <= len(s) - 2:\n tmp = list(s)\n del tmp[0]\n del tmp[ci - 1]\n if re.match("^[a-z]*$", "".join(tmp)):\n print("AC")\n exit()\nprint("WA")'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s146791271', 's394361744', 's805764732', 's842478513'] | [3188.0, 3188.0, 3188.0, 3188.0] | [22.0, 19.0, 21.0, 34.0] | [209, 67, 77, 212] |
p03289 | u821271186 | 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= [str(c) for c in S]\nprint(t)\nflag=0\n\nif t[0]!="A":\n flag=1\nb=0\ni=0\n\nfor i in range(2,len(t)-2):\n if t[i]=="C":\n b += 1\nif b!=1:\n flag=1\n\ni=0\nfor i in range(len(t)):\n if t[i]=="A" or t[i]=="C" :\n continue\n elif ord(t[i])>90:\n continue\n else:\n flag=1\n break\n\nif flag==0:\n print("AC")\nelse:\n print("WA")', 'S=input()\nt= [str(c) for c in S]\nflag=0\n\nif t[0]!="A":\n flag=1\nb=0\ni=0\n\nfor i in range(2,len(t)-1):\n if t[i]=="C":\n b += 1\nif b!=1:\n flag=1\n\ni=0\nfor i in range(len(t)):\n if t[i]=="A" or t[i]=="C" :\n continue\n elif ord(t[i])>90:\n continue\n else:\n flag=1\n break\n\nif flag==0:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s434793265', 's816349015'] | [3064.0, 3064.0] | [17.0, 17.0] | [631, 622] |
p03289 | u834415466 | 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 s[1].isupper():\n print('WA')\nelif s[-1].isupper():\n print('WA')\nelse:\n C=0\n s=s[2:-1]\n for c in s:\n if c=='C':\n C+=1\n if not C>1:\n print('WA')\n break\n if C==1:\n print('AC')\n else:\n print('WA')", "s=input()\nif s[0]!='A':\n print('WA')\nelif s[1].isupper():\n print('WA')\nelif s[-1].isupper():\n print('WA')\nelse:\n C=0\n s=s[2:-1]\n for c in s:\n if c=='C':\n C+=1\n if not C>1:\n print('WA')\n break\n if C==1:\n print('AC')\n elif C==0:\n print('WA')", "s=input()\nif s[0]!='A':\n print('WA')\nelif s[1].isupper():\n print('WA')\nelif s[-1].isupper():\n print('WA')\nelse:\n C=0\n s=s[2:-1]\n for c in s:\n if c=='C':\n C+=1\n if C>1:\n print('WA')\n break\n if C==1:\n print('AC')\n elif C==0:\n print('WA')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s070046437', 's127325803', 's591901101'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [331, 336, 334] |
p03289 | u835482198 | 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\ns = input()\nif s[0] == \'A\':\n if \'C\' in s[2:-1]:\n index = s[2:-1].index(\'C\')\n news = s[1:index] + s[index+1:]\n if news == news.lower():\n print(\'AC\')\n sys.exit()\nprint("WA")\n', 'import sys\n\ns = input()\nif s[0] == \'A\':\n if \'C\' in s[2:-1]:\n index = s[2:-1].index(\'C\') + 2\n news = s[1:index] + s[index+1:]\n if news == news.lower():\n print(\'AC\')\n sys.exit()\nprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s813635029', 's439841531'] | [2940.0, 2940.0] | [17.0, 17.0] | [230, 234] |
p03289 | u838350081 | 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\n\ndef lower_checker(ss):\n flag = True\n for k in ss:\n if k != \'A\' or k != \'C\':\n flag = flag and k.islower()\n return flag\n\nflag = True\nif s[0] != \'A\':\n flag = False\nif flag is False or \'C\' not in s[3:-2]:\n flag = False\nif flag is False or not lower_checker(s):\n flag = False\n\nif flag:\n print("AC")\nelse:\n print("WA")', 's = input()\n\n\ndef lower_checker(ss):\n\n for k in ss:\n if k != \'A\' and k != \'C\' and k.islower() is False:\n return False\n return True\n\ndef C_counter(ss):\n cnt = 0\n for k in ss:\n if k == \'C\':\n cnt += 1\n if cnt == 1:\n return True\n else:\n return False\n\nflag = True\nif s[0] != \'A\':\n flag = False\nif flag is False or C_counter(s[2:-1]) is False:\n flag = False\nif flag is False or lower_checker(s) is False:\n flag = False\n\nif flag:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s691225477', 's038522490'] | [3064.0, 3064.0] | [17.0, 18.0] | [368, 537] |
p03289 | u840841119 | 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 S.replace('C', '')\n if S[1:].islower():\n print('AC')\n exit()\n\nprint('WA')", "S = input()\n\nif S[0] == 'A':\n if S[2:-1].count('C') == 1:\n S = S[0:2] + S[2:-1].replace('C', 'c') + S[-1]\n if S[1:].islower():\n print('AC')\n exit()\n\nprint('WA')"] | ['Wrong Answer', 'Accepted'] | ['s237249640', 's604192078'] | [9104.0, 9040.0] | [26.0, 24.0] | [171, 199] |
p03289 | u842388336 | 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())\ntemp_s = s[1:-1]\nprint(temp_s)\n\nif (s[0]=="A")and("C" in temp_s):\n s.remove("A")\n s.remove("C")\n if len(set(s) - set(list("".join(s).lower())))==0:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 's = list(input())\ntemp_s = s[2:-1]\n#print(temp_s)\n\nif (s[0]=="A")and("C" in temp_s):\n s.remove("A")\n s.remove("C")\n temp = s.copy()\n if len(set(s) - set(list("".join(temp).lower())))==0:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s691918664', 's960181163'] | [3060.0, 3060.0] | [17.0, 17.0] | [230, 252] |
p03289 | u843318346 | 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\nif s[0]!='A':\n ans = False\nif s[2:-1].count('C')!=1:\n ans = False\nupper = 0\nfor i in s:\n if i.isupper:\n upper += 1\nif upper != 2:\n ans = False\nif ans:\n print('AC')\nelse:\n print('WA')", "s = input()\nans = True\nif s[0]!='A':\n ans = False\nif s[2:-1].count('C')!=1:\n ans = False\nupper = 0\nfor i in s:\n if i.isupper():\n upper += 1\n\nif upper != 2:\n ans = False\n\nif ans:\n print('AC')\nelse:\n print('WA')\n"] | ['Wrong Answer', 'Accepted'] | ['s894944426', 's072806137'] | [3060.0, 3060.0] | [18.0, 17.0] | [215, 236] |
p03289 | u843932857 | 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()\ncount = 0\nfor i in range(len(s)):\n if i == 0:\n if s[i] != \'A\':\n break\n elif i == 1:\n if s[i].islower():\n pass\n else:\n break\n elif i>1 and i < len(s)-1 :\n if s[i]==\'C\':\n if count == 0:\n count += 1\n else:\n break\n elif s[i].islower():\n pass\n else:\n break\n elif i == len(s) :\n if s[i].islower():\n print("AC")\n exit()\n else:\n break\nprint("WA")', 's = input()\nif len(s) < 4:\n print(\'WA\')\n exit()\ncount = 0\nfor i in range(len(s)):\n if i == 0:\n if s[i] != \'A\':\n break\n elif i == 1:\n if s[i].islower():\n continue\n else:\n break\n elif i>1 and i < len(s)-1 :\n if s[i]==\'C\':\n if count == 0:\n count += 1\n continue\n else:\n break\n elif s[i].islower():\n continue\n else:\n break\n elif i == len(s) :\n if s[i].islower():\n print("AC")\n exit()\n else:\n break\nprint("WA")', 's = input()\ncount = 0\nfor i in range(len(s)):\n if i == 0:\n if s[i] != \'A\':\n break\n elif i == 1:\n if s[i].islower():\n pass\n else:\n break\n elif i>1 and i < len(s)-1 :\n if s[i]==\'C\':\n if count == 0:\n count += 1\n else:\n break\n elif s[i].islower():\n pass\n else:\n break\n elif i == len(s)-1 :\n if s[i].islower():\n if count ==1:\n print("AC")\n exit()\nprint("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s566697958', 's702194571', 's449273856'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0] | [550, 625, 562] |
p03289 | u844646164 | 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 collections import Counter\nS = list(input())\n\nif S[0] == 'A':\n print(S[1:-1])\n #if int(S[:3].count('C')) + int(S[-2:].count('C')) == 1:\n if S[1:-1].count('C') == 1:\n del S[-2]\n del S[2]\n del S[0]\n s = ''.join(S)\n if s.islower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')\n", "from collections import Counter\nS = list(input())\n\nif S[0] == 'A':\n if [S[2:-2]].count('C') == 1:\n del S[-2]\n del S[2]\n del S[0]\n s = ''.join(S)\n if s.islower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')", "from collections import Counter\nS = list(input())\n\nif S[0] == 'A':\n if S[2:-1].count('C') == 1:\n idx = S[2:-1].index('C')\n del S[idx+2]\n del S[0]\n s = ''.join(S)\n if s.islower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s303336245', 's354483412', 's271169092'] | [3316.0, 3316.0, 3316.0] | [20.0, 21.0, 21.0] | [393, 313, 331] |
p03289 | u845620905 | 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\'):\n flag = False\nif(s[-1] == \'C\' or s[1] == \'C\'):\n flag = False\nif(s.count(\'C\') == 0 or s.count(\'C\') >= 2):\n flag = False\nif (s.count(\'A\') == 0 or s.count(\'A\') >= 2):\n flag = False\nfor i in s:\n if(i != \'A\' or i != \'C\' or i.isupper()):\n flag = False\nif(flag):\n print("AC")\nelse:\n print("WA")\n', 's = input()\nflag = True\nif(s[0] != \'A\'):\n flag = False\nif(s[-1] == \'C\' or s[1] == \'C\'):\n flag = False\nif(s.count(\'C\') == 0 or s.count(\'C\') >= 2):\n flag = False\nif (s.count(\'A\') == 0 or s.count(\'A\') >= 2):\n flag = False\nfor i in s:\n if(i != \'A\' or i != \'C\' or s - \'A\' >= 0):\n flag = False\nif(flag):\n print("AC")\nelse:\n print("WA")\n', 's = input()\nflag = True\nif(s[0] != \'A\'):\n flag = False\nif(s[-1] == \'C\' or s[1] == \'C\'):\n flag = False\nif(s.count(\'C\') == 0 or s.count(\'C\') >= 2):\n flag = False\nfor i in s:\n if(i != \'A\' and i != \'C\' and i.isupper()):\n flag = False\nif(flag):\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s053233692', 's381111379', 's751240242'] | [3064.0, 3064.0, 3060.0] | [17.0, 17.0, 18.0] | [357, 358, 297] |
p03289 | u853185302 | 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 \'C\' in S[2:-1]:\n C = S[2:-1].index(\'C\')\nelse:\n C = -1\nif(S[0]==\'A\' and C!=-1):\n S.pop(0)\n S.pop(C+1)\n print(S)\n if [s for s in S if s.isupper()] == []:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 'S = list(input())\nif(S[0]==\'A\' and \'C\' in S[2:-1]):\n del S[0]\n S[2:-1].remove(\'C\')\n if [s for s in S if s.isupper()] == []:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 'S = list(input())\nif \'C\' in S[2:-1]:\n indC = S[2:-1].index(\'C\')\nelse:\n indC = -1\n\nif((S[0]==\'A\') and (indC !=-1)):\n del S[indC]\n del S[0]\n if [s for s in S if s.isupper()] == []:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 'S = list(input())\nif \'C\' in S[2:-1]:\n C = S[2:-1].index(\'C\')\nelse:\n C = -1\nif(S[0]==\'A\' and C!=-1):\n S.pop(0)\n S.pop(C+1)\n print(S)\n if [s for s in S if s.isupper()] == []:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 's = input()\nprint("AC" if s[0]=="A" and "C" in s[2:-1] and s[1:].replace("C","",1).islower() else "WA")'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s034302525', 's137228622', 's169121475', 's969834127', 's445205150'] | [3060.0, 2940.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [262, 204, 265, 262, 103] |
p03289 | u854946179 | 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 = list(input())\nans=0\ncou=2\nCcou=0\nA=S.count(\'A\')\nC=S.count(\'C\')\njud = len(re.findall(\'[a-z]\', S))\nrep=len(S)-2\nif S[0]==\'A\':\n ans=+1\nrep=len(S)-2\nfor i in range(1,rep):\n if S[cou]==\'C\':\n Ccou=Ccou+1\n cou=cou+1\nif Ccou == 1:\n ans=ans+1\nif ans ==2 and A==1 and C==1 and jud==2:\n print("AC")\nelse:\n print("WA")', 'import re\nS = list(input())\nS2=\'\'.join(S)\nans=0\ncou=2\nCcou=0\nA=S.count(\'A\')\nC=S.count(\'C\')\njud = len(re.findall(\'[A-Z]\', S2))\nrep=len(S)-2\nif S[0]==\'A\':\n ans=+1\nrep=len(S)-2\nfor i in range(1,rep):\n if S[cou]==\'C\':\n Ccou=Ccou+1\n cou=cou+1\nif Ccou == 1:\n ans=ans+1\nif ans ==2 and A==1 and C==1 and jud==2:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s242233535', 's577568294'] | [3188.0, 3188.0] | [20.0, 19.0] | [345, 360] |
p03289 | u854992222 | 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') == 1 and s.count('C') == 1:\n s.remove('A')\n s.remove('C')\n if str(s).islower() == 0:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')", "s = list(input())\nif s[0] == 'A' and s[2:-1].count('C') == 1 and s.count('C') == 1:\n s.remove('A')\n s.remove('C')\n if (''.join(s)).islower() == 0:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')", "s = list(input())\nprint(s)\nif s[0] == 'A' and s[2:-1].count('C') == 1 and s.count('C') == 1:\n s.remove('A')\n s.remove('C')\n print(s)\n if str(s).islower() == 0:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')", "s = input()\nif s[0] == 'A' and 'C' in s[2:-1]:\n a = list(s)\n a.remove('A')\n a.remove('C')\n a = str(a)\n if a.islower() == 0:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')", "s = input()\nans = 'WA'\na = []\nif s[0] == 'A' and s[2:-1].count('C') == 1:\n a = list(s)\n a.remove('A')\n a.remove('C')\n a = str(a)\n if a.islower() == 0:\n ans = 'AC'\nprint(ans)", "s = input()\nans = 'WA'\nif s[0] == 'A' and 'C' in s[2:-1]:\n a = list(s)\n a.remove('A')\n a.remove('C')\n a = str(a)\n if a.islower() == 0:\n ans = 'AC'\nprint(ans)", 's = input()\nif s[0] == \'A\' and s[2:-1].count(\'C\') == 1 and s[:2].count(\'C\') == 0 and s[-1:].count(\'C\' == 0):\n list(s).remove("A")\n list(s).remove("C")\n print(s.islower())\n if s.islower() == 0:\n print("AC")\n exit()\nelse:\n print("WA")', "s = list(input())\nif s[0] == 'A' and s[2:-1].count('C') == 1 and s.count('C') == 1:\n s.remove('A')\n s.remove('C')\n if str(s).islower() == True:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s094317229', 's263939346', 's334699060', 's410334530', 's556835884', 's662667877', 's990238090', 's336167658'] | [3060.0, 3060.0, 3060.0, 2940.0, 3060.0, 2940.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0, 17.0] | [230, 236, 253, 221, 202, 186, 270, 233] |
p03289 | u855380359 | 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 \nif s[0] != 'A':\n print('WA')\n break\nelse:\n for i in range(len(s)-1):\n if s[i] == 'C':\n s = s[1:i-1] + s[i+1:]\n break\n if s.islower() == True:\n print('AC')\n else:\n print('WA')", "s = str(input())\nans = 0\nif s[0] == 'A':\n for i in range(3, len(s)-1):\n if s[i] == 'C':\n ans += 1\n if s[i].isupper() or s[1].isuuper():\n print('WA')\n exit()\n \n if ans == 1:\n print('AC')\n exit()\nelse:\n print('WA')", "s = str(input())\nans = 0\nif s[0] == 'A':\n for i in range(3, len(s)-1):\n if s[i] == 'C':\n ans += 1\n if ans == 1:\n print('AC')\n exit()\nelse:\n print('WA')", "s = input()\nk = False\nif s[0] != 'A':\n print('WA')\n exit()\nelse:\n for i in range(len(s)-1):\n if s[i] == 'C':\n s = s[1:i-1] + s[i+1:]\n k =s.islower()\nprint('AC' if k else 'WA')", "s = str(input())\n\nif s[0] != A:\n print('WA')\n break\nelse:\n for i in range(len(s)-1):\n if s[i] == C:\n s = s[1:i-1] + s[i+1:]\n break\n if s.islower() == True:\n print('AC')\n else:\n print('WA')", "s = str(input())\nans = 0\nif s[0] == 'A':\n for i in range(3, len(s)-1):\n if s[i] == 'C':\n ans += 1\n if s[i].isupper():\n print('WA')\n exit()\n if s[1].isupper():\n print('WA')\n exit()\n \n if ans == 1:\n print('AC')\n exit()\nelse:\n print('WA')", "s = str(input())\nans = 0\nif s[0] == 'A':\n for i in range(3, len(s)-1):\n if s[i] == 'C':\n ans += 1\n if s[i].isupper():\n print('WA')\n exit()\n \n if ans == 1:\n print('AC')\n exit()\nelse:\n print('WA')", "s = input()\nk = False\nif s[0] == 'A' and s[2:-1].count('C') == 1:\n t = s[1:s.find('C')] + s[s.find('C')+1:]\n k = t.islower():\nprint('AC' if k else 'WA')", "s = str(input())\n\nif s[0] == 'A' and s[2:-1].count('C') == 1 and (s[1:s.find('C')] + s[s.find('C')+1:]).islower():\n print('AC')\nelse:\n print('WA')"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s111920772', 's137833156', 's243963925', 's299787363', 's307599596', 's347707476', 's473254421', 's479607893', 's407408113'] | [3060.0, 3060.0, 3064.0, 3060.0, 2940.0, 3060.0, 3060.0, 2940.0, 3060.0] | [17.0, 17.0, 18.0, 18.0, 17.0, 17.0, 18.0, 17.0, 17.0] | [251, 285, 192, 213, 246, 333, 267, 158, 152] |
p03289 | u859897687 | 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()\nans="AC"\nif not a[0]=="A":\n ans="WA"\nif not "C" in a[2:-2]:\n ans="WA"\na.replace("A","").replace("C","")\nif not a.islower():\n ans="WA"\nprint(ans)\n ', 'a=input()\nans="AC"\nif not a[0]=="A":\n ans="WA"\nif not "C" in a[2:-2]:\n ans="WA"\na.remove("A").remove("C")\nif not a.islower():\n ans="WA"\nprint(ans)\n ', 'a=input()\nans="AC"\nif not a[0]=="A":\n ans="WA"\nif not a[2:-1].count("C")==1:\n ans="WA"\na=a.replace("A","",1).replace("C","",1)\nif not a.islower():\n ans="WA"\nprint(ans)\n '] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s152857518', 's897111986', 's136437440'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [160, 152, 173] |
p03289 | u864013199 | 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()\nc = r"A[a-z]+C[a-z]+$"\nprint("AC" if re.match(c,s) else "WA")\n\n', 'import re\nS = input()\nc = r"A[a-z]+C[a-z]+$"\nprint("AC" if re.match(c,S) else "WA")\n\n'] | ['Runtime Error', 'Accepted'] | ['s943838156', 's162851159'] | [3188.0, 3188.0] | [19.0, 19.0] | [85, 85] |
p03289 | u864900001 | 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)\nif s[0] !="A":\n print("WA")\n break\nelse:\n s = s.replace(s[0],"a")\n index1 = s.find("C")\n index2 = s.find("C", 2)\n if index2 != -1 or (index1 < 2 or index1 > l-3):\n print("WA")\n else:\n s = s.replace("A","a")\n s_lower = s.lower()\n if s != s_lower:\n print("WA")\n else:\n print("AC")', 's = input()\nl = len(s)\nif s[0] !="A":\n print("WA")\nelse:\n s = s.replace(s[0],"a")\n index1 = s.find("C")\n s = s.replace(s[index1],"c")\n index2 = s.find("C")\n\n if index2 != -1 or (index1 < 2 or index1 > l-3):\n print("WA")\n else:\n s_lower = s.lower()\n\n print(s)\n\n if s != s_lower:\n print("WA")\n else:\n print("AC")\n', '#104\ns = input()\nif(s[0]==\'A\' and s[2:-1].count(\'C\')==1):\n s1 = s.replace(\'A\', "").replace("C","")\n if(s1==s1.lower()):\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s130491973', 's827567946', 's041060283'] | [3064.0, 3188.0, 3064.0] | [17.0, 19.0, 18.0] | [379, 389, 197] |
p03289 | u867848444 | 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())\nif s[0]!='A':\n break\ncount=0\nfor i in range(2,len(s)-2):\n if s[i]=='C':\n count+=1\n\nif count==1:\n s.remove('A')\n s.remove('C') \n res=''.join(s)\n print('AC' if res.islower()==True else 'WA') \n\nelse:\n print('WA')", "s=list(input())\ncount=0\nif s[0]!='A':\n count+=2\nfor i in range(2,len(s)-1):\n if s[i]=='C':\n count+=1\n\nif count==1:\n s.remove('A')\n s.remove('C') \n res=''.join(s)\n print('AC' if res.islower()==True else 'WA') \n\nelse:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s564800294', 's070451655'] | [3060.0, 3060.0] | [17.0, 17.0] | [307, 299] |
p03289 | u868628468 | 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)\nflag = True\nif S[0] != "A":\n flag = False\nflag1 = False\nfor i in range(3,len(S)-1):\n if S[i] == "C" and flag1:\n flag = False\n S[i] = \'c\'\n \n elif S[i] == "C" and not flag1:\n flag1 = True\nif not flag1:\n flag = False\nS[0] = "a"\nfor i in range(len(S)):\n if not S[i].islower():\n flag = False\n \nif flag:\n print(\'AC\')\nelse:\n print(\'WA\')', 'S = input()\nS = list(S)\nflag = True\nif S[0] != "A":\n flag = False\nflag1 = False\nfor i in range(3,len(S)-1):\n if S[i] == "C" and flag1:\n flag = False\n \n \n elif S[i] == "C" and not flag1:\n flag1 = True\n S[i] = "c"\nif not flag1:\n flag = False\nS[0] = "a"\nfor i in range(len(S)):\n if not S[i].islower():\n flag = False\n \nif flag:\n print(\'AC\')\nelse:\n print(\'WA\')', 'S = input()\nS = list(S)\nflag = True\nif S[0] != "A":\n flag = False\nflag1 = False\nfor i in range(2,len(S)-1):\n if S[i] == "C" and flag1:\n flag = False\n \n \n elif S[i] == "C" and not flag1:\n flag1 = True\n S[i] = "c"\nif not flag1:\n flag = False\nS[0] = "a"\nfor i in range(len(S)):\n if not S[i].islower():\n flag = False\n \nif flag:\n print(\'AC\')\nelse:\n print(\'WA\')'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s422936339', 's467451536', 's176894086'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [416, 425, 425] |
p03289 | u873269440 | 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 collections import Counter\n\ndef main():\n\n S = list(input())\n head = S.pop(0)\n c1 = S.pop(1)\n c2 = S.pop(-2)\n other = \'\'.join(S)\n flag = False\n flag1 = False\n flag2 = False\n\n if head == \'A\':\n flag = True\n \n if (c1==\'C\' or c2==\'C\') and c1!=c2:\n flag1 = True\n \n if other.islower():\n flag2 = True\n \n if flag and flag1 and flag2:\n print(\'CA\')\n else:\n print(\'WA\')\n\n\n \nif __name__== "__main__":\n main() \n\n\n\n\n\n\n\n\n\n', 'from collections import Counter\n\ndef main():\n\n S = list(input())\n head = S.pop(0)\n count = 0\n flag = False\n flag1 = False\n flag2 = False\n\n if head == \'A\':\n flag = True\n \n for i in S[1:-1]:\n if i==\'C\':\n count += 1\n if count == 1:\n flag1=True\n S.pop(S.index(\'C\'))\n \n if \'\'.join(S).islower():\n flag2 = True\n \n if flag and flag1 and flag2:\n print(\'AC\')\n else:\n print(\'WA\')\n\n\n \nif __name__== "__main__":\n main() \n\n\n\n\n\n\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s714973428', 's865752870'] | [3316.0, 3316.0] | [21.0, 20.0] | [501, 533] |
p03289 | u874741582 | 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())\ns[0] == "A"\nprint(s[2:-1])\nif s[2:-1].count(\'C\') ==1:\n if s[1:].replace(\'C\',\'\').islower():\n print("AC")\n else:\n print(\'WA\')\nelse: print("WA")', 's=str(input())\ns[0] == "A"\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: print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s171250703', 's580423438'] | [2940.0, 2940.0] | [17.0, 17.0] | [176, 177] |
p03289 | u875855656 | 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 s[2:-1].count("C")==1 and s[:-1].strip("A").strip("C").islower() else "WA")', 's=input()\nprint("AC" if s[0]=="A" and s[2:-1].count("C")==1 and s.strip("A").strip("C").islower() else "WA")', 's=input()\nif s[0]=="A" and s[2:-1].count("C")==1:\n c=s[2:-1].index("C")\n if s[1:c+2].islower() and s[c+3:].islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s570707716', 's678118492', 's812448538'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 18.0] | [113, 108, 179] |
p03289 | u879870653 | 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. | ['T = []\nfor i in range(ord("a"),ord("z")+1) :\n T.append(chr(i))\n\n\nL = list(input())\nflag = 0\nans = 1\nfor i in range(len(L)) :\n if i == 0 and L[i] != "A" :\n ans = -1\n break\n elif (2 <= i <= len(L)-1) and L[i] == "C" :\n if flag == 1 :\n ans = -1\n break\n else :\n flag = 1\n else :\n if L[i] not in T :\n if i == 0 or i == len(L)-1 or flag == 1 : \n ans = -1\n break\n\nif ans == 1 :\n print("AC")\nelse :\n print("WA")\n ', 'T = []\nfor i in range(ord("a"),ord("z")+1) :\n T.append(chr(i))\n\nL = list(input())\ncounter = 0\nflag = 0\nfor i in range(len(L)) :\n if i == 0 :\n if L[i] != "A" :\n ans = -1\n break\n elif i == 1 :\n if L[i] not in T :\n counter += 1\n elif 2 <= i <= len(L)-2 :\n if L[i] not in T and flag == 1 :\n counter += 1\n elif flag == 0 and L[i] == "C" :\n flag = 1\n else :\n if L[i] not in T :\n counter += 1\nif counter > 0 or flag == 0 :\n print("WA")\nelse :\n print("AC")\n'] | ['Wrong Answer', 'Accepted'] | ['s591597559', 's143823685'] | [3064.0, 3064.0] | [18.0, 18.0] | [535, 571] |
p03289 | u884982181 | 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 x = s.find("C")\n if 2<=x and x != len(s)-1:\n s[0]="a"\n s[x]="c"\n if s.islower():\n print("AC")\n exit()\nprint("WA")', 's = input()\nif s[0] == "A":\n x = s.find("C")\n if 2<=x and x != len(s)-1:\n s = [i for i in s]\n s[0]="a"\n s[x]="c"\n s = "".join(s)\n if s.islower():\n print("AC")\n exit()\nprint("WA")'] | ['Runtime Error', 'Accepted'] | ['s018932135', 's432108884'] | [3060.0, 3060.0] | [17.0, 17.0] | [191, 241] |
p03289 | u886790158 | 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\ndef solve(s):\n \n\n \n if s[0] != 'A':\n return 'WA'\n\n \n \n \n if len([True for c in s[2:-1] if c == 'C']) != 1:\n return 'WA'\n\n \n sl = s.lower()\n diff = len([s_ != sl_ for s_, sl_ in zip(s, sl)])\n if (diff - 2) != 0:\n return 'WA'\n\n return 'AC'\n\n\ns = input()\nprint(solve(s))\n", "\n\ndef solve(s):\n \n\n \n if s[0] != 'A':\n return 'WA'\n\n \n \n \n if len([True for c in s[2:-1] if c == 'C']) != 1:\n return 'WA'\n\n \n n_diff = 0\n for s_ in s:\n sl_ = s_.lower()\n if s_ != sl_:\n n_diff += 1\n\n if n_diff != 2:\n return 'WA'\n\n return 'AC'\n\n\ns = input()\nprint(solve(s))\n"] | ['Wrong Answer', 'Accepted'] | ['s520312013', 's394374263'] | [3060.0, 3064.0] | [17.0, 17.0] | [611, 638] |
p03289 | u888275483 | 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. | ["#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ndef check(str):\n\tprint(str)\n\tcnt = 0\n\tfor s in str:\n\t\tif s.islower():\n\t\t\tcnt += 1\n\treturn cnt == len(str) - 1 and str.find('C') != -1\n\nS = input()\n\nif S[0] == 'A' and S[1] != 'C' and S[len(S) - 1] != 'C' and check(S[2:len(S) - 1]) and S[1].islower() and S[len(S) - 1].islower():\n\tprint('AC')\nelse:\n\tprint('WA')\n\n", "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ndef check(str):\n\tcnt = 0\n\tfor s in str:\n\t\tif s.islower():\n\t\t\tcnt += 1\n\treturn cnt == len(str) - 1 and str.find('C') != -1\n\nS = input()\n\nif S[0] == 'A' and S[1] != 'C' and S[len(S) - 1] != 'C' and check(S[2:len(S) - 1]) and S[1].islower() and S[len(S) - 1].islower():\n\tprint('AC')\nelse:\n\tprint('WA')\n\n"] | ['Wrong Answer', 'Accepted'] | ['s067165398', 's603142237'] | [3064.0, 3064.0] | [17.0, 17.0] | [359, 347] |
p03289 | u898421873 | 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. | ['\ns = input()\n\nans = True\nif s[0] != "A":\n ans = False\n #print("s[0] is not A")\nelse:\n cnt_C = 0\n length = len(s)\n\n n = 1\n for check_char in s[1:]:\n print(check_char)\n \n if check_char.islower() is False:\n if check_char != "C" or n == 1 or n == (length - 1):\n ans = False\n break\n \n cnt_C += 1\n \n n += 1\n\nif cnt_C != 1:\n ans = False\n\nif ans:\n print("AC")\nelse:\n print("WA")', '\n\ns = input()\n\nans = True\nif s[0] != "A":\n ans = False\n #print("s[0] is not A")\nelse:\n cnt_C = 0\n for n in range(1, len(s)):\n check_char = s[n]\n \n if (check_char.islower() is False\n and check_char == "C"\n and 2 <= n\n and n < (len(s) - 1)):\n cnt_C += 1\n else:\n ans = False\n break\n\nif cnt_C != 1:\n ans = False\n\nif ans:\n print("AC")\nelse:\n print("WA")', '\n\ns = input()\n\nans = True\nif s[0] != "A":\n ans = False\n #print("s[0] is not A")\nelse:\n cnt_C = 0\n length = len(s)\n\n n = 1\n for check_char in s[2:-1]:\n \n if check_char.islower() is False:\n if check_char != "C" or n == 1 or n == (length - 1):\n ans = False\n \n cnt_C += 1\n \n n += 1\n\nif cnt_C != 1:\n ans = False\n\nif ans:\n print("AC")\nelse:\n print("WA")', '\n\ns = input()\n\ncnt_C = 0\nans = True\nif s[0] != "A":\n ans = False\n #print("s[0] is not A")\nelse:\n length = len(s)\n\n n = 1\n for check_char in s[1:]:\n #print(check_char)\n \n if check_char.islower() is False:\n if check_char != "C" or n == 1 or n == (length - 1):\n ans = False\n \n cnt_C += 1\n \n n += 1\n\nif cnt_C != 1:\n ans = False\n\nif ans:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s345833102', 's719938211', 's882056416', 's366342753'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0, 17.0] | [495, 927, 906, 927] |
p03289 | u903596281 | 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=abcdefghijklmnopqrstuvwxyz\nc=0\nif S[0]=="A" and "C" in S[2:len(S-1)]:\n i=S.find("C")\n S=S[1:i]+S[i+1:]\n if S.islower():\n c=1\nprint("AC" if c==1 else "WA")', 'S=input()\nc=0\nif S[0]=="A" and "C" in S[2:len(S)-1]:\n i=S.find("C")\n S=S[1:i]+S[i+1:]\n if S.islower():\n c=1\nprint("AC" if c==1 else "WA")'] | ['Runtime Error', 'Accepted'] | ['s795456905', 's283082179'] | [3060.0, 3060.0] | [17.0, 17.0] | [172, 143] |
p03289 | u904943473 | 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\ns = S[2:-1]\ns_sub = []\ncnt = 0\nfor i in s:\n if (i == \'C\'):\n cnt += 1\n\nfor i in s:\n if (i != \'A\' or i != \'C\'):\n s_sub.append(i)\n \n \nif (S[0] == \'A\' and cnt == 1 and "".join(s_sub).islower()):\n print(\'AC\')\nelse:\n print(\'WA\')\n', 'S = list(input())\n\ns = S[2:-1]\ns_sub = []\ncnt = 0\nfor i in s:\n if (i == \'C\'):\n cnt += 1\n\nfor i in S[1:]:\n if (i != \'C\'):\n s_sub.append(i)\nif (S[0] == \'A\' and cnt == 1 and "".join(s_sub).islower()):\n print(\'AC\')\nelse:\n print(\'WA\')\n'] | ['Wrong Answer', 'Accepted'] | ['s694506818', 's253404838'] | [3064.0, 3060.0] | [17.0, 17.0] | [255, 240] |
p03289 | u931462344 | 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)\nif s[0] == \'A\':\n slist[0] = \'a\'\n flag = -1\n for i, c in enumerate(s[2:-2]):\n if flag == 1 or flag == -1:\n print("WA")\n exit(0)\n if c == \'C\':\n flag += 1\n slist[i+2] = \'c\'\n if "".join(slist).islower():\n print("AC")\n exit(0)\nprint("WA")', 's = input()\n\nans = "WA"\nif s[0] == \'A\' and s[2:-1].count(\'C\') == 1 and s[1] != \'C\' and s[-1] != \'C\':\n s2 = s.replace(\'A\', \'a\').replace(\'C\', \'c\')\n if s2 == s.lower():\n ans = "AC"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s476535433', 's184210570'] | [3064.0, 3060.0] | [17.0, 17.0] | [345, 201] |
p03289 | u933341648 | 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 s = s[1:]\n if s[1:-2].cont('C') == 1:\n s.remove('C')\n if s == s.lower():\n print('AC')\n exit()\nprint('WA')", "import sys\ns = 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 sys.exit()\nprint('WA')\n"] | ['Runtime Error', 'Accepted'] | ['s496453077', 's291991177'] | [3064.0, 2940.0] | [29.0, 17.0] | [176, 178] |
p03289 | u933622697 | 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 "A" != s[0]:\n print("WA")\n exit()\ns_extracted = s[2:-1]\nif s_extracted.count("C") != 1:\n print("WA")\n exit()\nelse:\n # Get Upper characters without "C"\n s_upper = [\n chara for chara in s\n if chara != "C" and chara != "C" and chara.isupper()\n ]\n if len(s_upper) > 0:\n print("WA")\n exit()\nprint("AC")', 'import re\nprint("AC" if re.match("A[a-z]+C[a-z]+$",input()) else "WA")'] | ['Wrong Answer', 'Accepted'] | ['s141557633', 's238996190'] | [3060.0, 3316.0] | [17.0, 21.0] | [370, 70] |
p03289 | u934868410 | 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()\nfor c in s:\n if c.isupper():\n count += 1\n\nif count == 2 and s[0] == 'A' and 'C' in s[2:-1]:\n print('AC')\nelse:\n print('WA')", "s = input()\ncount = 0\nfor c in s:\n if c.isupper():\n count += 1\n\nif count == 2 and s[0] == 'A' and 'C' in s[2:-1]:\n print('AC')\nelse:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s638143948', 's313998607'] | [2940.0, 2940.0] | [17.0, 17.0] | [141, 151] |
p03289 | u939585142 | 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" and S[2:-1].count("C") == 1:\n index = S.index(\'C\')\n S = S[1:index] + S[index + 1:]\n print(S)\n if S.islower():\n print("AC")\n exit()\nelse:\n print("WA")\n\n', 'S = input()\n\nif S[0] == "A" and S[2:-1].count("C") == 1:\n index = S.index(\'C\')\n S = S[1:index] + S[index + 1:]\n if S.islower():\n print("AC")\n exit()\n\nprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s538334361', 's926091571'] | [2940.0, 2940.0] | [17.0, 17.0] | [191, 171] |
p03289 | u941047297 | 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':\n print('WA')\n exit()\nif len([s for s in S[3:-2] if s == 'C']) != 1:\n print('WA')\n exit()\nSL = [s for s in S if s not in ['A', 'C']]\nif not all([sl.islower() for sl in SL]) or len(SL) + 2 != len(S):\n print('WA')\n exit()\nprint('AC')", "S = list(input())\nif S[0] != 'A':\n print('WA')\n exit()\nif len([s for s in S[2:-1] if s == 'C']) != 1:\n print('WA')\n exit()\nSL = [s for s in S if s not in ['A', 'C']]\nif not all([sl.islower() for sl in SL]) or len(SL) + 2 != len(S):\n print('WA')\n exit()\nprint('AC')"] | ['Wrong Answer', 'Accepted'] | ['s156655825', 's905685885'] | [3064.0, 3064.0] | [18.0, 19.0] | [282, 282] |
p03289 | u941884460 | 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()\ncount = 1\nif s[0] == 'A' and s[2:len(s)-1].count('C') == 1:\n for i in range(1,len(s)):\n if s[i].islower() == False:\n if s[i] == 'C':\n count += 1\n else:\n print('WA')\n exit()\n if 1 < count:\n print('WA')\n exit()\n print('AC')\nelse:\n print('WA')", "s = input()\ncount = 0\nif s[0] == 'A' and s[2:len(s)-1].count('C') == 1:\n for i in range(1,len(s)):\n if s[i].islower() == False:\n if s[i] == 'C':\n count += 1\n else:\n print('WA')\n exit()\n if 1 < count:\n print('WA')\n exit()\n print('AC')\nelse:\n print('WA')"] | ['Wrong Answer', 'Accepted'] | ['s918898006', 's558990300'] | [3060.0, 3060.0] | [17.0, 17.0] | [308, 308] |
p03289 | u943657163 | 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]\nr = S.replace('A', '')\nr = r.replace('C', '')\n\nif S[0] != 'A' or s.count('C') != 1 or r.lower():\n print('WA')\nelse:\n print('AC')\n", 'S = input()\nR = S[2:-1]\nT = S.replace(\'A\', \'\')\nT = T.replace(\'C\', \'\')\n\nif S[0] != \'A\' or R.count(\'C\') != 1 or not T.islower():\n print("WA")\nelse:\n print("AC")'] | ['Wrong Answer', 'Accepted'] | ['s577964873', 's095250076'] | [2940.0, 2940.0] | [17.0, 17.0] | [159, 164] |
p03289 | u945181840 | 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' and S[2:- 1].count('C') == 1:\n S.remove('A')\n S.remove('C')\n if ''.join(S).islower is True:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')", "S = list(input())\n\nif S[0] == 'A' and S[2:- 1].count('C') == 1:\n S.remove('A').remove('C')\n if ''.join(S).islower:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')", "S = list(input())\n\nif S[0] == 'A' and S[2:- 1].count('C') == 1:\n S.remove('A')\n S.remove('C')\n if ''.join(S).islower():\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s125134279', 's958294825', 's544690947'] | [3060.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [206, 192, 200] |
p03289 | u952491523 | 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\nstr = input()\n\nif str[0] != \'A\' :\n print("WA")\n sys.exit()\n\nstr.replace(\'A\', \'a\', 1)\n\nflag = False\n\nfor i in range(2, len(str) - 1) :\n if str[i] == \'C\':\n str.replace(\'C\' , \'c\', 1)\n flag = True\n \nif not flag :\n print("WA")\n sys.exit()\n\nif str.islower():\n print("AC")\nelse:\n print("WA")', 'import sys\n\nstr = input()\n\nif str[0] != \'A\' :\n print("WA")\n sys.exit()\n\nstr = str.replace(\'A\', \'a\', 1)\n\nflag = False\n\nfor i in range(2, len(str) - 1) :\n if str[i] == \'C\':\n str = str.replace(\'C\' , \'c\', 1)\n flag = True\n break\n \nif not flag :\n print("WA")\n sys.exit()\n\nif str.islower():\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s323393149', 's493647977'] | [3064.0, 3064.0] | [17.0, 17.0] | [338, 364] |
p03289 | u953379577 | 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())\nal = list("abcdefghijklmnopqrstuvwxyz")\nif s[0] == "A" and s[-1] in al and s[1] in al:\n del s[0]\n del s[0]\n del s[-1]\n f = 0\n for i in s:\n if i == "C":\n if f == 1:\n print("WA")\n break\n else:\n f = 1\n continue\n else:\n if i in al:\n continue\n else:\n print("WA")\n break\n else:\n if f = 1:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 's = list(input())\nal = list("abcdefghijklmnopqrstuvwxyz")\nif s[0] == "A" and s[-1] in al and s[1] in al:\n del s[0]\n del s[0]\n del s[-1]\n f = 0\n for i in s:\n if i == "C":\n if f == 1:\n print("WA")\n break\n else:\n f = 1\n continue\n else:\n if i in al:\n continue\n else:\n print("WA")\n break\n else:\n if f == 1:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s530651497', 's544760619'] | [9024.0, 9124.0] | [26.0, 29.0] | [572, 573] |
p03289 | u954488273 | 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())\n\ncount1=0\ncount2=0\nif str[0]=="A":\n for i in range(len(str)-3):\n if str[i+2]=="C":\n count1 += 1\n for i in range(len(str)):\n if str[i]==str[i].capitalize():\n count2 += 1\n if count1 == 1 && count2 !=0 :\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")\n \n \n \n ', 'str=list(input())\n\ncount1=0\ncount2=0\nif str[0]=="A":\n for i in range(len(str)-3):\n if str[i+2]=="C":\n count1 += 1\n for i in range(len(str)):\n if str[i]==str[i].capitalize():\n count2 += 1\n if count1 == 1 and count2 ==2 :\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s373757006', 's312957177'] | [2940.0, 3060.0] | [17.0, 17.0] | [313, 298] |
p03289 | u957722693 | 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()\nc=0\nif s[0]!=\'A\' or s[0].isupper()==False:\n print("WA")\nelse:\n for i in range(3,len(s)-1):\n if s[i]==\'C\' and s[i].isupper()==True:\n c+=1\n if c==1:\n print("AC")\n else:\n print("WA")\n', 's=input()\nc=0\nif s[0]!=\'A\':\n print("WA")\nelse:\n for i in range(3,len(s)-1):\n if s[i]==\'C\':\n c+=1\n if c==1:\n print("AC")\n else:\n print("WA")', 's=input()\nc=0\nif s[0]!=\'A\' or s[0].isupper()==False:\n print("WA")\nelse:\n for i in range(2,len(s)-1):\n if s[i]==\'C\' and s[i].isupper()==True:\n c+=1\n if c==1 and s[1].isupper()==False and s[len(s)-1].isupper()==False:\n print("AC")\n else:\n print("WA")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s732300993', 's802463078', 's896158768'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [208, 157, 267] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.