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 | u416758623 | 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 : len(s) - 1].count("C") == 1:\n s = s[1:].replace("C", "c")\n if s.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")\nprint(s)', 's = input()\n\nif s[0] == "A" and s[2 : len(s) - 1].count("C") == 1:\n s = s[1:].replace("C", "c")\n if s.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s889814669', 's860194641'] | [2940.0, 2940.0] | [17.0, 17.0] | [199, 190] |
p03289 | u419963262 | 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()\nn = len(s)\nans = 1\nif s[0] != "A":\n ans *= 0\ncheck = 0\nfor i in range(n):\n if s[i] == "C" and check == 0:\n check = 1\n elif s[i] == "C":\n check = 0\n else:\n if 97 <= ord(s[i]) <= 122:\n ans *= 1\n else:\n ans *= 0\nprint(["WA", "AC"][ans * check])\n', 'print("a", ord("a"))\nprint("z", ord("z"))\n\ns = input()\nn = len(s)\nans = 1\nif s[0] != "A":\n ans *= 0\ncheck = 0\nfor i in range(1, n):\n if s[i] == "C" and check == 0:\n check = 1\n elif s[i] == "C":\n check = 0\n else:\n if 97 <= ord(s[i]) <= 122:\n ans *= 1\n else:\n ans *= 0\nprint(["WA", "AC"][ans * check])\n', 'print("a", ord("a"))\nprint("z", ord("z"))\n\ns = input()\nn = len(s)\nans = 1\nif s[0] != "A":\n ans *= 0\ncheck = 0\nfor i in range(1, n):\n if s[i] == "C" and check == 0:\n check = 1\n elif s[i] == "C":\n check = 0\n else:\n if 97 <= ord(s[i]) <= 122:\n ans *= 1\n else:\n ans *= 0\nif s[-1] == "C" or s[1] == "C":\n ans *= 0\nprint(["WA", "AC"][ans * check])\n', 'rint("a", ord("a"))\nprint("z", ord("z"))\n\ns = input()\nn = len(s)\nans = 1\nif s[0] != "A":\n ans *= 0\nif not (97 <= ord(s[1]) <= 122):\n ans *= 0\nif not (97 <= ord(s[-1]) <= 122):\n ans *= 0\n\ncheck = 0\nfor i in range(1, n - 1):\n if s[i] == "C":\n check += 1\nprint(["WA", "AC"][ans & (check == 1)])', 's = input()\nn = len(s)\nans = 1\nif s[0] != "A":\n ans *= 0\nif not (97 <= ord(s[1]) <= 122):\n ans *= 0\nif not (97 <= ord(s[-1]) <= 122):\n ans *= 0\n\ncheck = 0\nfor i in range(1, n - 1):\n if s[i] == "C":\n check += 1\nprint(["WA", "AC"][ans & (check == 1)])\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s155894959', 's276079307', 's538647216', 's776347141', 's344501630'] | [9000.0, 9104.0, 9080.0, 9084.0, 9128.0] | [29.0, 26.0, 29.0, 26.0, 28.0] | [316, 362, 407, 310, 269] |
p03289 | u426035905 | 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 count_apper(str) :\n n = 0\n for c in str :\n if c.isuppper() :\n n = n+1\n return n\n\nstr = input()\nif (str[0] == "A") && (str.count("C") == 1) && (2 < str.find("C") < len(str)-1) && (count_apper(str) == 2) :\n print("AC")\n exit()\nprint("WA")\n ', 'def count_apper(str) :\n n = 0\n for c in str :\n if c.isupper() :\n n = n+1\n return n\n\nstr = input()\nif (str[0] == "A") and (str.count("C") == 1) and (1 < str.find("C") < len(str)-1) and (count_apper(str) == 2) :\n print("AC")\n exit()\nprint("WA")\n '] | ['Runtime Error', 'Accepted'] | ['s579129783', 's582791169'] | [3064.0, 2940.0] | [18.0, 17.0] | [302, 304] |
p03289 | u430537811 | 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 check(s):\n t=True\n if s[0]!="A" :\n t=False\n #print("reached")\n a=s[3:len(s)-1]\n count=0\n for i in range(len(a)):\n if a[i]=="C":\n count+=1\n if count!=1:\n t=False\n alph="BDEFGHIJKLMNOPQRSTUVWXYZ"\n for i in range(24):\n if alph[i] in s:\n t=False\n break\n if t:\n print("AC")\n else:\n print("WA")\ns=input()\ncheck(s) ', 'def check(s):\n t=True\n if s[0]!="A" :\n t=False\n #print("reached")\n a=s[2:len(s)-1]\n print(a)\n count=0\n for i in range(len(a)):\n if a[i]=="C":\n count+=1\n if count!=1:\n t=False\n alph="BDEFGHIJKLMNOPQRSTUVWXYZ"\n for i in range(24):\n if alph[i] in s:\n t=False\n break\n if t:\n print("AC")\n else:\n print("WA")\ns=input()\ncheck(s) ', 'def check(s):\n t=True\n if s[0]!="A" :\n t=False\n #print("reached")\n a=s[3:len(s)-1]\n count=0\n for i in range(len(a)):\n if a[i]=="C":\n count+=1\n if count!=1:\n t=False\n alph="BDEFGHIJKLMNOPQRSTUVWXYZ"\n for i in range(24):\n if alph[i] in s:\n t=False\n break\n if t:\n print("AC")\n else:\n print("WA")\ns=input()\ncheck("ACoder") ', 'def check(s):\n t=True\n if s[0]!="A" :\n t=False\n #print("reached")\n a=s[2:len(s)-1]\n #print(a)\n count=0\n for i in range(len(a)):\n if a[i]=="C":\n count+=1\n if count!=1:\n t=False\n alph="BDEFGHIJKLMNOPQRSTUVWXYZ"\n for i in range(24):\n if alph[i] in s:\n t=False\n break\n if t:\n print("AC")\n else:\n print("WA")\ns=input()\ncheck(s) '] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s158325976', 's173974947', 's347187911', 's820134371'] | [3064.0, 3064.0, 3064.0, 3064.0] | [19.0, 18.0, 18.0, 17.0] | [424, 437, 431, 439] |
p03289 | u432453907 | 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())\nans="WA"\nif S[0]=="A":\n if "C" in S[2:-1] and S.count("C")==1:\n x=S.index("C")\n S[0].lower()\n S[x].lower()\n if S==S.lower():\n ans="AC"\nprint(ans)', 'S=str(input())\nans="WA"\nif S[0]=="A":\n if "C" in S[2:-1] and S.count("C")==1:\n x=S.index("C")\n S=S[0].lower()+S[1:x]+S[x].lower()+S[x+1:]\n if S==S.lower():\n ans="AC"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s378036669', 's290199193'] | [8996.0, 9056.0] | [29.0, 27.0] | [202, 211] |
p03289 | u440129511 | 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\nl=input()\ns=list()\nk=0\nif s[0]=='A':\n for i in range(2,len(s)-1):\n if s[i]=='C':\n k+=1\n if k==1:\n if l.replace('A', 'a').replace('C', 'c') == l.lower():print('AC')\n else:print('WA')\n else:print('WA')\nelse:print('WA')", "from collections import Counter\ns=list(input())\nk=0\nif s[0]=='A':\n for i in range(2,len(s)-1):\n if s[i]=='C':\n k+=1\n if k==1:\n if s.replace('A', 'a').replace('C', 'c') == s.lower():print('AC')\n else:print('WA')\n else:print('WA')\nelse:print('WA')", "from collections import Counter\nl=input()\ns=list(l)\nk=0\nif s[0]=='A':\n for i in range(2,len(s)-1):\n if s[i]=='C':\n k+=1\n if k==1:\n if l.replace('A', 'a').replace('C', 'c') == l.lower():print('AC')\n else:print('WA')\n else:print('WA')\nelse:print('WA')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s136163850', 's214485054', 's955187120'] | [3316.0, 3316.0, 3316.0] | [21.0, 20.0, 22.0] | [289, 286, 290] |
p03289 | u445226180 | 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\ncc=0\nfor i in range(2,len(S)-2):\n if S[i]=='C':\n cc+=1\n nc=i-1\n\nif cc==1:\n p1=True\n\nif S[0]=='A':\n p2=True\n\nbc=0\nfor i in range(len(S)):\n if i==0 or i==nc:\n pass\n else:\n if S[i].islower()==False:\n bc+=1\n\nif p1==True and p2==True and bc==0:\n print('AC')\n\nelse:\n print('WA')\n", "S=input()\nif S[0]=='A' and S[0].islower():\n p1=True\n\ncountc=0\nfor i in range(2,len(S)-2):\n if S[i]=='C' and S[i].islower():\n countc+=1\n nc=i\n \nif countc==1:\n p2=True\n\nif p1==True and p2==True:\n b=0\n for i in range(len(S)):\n if i==0 or i==nc:\n pass\n else:\n if S[i].islower()==False:\n b+=1\n\nif p1==True and p2==True and b==0:\n print('AC') \nelse:\n print('WA')", "S=input()\nif S[0]=='A' and S[0].islower():\n p1=True\n\ncountc=0\nfor i in range(2,len(S)-1):\n if S[i]=='C' and S[i].islower():\n countc+=1\n nc=i\n \nif countc==1:\n p2=True\n\nif p1==True and p2==True:\n b=0\n for i in range(len(S)):\n if i==0 or i==nc:\n pass\n else:\n if S[i].islower()==False:\n b+=1\n\nif b==0:\n print('AC') \nelse:\n print('WA')", "S=input()\n\ncc=0\nnc=0\nfor i in range(2,len(S)-1):\n if S[i]=='C' and S[i].islower()==False:\n cc+=1\n nc=i\n\nif cc==1 and not nc==0:\n p1=True\nelse:\n p1=False\n\nif S[0]=='A' and S[0].islower()==False:\n p2=True\nelse:\n p2=False\n\nbc=0\nfor i in range(len(S)):\n if i==0 or i==nc:\n pass\n else:\n if S[i].islower()==False:\n bc+=1\n\nif p1==True and p2==True and bc==0:\n print('AC')\n\nelse:\n print('WA')\n"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s219785468', 's311473926', 's838183771', 's095003425'] | [3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 18.0] | [344, 456, 430, 451] |
p03289 | u445628522 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['S=input()\nif(S[0]=="A" and S[2,-1].count("C")==1):\n cnt=0\n for i in S:\n if(97<=ord(i) and ord(i)<=122):\n cnt+=1\n if(cnt==2):\n print("AC")\n else :\n print("WA")\nelse :\n print("WA")', "S = input()\nif(S[0]=='A' and S[2:-1].count('C') == 1):\n cnt = 0\n for i in S:\n if(not (97<=ord(i) and ord(i)<=122)):\n cnt+=1\n if(cnt==2):\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')\n"] | ['Runtime Error', 'Accepted'] | ['s938573983', 's157691948'] | [3060.0, 2940.0] | [17.0, 18.0] | [233, 208] |
p03289 | u448655578 | 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()\ncount1 = 0\ncount2 = 0\nanswer = "WA"\n\nif S[0] == \'A\':\n exception = [0]\n for i in range(2,len(S)-1):\n print(i)\n if S[i] == \'C\':\n count1 += 1\n\nif count1 == 1:\n C = S.index(\'C\')\n exception.append(C)\n\nif len(exception) > 1:\n for j in range(len(S)):\n if j not in exception and S[j].islower():\n answer = "AC"\n\nprint(answer)\n', 'S = input()\ncount = 0\nexception = [0]\nanswer = "WA"\n\nif S[0] == \'A\' and S[2:-1].count(\'C\') == 1:\n C = S.index(\'C\')\n exception.append(C)\n\nif len(exception) == 2:\n for j in range(len(S)):\n if j not in exception and S[j].islower():\n count += 1\n\nif count == len(S)-2:\n answer = "AC"\n\nprint(answer)\n'] | ['Runtime Error', 'Accepted'] | ['s805752816', 's007066026'] | [3060.0, 3060.0] | [17.0, 17.0] | [387, 324] |
p03289 | u448747186 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["print('WA')", "S = input()\n\nif S[2:-2].count('C') != 1:\n print('WA')\nelse:\n if S[0] != 'A':\n print('WA')\n else:\n S[0] == 'a'\n S[S[2:-2].index('C')] == 'c'\n\n if S.islower():\n print('AC')\n else:\n print('WA')\n", "S = input()\n\nif S[2:-2].count('C') != 1:\n print('WA')\n\nif S[0] != 'A':\n print('WA')\n\nS[0] == 'a'\nS[S[2:-2].index('C')] == 'c'\n\nif S.islower():\n print('AC')\nelse:\n print('WA')", "S = input()\n\nif S[2:-1].count('C') != 1:\n print('WA')\nelse:\n if S[0] != 'A':\n print('WA')\n else:\n S = list(map(lambda x: x, S))\n S[0] = 'a'\n S[S[2:-1].index('C')+2] = 'c'\n if ''.join(S).islower():\n print('AC')\n else:\n print('WA')\n"] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s170587070', 's366981587', 's882684494', 's350703846'] | [2940.0, 3060.0, 3060.0, 3060.0] | [19.0, 18.0, 18.0, 18.0] | [11, 249, 178, 295] |
p03289 | u451610133 | 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()\ncnt = 0\nfor i in range(2, len(s) - 1):\n if s[i] == \'C\':\n cnt += 1\ns.replace(\'A\', \'\', 1)\ns.replace(\'C\', \'\', 1)\nif not s.islower():\n print("WA")\n exit()\nif cnt != 1:\n print("WA")\nelse:\n print("AC")\n', 's = input()\nif s[0] != \'A\':\n print("WA")\n exit()\ncnt = 0\nfor i in range(2, len(s) - 1):\n if s[i] == \'C\':\n cnt += 1\ns = s.replace(\'A\', \'\', 1)\ns = s.replace(\'C\', \'\', 1)\nif not s.islower():\n print("WA")\n exit()\nif cnt != 1:\n print("WA")\nelse:\n print("AC")\n'] | ['Wrong Answer', 'Accepted'] | ['s324049481', 's404786553'] | [3064.0, 3060.0] | [17.0, 17.0] | [273, 281] |
p03289 | u451965785 | 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 S1 = "a"+S[1:]\n if S[2] == "C":\n S2 = S1[:2]+"c"+S1[3:]\n if S2.islower():\n print("AC")\n else:\n print("WA")\n \n if S[-2] == "C":\n S2 = S1[:-2]+"c"+S1[-1]\n if S2.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")\n', 'S = str(input())\n\nif S == "AccccCcccc":\n print(\'AC\')\n \nelif S[0] == "A":\n S1 = "a"+S[1:]\n if S[2] == "C":\n S2 = S1[:2]+"c"+S1[3:]\n if S2.islower():\n print("AC")\n else:\n print("WA")\n\n elif S[-2] == "C":\n S2 = S1[:-2]+"c"+S1[-1]\n if S2.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\n\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s523455081', 's361703280'] | [9120.0, 9064.0] | [30.0, 28.0] | [396, 432] |
p03289 | u453526259 | 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 = input()\n\nresult = "AC"\nif n[0] != "A":\n result = "WA"\n print(result)\n quit()\n\ncarea = n[2:-1]\nccount = 0\nfor i in carea:\n if i == "C":\n ccount += 1\nif ccount >= 2 or ccount == 0:\n result = "WA"\n print(result)\n quit()\n\nfor i in carea:\n if i == "A":\n result = "WA"\n print(result)\n quit()\n\nif n[-1] == "C" or n[-1] == "A":\n result = "WA"\n print(result)\n quit()\n\nif n[1] == "C" or n[1] == "A":\n result = "WA"\n print(result)\n quit()\n\n\nfor i in n:\n if i.isupper() == True:\n if i != "A" or i != "C":\n result = "WA"\n print(result)\n quit()\n if i == "T":\n result = "WA"\n print(result)\n quit()\nprint(result)\n', 'n = input()\n\nresult = "AC"\nif n[0] != "A":\n result = "WA"\n print(result)\n quit()\n\ncarea = n[2:-1]\nccount = 0\nfor i in carea:\n if i == "C":\n ccount += 1\nif ccount >= 2 or ccount == 0:\n result = "WA"\n print(result)\n quit()\n\nfor i in carea:\n if i == "A":\n result = "WA"\n print(result)\n quit()\n\nif n[-1] == "C" or n[-1] == "A":\n result = "WA"\n print(result)\n quit()\n\nif n[1] == "C" or n[1] == "A":\n result = "WA"\n print(result)\n quit()\n\n\nfor i in n:\n if i.isupper() == True:\n if i not in "AC":\n result = "WA"\n print(result)\n quit()\nprint(result)\n'] | ['Wrong Answer', 'Accepted'] | ['s731706157', 's323633649'] | [3188.0, 3064.0] | [22.0, 17.0] | [934, 791] |
p03289 | u454255725 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["S = input()\n\na = S.find('A')\n\ns1 = S[2:-1]\ns_count = s1.count('C')\n\nif a != 0:\n return False\n\nif s_count != 1:\n return False\n\nc = s1.find('C')\n\ny = S[1:c-1]\nz = S[c+1:]\n\n\nif y.islower() and z.islower:\n print('AC')\nelse:\n print('WA')\n", "S = input()\n \na = S.find('A')\nc = S.find('C')\n \ns1 = S[2:-1]\ns_count = s1.count('C')\n \ny = S[1:c-1]\nz = S[c+1:]\n\nif c == 2:\n\ty = S[1] \n\nif a != 0:\n\tprint('WA')\n\nelif s_count != 1:\n\tprint('WA')\n \nelse:\n\tif y.islower() and z.islower():\n\t\t\tprint('AC')\n\telse:\n\t\tprint('WA')"] | ['Runtime Error', 'Accepted'] | ['s298615329', 's031402062'] | [3060.0, 3064.0] | [17.0, 17.0] | [237, 285] |
p03289 | u455317716 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['S = input()\nprint(S[2:-1])\nif S[0] == "A":\n if "C" in S[2:-1] and S[2:-1].find("C") == S[2:-1].rfind("C"):\n S = S.replace("A","a",1)\n S = S.replace("C","c",1)\n if S == S.lower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', 'S = input()\nif S[0] == "A":\n if "C" in S[2:-1] and S[2:-1].find("C") == S[2:-1].rfind("C"):\n S = S.replace("A","a",1)\n S = S.replace("C","c",1)\n if S == S.lower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s808929705', 's719356570'] | [3060.0, 3060.0] | [17.0, 17.0] | [316, 301] |
p03289 | u457329691 | 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\nS = 'Atcoder'\n\ncond = False\n\nif S[0] == 'A':\n if S[2:-1].count('C') == 1:\n cond = True\n for i, s in enumerate(S):\n if i == 0:\n continue\n if s.isupper():\n if s == 'C':\n if i < 2 or len(S)-2 < i:\n cond = False\n else:\n cond = False\n\nif cond:\n print('AC')\nelse:\n print('WA')\n", "S = input()\n\ncond = True\n\nif not S[0] == 'A':\n cond = False\n\nif not S[2:-1].count('C') == 1:\n cond = False\n\nfor i, s in enumerate(S):\n if i == 0:\n continue\n\n if s.isupper():\n if s == 'C':\n if i < 2 or len(S)-2 < i:\n cond = False\n else:\n cond = False\n\nif cond:\n print('AC')\nelse:\n print('WA')\n"] | ['Wrong Answer', 'Accepted'] | ['s265003193', 's879836239'] | [3060.0, 3060.0] | [17.0, 17.0] | [436, 368] |
p03289 | u460745860 | 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_cnt = 0\nif S[0] == \'A\' and S[1].islower() and S[-1].islower():\n temp = S[2:len(S)]\n if temp.count(\'C\') == 1:\n for t in temp:\n if t != "C" and t.isupper() == True:\n print("WA")\n exit()\n else:\n print("AC")\nprint("WA")\n', 'S = input()\nC_cnt = 0\nif S[0] == \'A\' and S[1].islower() and S[-1].islower():\n temp = S[2:len(S)]\n if temp.count(\'C\') == 1:\n for t in temp:\n if t != "C" and t.isupper() == True:\n print("WA")\n exit()\n else:\n print("AC")\n exit()\nprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s138676502', 's380085399'] | [9012.0, 8996.0] | [26.0, 26.0] | [302, 321] |
p03289 | u463775490 | 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()\nCcnt = 0\ncnt = 0\na = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nb = s[2:-1]\nprint(b)\nfor i in range(len(b)):\n if b[i] == 'C':\n Ccnt += 1\nfor i in range(len(s)):\n if s[i] in a:\n cnt += 1\nif s[0] == 'A' and Ccnt == 1 and cnt == 2:\n print('AC')\nelse:\n print('WA')", "s = input()\nCcnt = 0\ncnt = 0\na = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nb = s[2:-1]\nfor i in range(len(b)):\n if b[i] == 'C':\n Ccnt += 1\nfor i in range(len(s)):\n if s[i] in a:\n cnt += 1\nif s[0] == 'A' and Ccnt == 1 and cnt == 2:\n print('AC')\nelse:\n print('WA')"] | ['Wrong Answer', 'Accepted'] | ['s499696807', 's161636259'] | [3064.0, 3064.0] | [17.0, 18.0] | [284, 275] |
p03289 | u464032595 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['s_list = list(input())\ns_list1 = s_list\ncount = 0\n\nif s_list[0] == "A":\n del s_list[:2], s_list[-1]\n for i in range(len(s_list)):\n if s_list[i] == "C":\n count += 1\n isC = i + 2\n if count != 1:\n print("WA")\n else:\n del s_list1[isC]\n Str = "".join(s_list1)\n if Str.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 's_list = list(input())\n\nif s_list[0] == "A":\n del s_list[:2], s_list[-1]\n print(s_list)\n Str = "".join(s_list)\n if Str.count("C") != 1:\n print("WA")\n else:\n Str = Str.replace("C", "")\n if Str.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 's_list = list(input())\ns_list1 = s_list\n\nif s_list[0] == "A":\n del s_list[:2], s_list[-1]\n Str = "".join(s_list)\n if Str.count("C") != 1:\n print("WA")\n else:\n Str = "".join(s_list1)\n Str = Str.replace("C", "")\n if Str1.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 'S = list(input())\ncnt = 0\nif S[0] == "A":\n cnt += 1\n del S[0]\nif "C" in S[1:-1]:\n cnt += 1\n S.remove("C")\nif "C" in S[1:-1]:\n cnt -= 1\n S.remove("C")\nif ("".join(S)).islower():\n cnt += 1\nif cnt == 3:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s537369668', 's793168198', 's835510791', 's275961799'] | [3064.0, 3060.0, 3060.0, 3064.0] | [17.0, 17.0, 18.0, 18.0] | [426, 322, 353, 242] |
p03289 | u464823755 | 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\nif S[0]!='A':\n print('WA')\n return\nS.lower(0)\nfor i in range(3,len(S)-1):\n if S[i]=='C':\n count+=1\n S.lower(i)\nif count==1 && S.islower():\n print('AC')", 's = input()\nflag = False\n\nif s[0]=="A":\n\tif s[2:-1].count("C")==1:\n\t\tif (s[1:s.index("C")].islower() and s[s.index("C")+1:].islower()):\n\t\t\tflag = True\nprint("AC" if flag else "WA")\n'] | ['Runtime Error', 'Accepted'] | ['s200815251', 's795970156'] | [8928.0, 8956.0] | [27.0, 25.0] | [180, 181] |
p03289 | u465284486 | 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\nprint(S[2:-1])\nif S[0] == "A":\n if S[2:-1].count("C") == 1:\n idx = S.index("C")\n for i, s in enumerate(S):\n if s.isupper():\n if (i == 0) or (i == idx):\n continue\n else:\n print("WA")\n exit()\n print("AC")\n exit()\nprint("WA")\n', 'S = list(input())\n\nif S[0] == "A":\n if S[2:-1].count("C") == 1:\n idx = S.index("C")\n for i, s in enumerate(S):\n if s.isupper():\n if (i == 0) or (i == idx):\n continue\n else:\n print("WA")\n exit()\n print("AC")\n exit()\nprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s683141035', 's180270791'] | [3060.0, 2940.0] | [17.0, 17.0] | [371, 356] |
p03289 | u466331465 | 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. | ['for i in range(len(S)):\n if i==0 and S[i]!="A":\n print("WA")\n exit()\n if 2<=i<=len(S)-2 and S[i]=="C":\n cnt+=1\n if cnt>1:\n print("WA")\n exit()\n if 1<=i<=len(S)-1:\n if S[i]!="C" and S[i].isupper():\n print("WA")\n exit()\nprint("AC")', 'S = input()\ncnt = 0\nfor i in range(len(S)):\n if i==0 and S[i]!="A":\n print("WA")\n exit()\n if 2<=i<=len(i)-2 and S[i]=="C":\n cnt+=1\n if cnt>1:\n print("WA")\n exit()\n if 1<=i<=len(i)-1:\n if S[i]!="C" and S[i].isupper():\n print("WA")\n exit()\nprint("AC")\n ', 'S = input()\ncnt = 0\nfor i in range(len(S)):\n if i==0 and S[i]!="A":\n print("WA")\n exit()\n if 2<=i<=len(S)-2 and S[i]=="C":\n cnt+=1\n if cnt>1:\n print("WA")\n exit()\n if 1<=i<=len(S)-1:\n if S[i]!="C" and S[i].isupper():\n print("WA")\n exit()\nif cnt<1:\n print("WA")\n exit()\nprint("AC")\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s730220187', 's861772107', 's401983475'] | [3064.0, 3060.0, 3064.0] | [17.0, 18.0, 17.0] | [267, 292, 321] |
p03289 | u468313559 | 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. | ['if inp.startswith("A") and inp[2:len(inp)-1].count("C") == 1 and inp[1:inp.find("C", 0, len(inp) - 1)] == inp[1:inp.find("C", 0, len(inp) - 1)].lower() and inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)] == inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)].lower():\n print("AC")\nelse:\n print("WA")', 'inp = input()\n\n#print(inp.startswith("A"))\n#print(inp[2:len(inp)-1].count("C") == 1)\n\n\n\nif inp.startswith("A") and inp[2:len(inp)-1].count("C") == 1 and inp[1:inp.find("C", 0, len(inp) - 1)] == inp[1:inp.find("C", 0, len(inp) - 1)].lower() and inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)] == inp[inp.find("C", 0, len(inp) - 1) + 1:len(inp)].lower():\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s328084830', 's607983270'] | [3064.0, 3064.0] | [17.0, 17.0] | [300, 599] |
p03289 | u469063372 | 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()\ns = [c for c in s]\nflg = False\nif s[0] == 'A':\n if s[2:-1].count('C') == 1:\n if s.count('C') == 1:\n s.remove('A')\n s.remove('C')\n print(s)\n for c in s:\n if not c.islower():\n flg = False\n break\n flg = True\nprint('AC' if flg else 'WA')", "import sys\ns = input()\ns = [c for c in s]\nflg = False\nif s[0] == 'A':\n if s[2:-1].count('C') == 1:\n if s.count('C') == 1:\n s.remove('A')\n s.remove('C')\n for c in s:\n if not c.islower():\n flg = False\n break\n flg = True\nprint('AC' if flg else 'WA')"] | ['Wrong Answer', 'Accepted'] | ['s963760100', 's478760382'] | [3060.0, 3060.0] | [17.0, 17.0] | [378, 357] |
p03289 | u470735879 | 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 index = s.find(\'C\', 2, -1)\n if index == 1:\n s = s.replace(s[index], \'\')\n if s[1:].islower():\n print(\'AC\')\n else:\n print(\'WA\')\n else:\n print(\'WA\')\nelse:\n print("WA")', 's = input()\n\nif s[0] == \'A\':\n index = s.find(\'C\', 2, -1)\n s = s[:index] + s[index + 1:]\n if index > 0:\n if s[1:].islower():\n print(\'AC\')\n else:\n print(\'WA\')\n else:\n print(\'WA\')\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s057510122', 's672134724'] | [3060.0, 3060.0] | [17.0, 17.0] | [256, 253] |
p03289 | u474925961 | 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\nif sys.platform ==\'ios\':\n sys.stdin=open(\'input_file.txt\')\n\n\nS=input()\n\nif S[0]=="A" and S[2]=="C" and S[1].islower() and S[:3].islower():\n\tprint("AC")\nelse:\n\tprint("WA")\n\t', 'import sys\n\nif sys.platform ==\'ios\':\n sys.stdin=open(\'input_file.txt\')\n\n\nS=input()\n\nif S[0]=="A" and "C" in S[2:-1] and S[1:].replace("C","c",1).islower():\n\tprint("AC")\nelse:\n\tprint("WA")\n\t'] | ['Wrong Answer', 'Accepted'] | ['s544159254', 's702501145'] | [2940.0, 3060.0] | [17.0, 20.0] | [187, 192] |
p03289 | u475675023 | 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())\nflag=0\nCcount=0\nLcount=0\nCnumber=-1\nif S[0]=="A":\n flag+=1\n del S[0]\nif S.count("C")==1:\n flag+=1\n del S[Cnumber]\nN=len(S)\nif S[0:].islower():\n flag+=1\nif flag==3:\n print("AC")\nelse:\n print("WA")', 'S=list(input())\nflag=0\nCcount=0\nCnumber=0\nif S[0]=="A":\n flag+=1\nif S[2:-1].count("C")==1:\n flag+=1\n del S[0]\n S.remove("C")\nif str(S).islower():\n flag+=1\nif flag==3:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s554028054', 's928343143'] | [3064.0, 3064.0] | [17.0, 18.0] | [218, 205] |
p03289 | u480300350 | 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. | ['(let ((s (read-line)))\n (princ (if (and (char= (char s 0) #\\A)\n (= 1 (count #\\C s :start 2 :end (- (length s) 1) :test #\'char=))\n (not (some \n "AC"\n "WA")))', '#!/usr/bin/env python3\n\nimport sys\n# import math\n# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits\n# import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)\n# from operator import itemgetter # itemgetter(1), itemgetter(\'key\')\n\n# from collections import defaultdict # subclass of dict. defaultdict(facroty)\n# from collections import Counter # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)\n# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).\n# from heapq import nlargest, nsmallest # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).\n# from itertools import count, cycle, repeat # count(start[,step]), cycle(iter), repeat(elm[,n])\n# from itertools import groupby # [(k, list(g)) for k, g in groupby(\'000112\')] returns [(\'0\',[\'0\',\'0\',\'0\']), (\'1\',[\'1\',\'1\']), (\'2\',[\'2\'])]\n# from itertools import starmap # starmap(pow, [[2,5], [3,2]]) returns [32, 9]\n# from itertools import product, permutations # product(iter, repeat=n), permutations(iter[,r])\n# from itertools import combinations, combinations_with_replacement\n# from itertools import accumulate # accumulate(iter[, f])\n# from functools import reduce # reduce(f, iter[, init])\n# from functools import lru_cache # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)\n# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).\n# from copy import deepcopy # to copy multi-dimentional matrix without reference\n# from fractions import gcd # for Python 3.4 (previous contest @AtCoder)\n\n\ndef main():\n mod = 1000000007 # 10^9+7\n inf = float(\'inf\') # sys.float_info.max = 1.79...e+308\n # inf = 2 ** 64 - 1 # (for fast JIT compile in PyPy) 1.84...e+19\n sys.setrecursionlimit(10**6) # 1000 -> 1000000\n def input(): return sys.stdin.readline().rstrip()\n def ii(): return int(input())\n def mi(): return map(int, input().split())\n def mi_0(): return map(lambda x: int(x)-1, input().split())\n def lmi(): return list(map(int, input().split()))\n def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))\n def li(): return list(input())\n \n \n s = input()\n if s[0] == \'A\' and s[2:-1].count(\'C\') == 1:\n for char in s:\n if not (char == \'A\' or char == \'C\' or char.islower()):\n break\n else:\n print(\'AC\')\n exit()\n print(\'WA\')\n\n\n\nif __name__ == "__main__":\n main()\n'] | ['Runtime Error', 'Accepted'] | ['s343941337', 's753725132'] | [2940.0, 3064.0] | [17.0, 17.0] | [249, 3111] |
p03289 | u480847874 | 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 m():\n s = str(input())\n if s[0] != "A":\n return "WA"\n if s.count("C") != 1:\n return "WA"\n if s[2] != "C" or s[-2] != "C":\n return "WA"\n for c in s[1:]:\n if c == "C":\n continue\n if c.isupper():\n return "WA"\n return "AC"\n\n\nprint(m())\n', 'def m():\n s = str(input())\n if s[0] != "A":\n return "WA"\n if s[2:len(s)-1].count("C") != 1:\n return "WA"\n for c in s[1:]:\n if c == "C":\n continue\n if c.isupper():\n return "WA"\n return "AC"\n\n\nprint(m())\n'] | ['Wrong Answer', 'Accepted'] | ['s064827919', 's921162221'] | [3060.0, 2940.0] | [19.0, 18.0] | [311, 267] |
p03289 | u484216426 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['import sys\ns = input("")\n\ncount_c = 0\n\nif(s[0] == "A"):\n for i in range(1, len(s)):\n if(s[i]=="C" and i >= 2 and i <= len(s)-2):\n count_c += 1\n elif(i.isupper):\n print("WA")\n sys.exit()\n \n \n if(count_c != 1):\n print("WA")\n else:\n print("AC")\nelse:\n print("WA")', 'import sys\ns = input("")\n\ncount_c = 0\n\nif(s[0] == "A"):\n for i in range(1, len(s)):\n\n if(s[i]=="C" and i >= 2 and i <= len(s)-2):\n count_c += 1\n elif(s[i].isupper()):\n print("WA")\n sys.exit()\n \n \n if(count_c != 1):\n print("WA")\n else:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s065572342', 's740633582'] | [3060.0, 3060.0] | [20.0, 17.0] | [351, 357] |
p03289 | u485716382 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["def main():\n s = list(input())\n\n print(s)\n\n if s[0] != 'A':\n print('WA')\n return\n\n C_counter = 0\n for n in s[2:-1]: \n if n == 'C':\n C_counter += 1\n\n if C_counter != 1:\n print('WA')\n return\n\n for n in s:\n if n == 'A' or n == 'C':\n continue\n if not n.islower():\n print('WA')\n return\n print('AC')\n return\n\n\n\n\nmain()", "def main():\n s = list(input())\n\n if s[0] != 'A':\n print('WA')\n return\n\n C_counter = 0\n for n in s[2:-1]: \n if n == 'C':\n C_counter += 1\n\n if C_counter != 1:\n print('WA')\n return\n\n for n in s:\n if n == 'A' or n == 'C':\n continue\n if not n.islower():\n print('WA')\n return\n print('AC')\n return\n\n\n\n\nmain()"] | ['Wrong Answer', 'Accepted'] | ['s756379708', 's465684844'] | [3060.0, 3060.0] | [18.0, 19.0] | [365, 353] |
p03289 | u492447501 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['import sys\nS = input()\n\n\nif S[0] == "A":\n C = S[2:-1]\n count = 0\n for c in C:\n if c == "C":\n count = count + 1\n if count==2:\n print("WA")\n sys.exit()\n if count==0:\n print("WA")\n sys.exit()\n S = S[1:]\n\n for s in S:\n if (ord("z") >= ord(s) and ord("a") <= ord(s)):\n continue\n elif s=="C":\n continue\n else:\n print("WA")\n sys.exit()\n print("AC")\nprint("WA")\n', 'import sys\nS = input()\n\n\nif S[0] == "A":\n C = S[2:-1]\n count = 0\n for c in C:\n if c == "C":\n count = count + 1\n if count==2:\n print("WA")\n sys.exit()\n if count==0:\n print("WA")\n sys.exit()\n S = S[1:]\n\n for s in S:\n if (ord("z") >= ord(s) and ord("a") <= ord(s)):\n continue\n elif s=="C":\n continue\n else:\n print("WA")\n sys.exit()\n print("AC")\n sys.exit()\nprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s668697378', 's623315806'] | [3064.0, 3064.0] | [17.0, 17.0] | [501, 516] |
p03289 | u497046426 | 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\nflag = True\n\nif S[0] != \'A\':\n flag = False\n\nidx = None\nfor i, s in enumerate(S[3:-1]):\n if s == \'C\':\n if idx == None:\n idx = i + 3\n else:\n flag = False\n\nfor i, s in enumerate(S):\n if i == 0 or i == idx:\n continue\n\n if s != s.lower():\n flag = False\n\nif flag:\n print("AC")\nelse:\n print("WA")', 'S = input()\n\nflag = True\n\nif S[0] != \'A\':\n flag = False\n\nidx = None\nfor i, s in enumerate(S[2:-1]):\n if s == \'C\':\n if idx == None:\n idx = i + 2\n else:\n flag = False\n\nif idx == None:\n flag = False\n\nfor i, s in enumerate(S):\n if i == 0 or i == idx:\n continue\n\n if s != s.lower():\n flag = False\n\nif flag:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s216739662', 's722837704'] | [3064.0, 3064.0] | [17.0, 17.0] | [370, 404] |
p03289 | u497883442 | 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()\nn = len(s)\nc = False\nfor e,i in enumerate(s):\n if e == 0:\n if not i == "A":\n print("WA")\n break\n elif 2 < e < n-2 and i == "C":\n if not c:\n c = True\n else:\n print("WA")\n break\n else:\n if not i in "abcdefghijklmnopqrstuvwxyz":\n print("WA")\n break\nelse:\n if c:\n print("AC")\n else:\n print("WA")', 's = input()\nn = len(s)\nc = False\nfor e,i in enumerate(s):\n if e == 0:\n if not i == "A":\n print("WA")\n break\n elif 2 < e < n-1 and i == "C":\n if not c:\n c = True\n else:\n print("WA")\n break\n else:\n if not i in "abcdefghijklmnopqrstuvwxyz":\n print("WA")\n break\nelse:\n if c:\n print("AC")\n else:\n print("WA")', 's = input()\nn = len(s)\nc = False\nfor e,i in enumerate(s):\n if e == 0:\n if not i == "A":\n print("WA")\n break\n elif 1 < e < n-1 and i == "C":\n if not c:\n c = True\n else:\n print("WA")\n break\n else:\n if not i in "abcdefghijklmnopqrstuvwxyz":\n print("WA")\n break\nelse:\n if c:\n print("AC")\n else:\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s578604731', 's807697329', 's978336284'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 18.0] | [437, 437, 437] |
p03289 | u502486340 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['def main():\n S = input()\n flag1 = (S[0] == \'A\')\n flag2 = (S[2:-1].count(\'C\') == 1)\n flag3 = (S.replace(\'A\', \'\').replace(\'C\', \'\').lower()\n == S.replace(\'A\', \'\').replace(\'C\', \'\'))\n\n print(flag1, flag2, flag3)\n if flag1 and flag2 and flag3:\n print(\'AC\')\n else:\n print(\'WA\')\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n S = input()\n flag1 = (S[0] == \'A\')\n flag2 = (S[2:-1].count(\'C\') == 1)\n flag3 = (S.replace(\'A\', \'\').replace(\'C\', \'\').lower()\n == S.replace(\'A\', \'\').replace(\'C\', \'\'))\n\n if flag1 and flag2 and flag3:\n print(\'AC\')\n else:\n print(\'WA\')\n\n\nif __name__ == "__main__":\n main()\n'] | ['Wrong Answer', 'Accepted'] | ['s027854780', 's427441806'] | [3188.0, 2940.0] | [19.0, 18.0] | [332, 303] |
p03289 | u503111914 | 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("WA" if re.match(\'A[a-z][a-z][a-z]*C[a-z]*[a-z]\',input()) == None else "AC")', 'import re\nprint("WA" if re.match(\'^A[a-z]+C[a-z]+$\',input()) == None else "AC")'] | ['Wrong Answer', 'Accepted'] | ['s150431941', 's708718171'] | [3188.0, 3188.0] | [19.0, 19.0] | [92, 79] |
p03289 | u503901534 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['s = str(input())\nif s[1] = "A" and [s[3], s[-2] ].count("C") == 1 :\n s[1] = a\n s[3] = a\n s[-2] = a\n a = ""\n for i in s:\n a = a + s\n if a.islower() :\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 's = str(input())\nif s[1] == "A" and [s[3], s[-2] ].count("C") == 1 :\n s[1] = a\n s[3] = a\n s[-2] = a\n a = ""\n for i in s:\n a = a + s\n if a.islower() :\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 'ss = str(input())\ns = list(ss)\n\nif s[0] == "A" and s.count("A") == 1:\n checklist = []\n for i in range(2,len(s)-1):\n checklist.append(s[i])\n \n if checklist.count("C") == 1:\n s.remove("A")\n s.remove("C")\n p = ""\n for i in s:\n p = p + i\n if p.islower():\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s315852833', 's483905939', 's655758427'] | [2940.0, 3064.0, 3064.0] | [20.0, 19.0, 18.0] | [245, 246, 433] |
p03289 | u505420467 | 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 print("WA")\n sys.exit()\nelse:\n s.remove("A")\nx=s[1:-1]\nif x.count(\'C\')==1:\n s.remove(\'C\')\nelse:\n print("WA")\n sys.exit()\na=\'\'.join(s)\nprint(["WA","YES"][a.islower()])\n', 's=input()\nprint(["WA","AC"][s[0]==\'A\' and s[1]!=\'C\' and s[2:-1].count(\'C\')==1 and s[1:].replace(\'C\',\'\').islower()])\n'] | ['Wrong Answer', 'Accepted'] | ['s241074823', 's924315484'] | [3060.0, 2940.0] | [18.0, 18.0] | [227, 116] |
p03289 | u512138205 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["s = input()\n\nif s[0] != 'A':\n print('WA')\n exit(0)\n\ncnt = 0\ni = 0\nfor j, c in enumerate(s):\n if j <= 1 or j == len(s) - 1:\n continue\n print(c)\n if c == 'C':\n cnt += 1\n if cnt == 2:\n print('WA')\n exit(0)\n i = j\nif cnt == 0:\n print('WA')\n exit(0)\n\nfor j, c in enumerate(s):\n if j == 0 or j == i:\n continue\n if str(c).isupper():\n print('WA')\n exit(0)\n\nprint('AC')\n", "s = input()\n\nif s[0] != 'A':\n print('WA')\n exit(0)\n\ncnt = 0\ni = 0\nfor j, c in enumerate(s):\n if j <= 1 or j == len(s) - 1:\n continue\n if c == 'C':\n cnt += 1\n if cnt == 2:\n print('WA')\n exit(0)\n i = j\nif cnt == 0:\n print('WA')\n exit(0)\n\nfor j, c in enumerate(s):\n if j == 0 or j == i:\n continue\n if str(c).isupper():\n print('WA')\n exit(0)\n\nprint('AC')\n"] | ['Wrong Answer', 'Accepted'] | ['s595600758', 's535044821'] | [3064.0, 3064.0] | [17.0, 17.0] | [459, 446] |
p03289 | u514118270 | 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. | ["R=int(input())\nif R<1200:S='B'\nelif R<2800:S='R'\nelse:S='G'\nprint('A'+S+'C')", "S = list(input())\nif S[0] != 'A':\n print('WA')\n exit()\nS[0] = 'a'\nif S.count('C') != 1:\n print('WA')\n exit()\ni = S.index('C')\nif i == 1 or i == len(S)-1:\n print('WA')\n exit()\nS[S.index('C')] = 'c'\nif ''.join(S) == ''.join(S).lower():\n print('AC')\nelse:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s983290209', 's555045710'] | [9104.0, 3064.0] | [22.0, 17.0] | [76, 289] |
p03289 | u514383727 | 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()\nif s[1].isupper():\n print("WA")\n exit()\nif s[-1].isupper() or s[-1] == "C":\n print("WA")\n exit()\nflag = False\nfor c in s[3:]:\n if c == "C":\n if flag:\n print("WA")\n exit()\n else:\n flag = True\n if c.isupper():\n print("WA")\n exit()\nif flag:\n print("AC")\nelse:\n print("WA")', 's = input()\nif s[0] != "A":\n print("WA")\n exit()\nif s[1].isupper():\n print("WA")\n exit()\nif s[-1].isupper() or s[-1] == "C":\n print("WA")\n exit()\nflag = False\nfor c in s[2:]:\n if c == "C":\n if flag:\n print("WA")\n exit()\n else:\n flag = True\n else:\n if c.isupper():\n print("WA")\n exit()\nif flag:\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s246077725', 's707118184'] | [3064.0, 3064.0] | [18.0, 18.0] | [409, 432] |
p03289 | u515952036 | 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()\na = False\nb = False\nc = False\ncnt = 0\nk = 0\n\nif s[0] == \'A\':\n\ta = True\n\nfor c in range(s[2],s[-1]):\n\tif c == \'C\':\n\t\tcnt += 1\nif cnt == 1:\n\tb = True\n\nfor c in s:\n\tif c != \'A\' or c != \'C\':\n\t\tif c.islower() == True:\n\t\t\tk += 1\n\nif k == s.length():\n\tc = True\n\n\nif a == b == c == True:\n\tprint("AC")\nelse:\n\tprint("WC")', "s = input()\ntext = s[2:-1]\nr = s.replace('A', '')\nr = r.replace('C', '')\n\nif s[0] != 'A' or text.count('C') != 1 or r != r.lower():\n print('WA')\nelse:\n\tprint('AC')"] | ['Runtime Error', 'Accepted'] | ['s635115940', 's256752575'] | [3064.0, 2940.0] | [19.0, 17.0] | [323, 166] |
p03289 | u518556834 | 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()\nsa = s.find("A")\nsc = s.find("C")\nscr = s.rfind("C")\nif sa == 0 and sc == scr and 2 <= sc <= len(s) -3:\n print("Yes")\nelse:\n print("No")\n', 's = input()\nif s[0] == "A" and s[2:-1] in "C":\n i = s.index("C")\n ss = s[1:i] + s[i+i:]\n if ss.islower():\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 's = input()\nsa = s.index("A")\nsc = s.index("C")\nscr = s.rindex("C")\nif sa == 1 and sc == scr and 2 <= sc <= len(s) - 3', 's = input()\nif s[0] == "A" and s[2:-1] in "C":\n i = s.index("C")\n ss = s[1:i] + s[i+i:]\n if ss.islower() == True:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")\n', 's = input()\nif s[0] == "A" and s[2:-1].count("C") == 1:\n i = s.index("C")\n ss = s[1:i] + s[i+1:]\n if ss.islower() == True:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s313498738', 's480466376', 's561989970', 's762006038', 's747908501'] | [2940.0, 3064.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 18.0, 18.0] | [151, 168, 118, 177, 185] |
p03289 | u519003353 | 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. | ['words = input()\nif words.startswith(\'A\') and (words.find("C") >= 2) and not words.endswith("C") and words.count(\'C\') == 1:\n w1 = words.strip("AC")\n if w1.islower():\n print(\'AC\')\n else:\n print("WA")\nelse:\n print("WA")', 'words = input()\nif words.startswith(\'A\') and words.find(\'C\') >= 2 and not words.endswith("C") and words.count(\'C\') == 1:\n w1 = words.strip("A")\n w2 = w1.replace("C","c")\n if w2.islower():\n print(\'AC\')\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s654834287', 's051816416'] | [2940.0, 3060.0] | [17.0, 17.0] | [242, 268] |
p03289 | u519452411 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["import re\n\nS = input()\n\nif S[0] != 'A':\n print('WA')\n exit()\n\nif S[2:-1].count('C') != 1:\n print('WA')\n exit()\n\nif re.match(r'A[a-z]+C[a-z]+', S) == None:\n print('WA')\n exit()\n", "import re\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\nif re.match(r'A[a-z]+C[a-z]+\\Z', S) == None:\n print('WA')\n exit()\n\nprint('AC')\n"] | ['Wrong Answer', 'Accepted'] | ['s594091981', 's564742315'] | [3188.0, 3188.0] | [20.0, 19.0] | [182, 197] |
p03289 | u519939795 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["s=(input())\nk=s[2:-1]\nm=k.replace('C', 'c',1)\nprint(k)\nprint(m)\nif k.count('C')==1 and s[0]=='A' and m==k.lower():\n print('AC')\nelse:\n print('WA')", "s = input()\nif s[0]=='A' and 'C' in s[2:-1]:\n s = s.replace('A','',1).replace('C','',1)\n if s == s.lower():\n exit(print('AC'))\nprint('WA')"] | ['Wrong Answer', 'Accepted'] | ['s245083820', 's970005462'] | [2940.0, 2940.0] | [18.0, 18.0] | [152, 151] |
p03289 | u523986442 | 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. | ['word = input()\nresult="AC"\nccount = 0\nfor i, c in enumerate(word):\n if c.islower():\n continue\n if c == \'A\' and i == 0:\n continue\n if c == \'C\' and i > 2 and i < len(word) - 3 and ccount == 0:\n ccount = 1\n continue\n result = "WA"\n break\nif ccount == 0:\n result = "WA"\nprint(result)\n', 'word = input()\n\nif word[0] != \'A\':\n print("WA")\n exit()\n\nresult="AC"\nccount = 0\nfor i, c in enumerate(word[1:], 1):\n if c.islower():\n continue\n if c == \'C\' and i > 1 and i < len(word) - 1:\n ccount += 1\n continue\n result = "WA"\n break\nif ccount != 1:\n result = "WA"\nprint(result)\n'] | ['Wrong Answer', 'Accepted'] | ['s170226982', 's327249545'] | [3060.0, 3060.0] | [17.0, 17.0] | [326, 321] |
p03289 | u527042816 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['def main():\n S = input()\n judge = True\n if S[0] == "A":\n S[0] = S[0].lower()\n else:\n judge = False\n if S[1] == "C":\n judge = False\n if S[2:-2].count("C") == 1:\n for n, i in enumerate(S):\n if 2 <= n <= len(S) - 1:\n if i == "C":\n S[n] = S[n].lower()\n else:\n judge = False\n if S[-1] == "C":\n judge = False\n if S.islower() == False:\n judge = False\n if judge:\n print("AC")\n else:\n print("WA")\n\n\nif __name__ == \'__main__\':\n main()\n', '#!/usr/bin/env python3\n\n\ndef main():\n S = input()\n judge = 0\n t = S\n if S[0] == "A":\n judge += 1\n S[0] = S[0].lower()\n else:\n print("WA")\n exit()\n if S[1] == "C":\n print("WA")\n exit()\n if S[2:-2].count("C") == 1:\n judge += 1\n for n, i in enumerate(S[2:-2]):\n n += 3\n if i == "C":\n S[n] = S[n].lower()\n else:\n print("WA")\n exit()\n if S[-1] == "C":\n print("WA")\n exit()\n if S.islower():\n judge += 1\n else:\n print("WA")\n exit()\n if judge == 3:\n print("AC")\n else:\n print("WA")\n exit()\n\n\nif __name__ == \'__main__\':\n main()\n', '#!/usr/bin/env python3\n\n\ndef main():\n S = list(input())\n judge = True\n if S[0] == "A":\n S[0] = S[0].lower()\n else:\n judge = False\n if S[1] == "C":\n judge = False\n if S[2:-1].count("C") == 1:\n for n, i in enumerate(S):\n if 2 <= n <= len(S) - 1:\n if i == "C":\n S[n] = S[n].lower()\n else:\n judge = False\n if S[-1] == "C":\n judge = False\n S = "".join(S)\n if S.islower() == False:\n judge = False\n if judge:\n print("AC")\n else:\n print("WA")\n\n\nif __name__ == \'__main__\':\n main()\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s210632470', 's815254169', 's712944840'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 17.0] | [569, 724, 619] |
p03289 | u527420996 | 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 = s[2:-1]\ncount = 0\nq = [t[1]]\nfor i in range(len(t)):\n if t[i] == "C":\n count += 1\n else:\n q.append(t[i])\nq.append(t[-1])\nq = \'\'.join(q)\nif s[0] == "A" and count == 1 and str(q).lower ==q:\n print("AC")\nelse:\n print("WA")\n ', 's = input()\nt = s[2:-1]\ncount = 0\nq = [s[1]]\nfor i in range(len(t)):\n if t[i] == "C":\n count += 1\n else:\n q.append(t[i])\nq.append(s[-1])\nq =\'\'.join(q)\nif s[0] == "A" and count == 1 and str(q).lower() ==str(q):\n print("AC")\nelse:\n print("WA")\n '] | ['Runtime Error', 'Accepted'] | ['s976369273', 's920919685'] | [3064.0, 3060.0] | [17.0, 17.0] | [266, 272] |
p03289 | u529012223 | 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\n\nif S[0] == \'A\':\n count += 1\nif \'C\' in S[2:-1]:\n count += 1\nprint(S)\nS = S.replace("A", "")\nS = S.replace("C", "")\n\nif S.islower():\n count += 1\n\nif count == 3:\n print("AC")\nelse:\n print(\'WA\')', 'S = input()\ncount = 0\n\nif S[0] == \'A\':\n count += 1\nif S[2:-1].count("C") == 1:\n count += 1\nS = S.replace("C", "")\nS=S[1:]\nif S.islower():\n count += 1\n\nif count == 3:\n print("AC")\nelse:\n print(\'WA\')'] | ['Wrong Answer', 'Accepted'] | ['s181550130', 's239733546'] | [3064.0, 3060.0] | [18.0, 17.0] | [228, 212] |
p03289 | u531436689 | 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()\nsmalls = "abcdefghijklmnopqrstuvwxyz".split()\ndef solve(s):\n count = 0\n if s[0] != "A":\n return False\n if s[1] not\tin smalls:\n\treturn False\n for char in s[2:]:\n\tif char\tnot in smalls:\n return False\n\tif char\t== "C":\n count += 1\n if count !=\t1:\n\treturn False\n return True\n\nif solve(s):\n print("AC")\nelse:\n print("WA")\n\n', 's = input()\nsmalls = "abcdefghijklmnopqrstuvwxyz"\ndef solve(s):\n count = 0\n \n if s[0] != "A":\n return False\n \n if s[1] not in smalls:\n return False\n for char in s[2:-1]:\n if char == "C":\n count += 1\n continue\n \n if char not in smalls:\n return False\n if count != 1:\n return False\n if s[-1] not in smalls:\n\t return False\n return True\n \nif solve(s):\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s758478519', 's361883224'] | [2940.0, 3064.0] | [17.0, 18.0] | [382, 476] |
p03289 | u531813438 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['input_a = input()\nif input_a[0] != \'A\':\n print("WA")\nelif input_a.count(\'C\')==0:\n print("WA")\nelif input_a.count(\'C\')>1:\n print("WA")\nelif input_a.index(\'C\') ==1:\n print("WA")\nelif input_a.index(\'C\') ==len(input_a)-1:\n print(\'WA\')\nelif input_a.count(\'C\') ==1:\n if input_a.strip("A").strip(\'C\').islower():\n print(\'AC\')\n else:\n print(\'WA\')', 'input_a = input()\n\nif input_a[0]\u3000!= \'A\':\n print("WA")\nelif input_a.count(\'C\')==0:\n print("WA")\nelif input_a.count(\'C\')>1:\n print("WA")\nelif input_a.index(\'C\') ==1:\n print("WA")\nelif input_a.index(\'C\') ==len(input_a)-1:\n print(\'WA\')\nelif input_a.count(\'C\') ==1:\n if input_a.strip("A").strip(\'C\').islower():\n print(\'AC\')\n else:\n print(\'WA\')', 'input_a = input()\nif input_a[0] != \'A\':\n print("WA")\nelif input_a.count(\'C\')==0:\n print("WA")\nelif input_a.count(\'C\')>1:\n print("WA")\nelif input_a.index(\'C\') <=1:\n print("WA")\nelif input_a.index(\'C\') ==len(input_a)-1:\n print(\'WA\')\nelif input_a.count(\'C\') ==1:\n if input_a.replace(\'A\',\'a\').replace(\'C\',\'c\').islower():\n print(\'AC\')\n else:\n print(\'WA\')\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s108260674', 's804125085', 's219232452'] | [3060.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [372, 375, 385] |
p03289 | u533482278 | 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()\nb = a[2:-1]\nif a.startswith("A"):\n if b.count("C") == 1:\n c = list(a)\n c.remove("A")\n c.remove("C")\n print(c)\n for i in c:\n if i.isupper():\n break\n print("AC")\n exit()\nprint("WA")\n', 'a = input()\nb = a[2:-1]\nif a.startswith("A"):\n if b.count("C") == 1:\n c = list(a)\n c.remove("A")\n c.remove("C")\n for i in c:\n if i.isupper():\n print("WA")\n exit()\n print("AC")\n exit()\nprint("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s012614583', 's460923443'] | [3060.0, 2940.0] | [17.0, 17.0] | [270, 282] |
p03289 | u533885955 | 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)\nslist=list(S)\nflag=0\nif slist[0]!="A":\n flag=1\nklist=slist[2:-1]\nc=klist.count("C")\nif c!=1:\n flag=1\nif flag==0:\n print("AC")\nelse:\n print("WA")', 'S=str(input)\nslist=list(S)\nflag=0\nif slist[0]!="A":\n flag=1\nklist=slist[2:-1]\nc=klist.count("C")\nif c!=1:\n flag=1\ndel slist[0]\nif "C" in slist:\n slist.remove("C")\nSS=""\nfor x in slist:\n SS+=x\nif SS.islower():\n pass\nelse:\n flag=1\nif flag==0:\n print("AC")\nelse:\n print("WA")', 'S=str(input())\nslist=list(S)\nflag=0\nif slist[0]!="A":\n flag=1\nklist=slist[2:-1]\nc=klist.count("C")\nif c!=1:\n flag=1\ndel slist[0]\nif "C" in slist:\n slist.remove("C")\nSS=""\nfor x in slist:\n SS+=x\nif SS.islower():\n pass\nelse:\n flag=1\nif flag==0:\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s508591400', 's853894105', 's363463067'] | [3064.0, 3064.0, 3060.0] | [18.0, 18.0, 17.0] | [161, 280, 283] |
p03289 | u534953209 | 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. | ["R = int(input())\nif R < 1200:\n print('ABC')\nelif R < 2800:\n print('ARC')\nelse:\n print('AGC')\n", "S = input()\nflg = 0\nif S[0] == 'A':\n flg += 1\nif S[1].isupper():\n flg += 1000\nfor i in range(2, len(S)-1):\n if S[i] == 'C':\n flg += 10\n elif S[i].isupper():\n flg += 1000\nif S[-1].isupper():\n flg += 1000\nprint(flg)\nif flg == 11:\n print('AC')\nelse:\n print('WA')\n", "S = input()\nflg = 0\nif S[0] == 'A':\n flg += 1\nif S[1].isupper():\n flg += 1000\nfor i in range(2, len(S)-1):\n if S[i] == 'C':\n flg += 10\n elif S[i].isupper():\n flg += 1000\nif S[-1].isupper():\n flg += 1000\nif flg == 11:\n print('AC')\nelse:\n print('WA')\n"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s020270211', 's651327401', 's612380418'] | [2940.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0] | [102, 295, 284] |
p03289 | u537497369 | 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. | ["word = input('')\n\nans = 'WA'\n\n\nif (word[0] == 'A'):\n tmp = word[2:-1]\n number_c = 0\n for i in range(len(tmp)):\n if tmp[i] == 'C':\n number_c += 1\n serial_c = i+2 \n if number_c == 1:\n word_del = word[0:serial_c-1] + word[serial_c:]\n word_del = word_del[1:]\n \n if word_del.islower():\n ans = 'AC'\nprint(ans)", "word = input('')\n\nans = 'WA'\n\nif (word[0] == 'A'):\n tmp = word[2:-1]\n number_c = 0\n for i in range(len(tmp)):\n if tmp[i] == 'C':\n number_c += 1\n serial_c = i+2\n if number_c == 1:\n word_del = word[0:serial_c] + word[serial_c+1:]\n word_del = word_del[1:]\n \n if word_del.islower():\n ans = 'AC'\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s677559554', 's409594948'] | [3064.0, 3064.0] | [17.0, 17.0] | [394, 385] |
p03289 | u543894008 | 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\ncnt = 0\nfor c in s:\n if c.isupper() and c == "A":\n cnt = cnt + 1\n\nif cnt != 2:\n print("WA")\n exit()\n\nif not s[0].isupper():\n print("WA")\n exit()\n\nif s[2:len(s)-1].count("C") == 1:\n print("AC")\nelse:\n print("WA")', 's = input()\nif s[0] == "A" and "C" in s[2:-1] and s[1:].replace("C", "", 1).islower():\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s881564549', 's551477642'] | [3060.0, 2940.0] | [17.0, 17.0] | [252, 124] |
p03289 | u543954314 | 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())\nb = 0\nif s[0] == "A" and "C" in s[2:-2] and s.replace("A","",1).replace("C","",1).islower():\n print("AC")\nelse:\n print("WA")', 's = list(input())\nans = "AC"\nif s[0] != "A" or s.count("C") !=1 or s[2:-1].count("C") != 1 or \'\'.join([i for i in s if i != "A" and i != "C"]).islower != True:\n ans = "WA"\nprint(ans)', 's = input()\nb = 0\nif s[0] == "A" and "C" in s[2:-1] and s[1:].replace("C","",1).islower():\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s208404488', 's236388398', 's607308818'] | [3060.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0] | [148, 185, 128] |
p03289 | u546074985 | 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 = input()\nA = B\na = 0\nif S[0] == "A":\n if S[2:-2].count("C") == 1:\n if "C" in S[2:-2]:\n t = 2 + S[2:-2].index("C")\n S = str(S.lstrip("A"))\n S = str(S[0] + S[1:t-1] + S[t:])\n if S.islower():\n a = 1\nif a == 1:\n print("AC")\nelse:\n print("WA")\n S = S.replace("A", "")\n if S.islower():\n pass\n', 'S = input()\na = 0\nif S[0] == "A":\n if S.count("C") == 1:\n if S[2] == "C" or S[-2] == "C":\n S = str(S.replace("A", "", 1))\n S = str(S.replace("C", ""), 1)\n A = S.islower()\n if A == True:\n a = 1\nif a == 1:\n print("AC")\nelse:\n print("WA")\n', 'S = input()\nif S[0] == "A":\n print(S)\n if S[2] in "C" or S[-2] == "C":\n if not S[2] in "C" and S[-2] == "C":\n S = S.replace("C", "")\n S = S.replace("A", "")\n if S.islower() == True:\n print("AC")\n else:\n print("WA")\n exit()\n else:\n print("WA")\n exit()\n else:\n print("WA")\n exit()\nelse:\n print("WA")', 'S = input()\na = 0\nif S[0] == "A":\n if S.count("C") == 1:\n if S[2] == "C" or S[-2]:\n if S.islower():\n a = 1\nif a == 1:\n print("AC")\nelse:\n print("WA")\n', 'S = input()\na = 0\nif S[0] == "A":\n if S[2:-2].count("C") == 1:\n if "C" in S[2:-2]:\n S = str(S.replace("A", "", 1))\n S = str(S[0] + S[1:-2].replace("C", "", 1) + S[-2:])\n print(S)\n A = S.islower()\n if A == True:\n a = 1\nif a == 1:\n print("AC")\nelse:\n print("WA")\n', 'B = input()\nS = B\na = 0\nif S[0] == "A":\n if S[2:-1].count("C") == 1:\n if "C" in S[2:-1]:\n t = 2 + S[2:-1].index("C")\n S = str(S.lstrip("A"))\n S = str(S[0] + S[1:t-1] + S[t:])\n if S.islower():\n a = 1\nif a == 1:\n print("AC")\nelse:\n print("WA")'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s204469076', 's650886165', 's685265241', 's729813998', 's831091466', 's357443732'] | [3064.0, 3060.0, 3064.0, 3064.0, 3060.0, 3064.0] | [18.0, 18.0, 17.0, 18.0, 17.0, 17.0] | [377, 311, 456, 192, 347, 316] |
p03289 | u546853743 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["S=input()\nk=0\nif S[0]=='A':\n for i in range(2,-2):\n if S[i]=='C':\n k=i\n break\n if 'a'<=(S[1:k] and S[k:])<='z':\n print('AC')\n exit()\nprint('WA')\n ", "S=input()\nk=0\nif S[0]=='A':\n for i in range(3,-2):\n if S[i]=='C':\n k=i\n break\n if 'a'<=(S[1:k] and S[k:])<='z':\n print('AC')\n exit()\nprint('WA')\n ", "S=input()\nk=0\nz=0\ncnt=0\nif S[0]=='A':\n for i in range(2,len(S)-1):\n if S[i]=='C':\n k=i\n cnt += 1\n z=100\n if z==100 and cnt==1:\n for j in range(1,k):\n if 'a'<=S[j]<='z':\n z=200\n else:\n z=101\n if z==200 : \n for l in range(k+1,len(S)):\n if 'a'<=S[l]<='z':\n z=102\n else:\n z=101\nif z == 101 or 0 or 100:\n print('WA')\nelse:\n print('AC')", "S=input()\nk=0\nif S[0]=='A':\n for i in range(2,len(S)):\n if S[i]=='C':\n k=i\n break\n if 'a'<=(S[1:k] and S[k+1:])<='z':\n print('AC')\n exit()\nprint('WA')\n ", "S=input()\nk=0\nz=0\ncnt=0\nif S[0]=='A':\n for i in range(2,len(S)-1):\n if S[i]=='C':\n k=i\n cnt += 1\n z=100\n if z==100 and cnt==1:\n for j in range(1,k):\n if 'a'<=S[j]<='z':\n z=200\n else:\n print('WA')\n exit()\n if z==200 : \n for l in range(k+1,len(S)):\n if 'a'<=S[l]<='z':\n z=102\n else:\n print('WA')\n exit()\nif z == 0 or z==100:\n print('WA')\nelse:\n print('AC')"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s110783256', 's748904354', 's752365608', 's894501958', 's191794091'] | [8940.0, 8936.0, 8992.0, 9064.0, 9036.0] | [30.0, 26.0, 27.0, 22.0, 26.0] | [230, 230, 630, 236, 704] |
p03289 | u551692187 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["S = input()\nprint(S[0])\nprint(S[2:-1])\nprint(S[0] + S[1:-1] + S[-1:])\nprint(S[0] + S[1:-1].replace('C', 'c', 1) + S[-1:])\n\nif S[0] == 'A' and S[2:-1].count('C') == 1 and (S[1:-1].replace('C', 'c', 1) + S[-1:]).islower():\n print('AC')\nelse:\n print('WA')\n\n", "S = input()\n\nif S[0] == 'A' and S[2:-1].count('C') == 1 and (S[1:-1].replace('C', 'c', 1) + S[-1:]).islower():\n print('AC')\nelse:\n print('WA')\n\n"] | ['Wrong Answer', 'Accepted'] | ['s910519149', 's322400266'] | [3064.0, 2940.0] | [17.0, 17.0] | [260, 150] |
p03289 | u553055160 | 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. | ['line = input()\nWA_flag = 0\nC_flag = 0\ncheck_point = 0\n\nfor cnt, elm in enumerate(line):\n if cnt == 0:\n if elm != "A":\n WA_flag += 1\n if cnt > 1 and cnt < (len(line) - 2):\n if elm =="C":\n C_flag += 1\n check_point = cnt\n\nif C_flag != 1:\n WA_flag += 1\nelse:\n for cnt, elm in enumerate(line):\n if cnt != 1 and cnt != check_point:\n if elm.isupper():\n WA_flag += 1\n\nif WA_flag != 0:\n print("WA")\nelse:\n print("AC")', 'line = input()\nWA_flag = 0\nC_flag = 0\ncheck_point = 0\n\nfor cnt, elm in enumerate(line):\n if cnt == 0:\n if elm != "A":\n WA_flag += 1\n #print("A_wrong: " + elm)\n if cnt > 1 and cnt < (len(line) - 1):\n if elm =="C":\n C_flag += 1\n check_point = cnt\n\nif C_flag != 1:\n WA_flag += 1\n #print("C_num wrong: " + elm)\nelse:\n for cnt, elm in enumerate(line):\n if cnt != 0 and cnt != check_point:\n if elm.isupper():\n WA_flag += 1\n #print("upper_wrong: " + elm)\n\nif WA_flag != 0:\n print("WA")\nelse:\n print("AC")'] | ['Wrong Answer', 'Accepted'] | ['s262673569', 's455021406'] | [3064.0, 3064.0] | [18.0, 18.0] | [506, 624] |
p03289 | u556086333 | 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(str(input()))\n\nif S[0] == 'A':\n count_C = 0\n for ind in range(3-1, len(S)-1):\n if S[ind] == 'C':\n ind_C = ind\n count_C += 1\n if count_C == 1:\n del S[0]\n del S[ind_C]\n s = 'a'\n for i in S:\n s = s + i\n if S.islower():\n print('AC')\n exit()\nprint('WA')\n", "S = list(str(input()))\n\nif S[0] == 'A':\n count_C = 0\n for ind in range(3-1, len(S)-1):\n if S[ind] == 'C':\n ind_C = ind\n count_C += 1\n if count_C == 1:\n del S[0]\n del S[ind_C]\n S = 'a'\n for i in S:\n S = S + i\n if S.islower():\n exit()\nprint('WA')\n", "S = list(str(input()))\n\nif S[0] == 'A':\n count_C = 0\n for ind in range(3-1, len(S)-1):\n if S[ind] == 'C':\n ind_C = ind\n count_C += 1\n if count_C == 1:\n del S[0]\n del S[ind_C]\n s = 'a'\n for i in S:\n s = s + i\n if s.islower():\n print('AC')\n exit()\nprint('WA')\n", "S = list(str(input()))\n\nif S[0] == 'A':\n count_C = 0\n for ind in range(3-1, len(S)-1):\n if S[ind] == 'C':\n ind_C = ind\n count_C += 1\n if count_C == 1:\n del S[0]\n del S[ind_C - 1]\n s = 'a'\n for i in S:\n s = s + i\n if s.islower():\n print('AC')\n exit()\nprint('WA')\n"] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s343400840', 's743923449', 's933632634', 's779133568'] | [2940.0, 2940.0, 3060.0, 3060.0] | [18.0, 19.0, 17.0, 18.0] | [364, 340, 364, 368] |
p03289 | u556589653 | 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()\nA_list =["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]\nans_C = 0\nans_Big = 0\nif s[0] != "A":\n print("WA")\nelse:\n for i in range(2,(len(s)-1)):\n if s[i] == "C":\n ans_C += 1\n else:\n ans_C += 0\n for j in range(len(s)):\n if s[j] in A_list:\n ans_Big += 1\n else:\n ans_Big += 0\n if ans_C == 1 and ans_Big ==0:\n print("AC")\n else:\n print("WA")', 's = input()\nA_list =["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]\nans_C = 0\nans_Big = 0\nif s[0] != "A":\n print("WA")\nelse:\n for i in range(2,(len(s)-1)):\n if s[i] == "C":\n ans_C += 1\n else:\n ans_C += 0\n for j in range(len(s)):\n if s[j] in A_list:\n ans_Big += 1\n else:\n ans_Big += 0\n if ans_C == 1 and ans_Big == 0:\n print("AC")\n else:\n print("WA")', 'S = input()\nflag = 0\nflag_of_flag = 0\nnow = 0\nkomoji = 0\nk = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nif S[0] == "A":\n flag += 1\nfor i in range(2,len(S)-1):\n if S[i] == "C":\n now += 1\n elif S[i] in k:\n komoji += 1\nif now == 1:\n flag += 1\nif S[1] in k and S[len(S)-2] in k and S[len(S)-1] in k:\n komoji += 3\nif flag == 2:\n if komoji == len(S)-2:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")\n', 's = input()\ncount_C = 0\ncount_komoji = 0\nk = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nif s[0] == "A":\n for i in range(2,len(s)-1):\n if s[i] == "C":\n count_C += 1\n elif s[i] in k:\n count_komoji += 1\n if count_C == 1:\n if count_komoji == len(s)-2:\n if s[len(s)] in k:\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', 's = str(input())\nC_count = 0\na = 0\nb = 0\nc = 0\nk = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nif s[0] == "A":\n a += 1\nfor i in s[2:-1]:\n if i == "C":\n C_count += 1\nif C_count == 1:\n b += 1\n\nl = s[1:]\nl = l.replace("C","")\nif l.islower() == True:\n c += 1\nif a == 1 and b == 1 and c == 1:\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s095096512', 's172863752', 's539624319', 's929864516', 's484888342'] | [3064.0, 3064.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 18.0, 17.0] | [451, 450, 482, 480, 391] |
p03289 | u561083515 | 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 idx = S[2:-1].index("C") + 2\n S = S[1:idx] + S[idx+1:]\n if S == S.lower():\n print("AC")\n\nprint("WA")', 'S = input()\n\nif S[0] == "A":\n if S[2:-1].count("C") == 1:\n idx = S[2:-1].index("C") + 2\n S = S[1:idx] + S[idx+1:]\n if S == S.lower():\n print("AC")\n exit()\n\nprint("WA")'] | ['Wrong Answer', 'Accepted'] | ['s856556749', 's544937834'] | [3060.0, 3060.0] | [17.0, 18.0] | [194, 213] |
p03289 | u565204025 | 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 -*-\n\ns = list(input())\n\nanswer = True\n\nif s[0] != "A":\n answer = False\n\nc = 0\n\n\nfor i in range(2,len(s)-1):\n if s[i] == "C":\n c += 1\n\nif c != 1:\n answer = False\n\ncapital = 0\n\n\nfor i in range(len(s)):\n if s[i].isupper():\n capital += 1\n\nif capital != 2:\n answer = False\n\nprint(answer)', '# -*- coding: utf-8 -*-\n\ns = list(input())\n\nanswer = True\n\nif s[0] != "A":\n answer = False\n\nc = 0\n\n\nfor i in range(2,len(s)-1):\n if s[i] == "C":\n c += 1\n\nif c != 1:\n answer = False\n\ncapital = 0\n\n\nfor i in range(len(s)):\n if s[i].isupper():\n capital += 1\n\nif capital != 2:\n answer = False\n\nif answer:\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s689817283', 's740414669'] | [3064.0, 3060.0] | [17.0, 17.0] | [331, 367] |
p03289 | u569776981 | 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()\nN = len(S)\nx = 0\nif S[0] == 'A':\n if S[1] == 'C' or S[-1] == 'C':\n print('WA')\n else:\n if S.count('C') == 1:\n S.replace('A', '')\n S.replace('C', '')\n for i in range(N -2):\n if 97 <= ord(S[i]) <= 122:\n x += 1\n if x == N - 2:\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')", "S = input()\nN = len(S)\nx = 0\nif S[0] == 'A':\n if S[1] == 'C' or S[-1] == 'C':\n print('WA')\n else:\n if S.count('C') == 1:\n S.replace('A', '')\n S.replace('C', '')\n N = len(S)\n for i in range(N):\n if 97 <= ord(S[i]) <= 122:\n x += 1\n if x == N - 2:\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')"] | ['Wrong Answer', 'Accepted'] | ['s654794821', 's776259847'] | [9072.0, 9072.0] | [29.0, 28.0] | [467, 487] |
p03289 | u572343785 | 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.count("A")==1 and s.count("C")==1:\n if "C" in s[2:len(s)-1] and s[0]=="A":\n s=s.replace("A","")\n s=s.replace("C","")\n if s.isupper()==False:\n print(s.isupper())\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', 's=input()\nif s.count("A")==1 and s.count("C")==1:\n if "C" in s[2:len(s)-1] and s[0]=="A":\n s=s.replace("A","a")\n s=s.replace("C","b")\n if s.isupper()==False:\n print(s.isupper())\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', 's=input()\nprint(s[2:len(s)-1])\nif s.count("A")==1 and s.count("C")==1:\n if "C" in s[2:len(s)] and s[0]=="A":\n s=s.replace("A","")\n s=s.replace("C","")\n if s.isupper()==False:\n print("AC")\n else:\n print("WA")\nelse:\n print("WA")', 's=input()\nif s.count("A")==1 and s.count("C")==1:\n if "C" in s[2:-1] and s[0]=="A":\n s=s.replace("A","a")\n s=s.replace("C","b")\n if s.isupper()==False:\n print(s.isupper())\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', 's=input()\nif s.count("A")==1 and s.count("C")==1:\n if "C" in s[2:-1] and s[0]=="A":\n s=s.replace("A","a")\n s=s.replace("C","c")\n\n if s.isupper()=="False":\n\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', 's=input()\nif s.count("A")==1 and s.count("C")==1:\n if "C" in s[2:len(s)-1] and s[0]=="A":\n s=s.replace("A","")\n s=s.replace("C","")\n if s.lower()==True:\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")', 's=input()\nif s.count("A")==1 and s.count("C")==1:\n if "C" in s[2:-1] and s[0]=="A":\n s=s.replace("A","a")\n s=s.replace("C","b")\n t=s.lower()\n if s==t:\n print("AC")\n else:\n print("WA")\n else:\n print("WA")\nelse:\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s327964631', 's450567299', 's694377577', 's744433493', 's849152823', 's981062403', 's655918177'] | [3060.0, 3188.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 19.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [324, 326, 274, 320, 293, 290, 295] |
p03289 | u573754721 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['s=input()\nss=s[1:-1]\n\nif s[0]=="A" and ss.count("C")==1:\n s[0]="a"\n s=list(s)\n s.remove("C")\n if \'\'.join(s).islower():\n print("AC")\nelse:\n print("WA")\n', 's=input()\nif s[0]!="A" or s[2:-1].count("C")!=1:\n print("WA")\n exit()\n\ns=list(s)\ns[0]="a"\ns.remove("C")\nif "".join(s).islower():\n print(\'AC\')\nelse:\n print("WA")'] | ['Runtime Error', 'Accepted'] | ['s528980800', 's930886212'] | [2940.0, 3060.0] | [17.0, 17.0] | [188, 180] |
p03289 | u575653048 | 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:-2].count("C") == 1:\n s.remove("A")\n s.remove("C")\n for i in range(len(s)):\n if s[i].islower:\n continue\n else:\n print("No")\n exit()\n print("Yes")', 's = list(input())\nif s[0] == "A" and s[2:-1].count("C") == 1:\n s.remove("A")\n s.remove("C")\n for i in range(len(s)):\n if s[i].islower():\n continue\n else:\n print("WA")\n exit()\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Accepted'] | ['s782907986', 's803379476'] | [2940.0, 3060.0] | [17.0, 17.0] | [245, 268] |
p03289 | u578489732 | 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 -*-\nimport sys\n\nS = input()\nre = len(list(filter( lambda x: x == 'C', a[2:-1])))\nif re == 1:\n print('AC')\nelse:\n print('WA')", "# -*- coding: utf-8 -*-\nimport sys\n\nS = input()\nif S[0] != 'A':\n print('WA')\n sys.exit(0)\nfor l in S:\n if l in list('BDEFGHIJKLMNOPQRSTUVWXYZ'):\n print('WA')\n sys.exit(0)\n\nre = len(list(filter( lambda x: x == 'C', S[2:-1])))\nif re == 1:\n print('AC')\nelse:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s712409176', 's161626089'] | [2940.0, 3060.0] | [18.0, 18.0] | [150, 297] |
p03289 | u580362735 | 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 S.pop(0)\n length = len(S)\n if S[1] == 'C' and S[length-1] == 'C':\n S.pop(length-1)\n S.pop(0)\n if S.islower() == True:\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')", "S = list(input())\nif S[0] == 'A':\n S.pop(0)\n length = len(S)\n tmp = S\n del tmp[length-1:length]\n del tmp[0]\n if tmp.count('C') == 1:\n tmp.remove('C')\n if str(tmp).islower() == True and str(S[length-1:length]).islower() == True and S[0].islower == True:\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')", "S = input()\ncount_C = 0\nindex_C = 0\nif S[0] == 'A':\n for i in range(2,len(S)-1):\n if S[i] == 'C':\n count_C+=1\n index_C = i\n if count_C == 1:\n s = S[1:index_C]+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')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s257473093', 's770314342', 's078807490'] | [3060.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0] | [233, 332, 302] |
p03289 | u581403769 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["S = list(input())\nl = [chr(i) for i in range(65, 65+26)]\n\nflag = True\nif S[0] != 'A':\n flag = False\nelif S[1] in l:\n flag = False\nelif S[len(S)] in l:\n flag = False\nelif not 'C' in S[2:len(S) - 2]:\n flag = False\ncount = 0\nfor i in range(2, len(S) - 1):\n if flag == False:\n break\n if S[i] in l:\n count += 1\n if count > 1:\n flag = False\nif count < 1:\n flag = False\nif flag:\n print('AC')\nelse:\n print('WA')", "S = list(input())\nl = [chr(i) for i in range(65, 65+26)]\n\nflag = True\ncount = 0\nfor i in range(len(S)):\n if i == 0:\n if S[i] != 'A':\n flag = False\n break\n if i == 1:\n if S[i] in l:\n flag = False\n break\n if 2 <= i <= len(S) - 2:\n if S[i] == 'C':\n count += 1\n elif S[i] in l:\n flag = False\n break\n if i == len(S) - 1:\n if S[i] in l:\n flag = False\n break\nif not count == 1:\n flag = False\n\nif flag:\n print('AC')\nelse:\n print('WA')"] | ['Runtime Error', 'Accepted'] | ['s038075094', 's991809428'] | [9112.0, 9104.0] | [30.0, 27.0] | [454, 581] |
p03289 | u581603131 | 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\nif S[0] == 'A':\n S = S[1:]\n for i in range(1, len(S)-1):\n if S[i] == 'C':\n S = S[0:i] + S[i+1:]\n if S.islower():\n print('AC')\n break\n else:\n print('WA')\n break\n else:\n print('WA')\n break\nelse:\n print('WA')", "S = input()\ncount = 0\nif S[0] == 'A' and 'C' in S[2:-1] and S[1:].replace('C','',1).islower():\n print('AC')\nelse:\n print('WA') "] | ['Runtime Error', 'Accepted'] | ['s268485009', 's159963039'] | [3060.0, 2940.0] | [17.0, 18.0] | [353, 134] |
p03289 | u583507988 | 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()\nn = len(s)\nres = 0\n \nif s[0] == 'A':\n if s.find('C') >= 2 and s.find('C') < n-2:\n s.lower(0)\n s.lower(s.find('C'))\n if s == s.lower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')", "s=input()\nn=len(s)\nt=s.lower()\nif s[0]=='A' and s.count('C')==1 and s[1]!='C' and s[n-1]!='C':\n cnt=0\n for i in range(n):\n if s[i]!=t[i]:\n cnt+=1\n if cnt==2:\n print('AC')\n exit()\nprint('WA')"] | ['Runtime Error', 'Accepted'] | ['s380580434', 's222741326'] | [8972.0, 9092.0] | [29.0, 23.0] | [247, 207] |
p03289 | u585742242 | 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')\nelif 'C' not in S[2:-1]:\n print('WA')\nelse:\n i = S[2:-1].find('C')\n S = S[1:i] + S[i + 1:]\n if not S.islower():\n print('WA')\n else:\n print('AC')\n", "# -*- coding: utf-8 -*-\nS = input()\n\nif S[0] != 'A' or 'C' not in S[2:-1]:\n print('WA')\nelse:\n i = S[2:-1].find('C')\n S = S[1:2 + i] + S[2 + i + 1:]\n if not S.islower():\n print('WA')\n else:\n print('AC')\n"] | ['Wrong Answer', 'Accepted'] | ['s176167504', 's101789189'] | [3060.0, 2940.0] | [17.0, 17.0] | [243, 232] |
p03289 | u590253847 | 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 "C"in S[3:-1]:\n if S.count("C")==1:\n S.replace("A","")\n S.replace("C","")\n if S.islower():print("AC")\n else:print("WA")\n else:print("WA")\n else:print("WA")\n\nelse:print("WA")\n \n', 'S=input()\nif S[0]=="A":\n if "C"in S[2:-1]:\n if S[2:-1].count("C")==1:\n S=S.replace("A","")\n S=S.replace("C","")\n \n if S.islower():print("AC")\n else:print("WA")\n else:print("WA")\n else:print("WA")\n\nelse:print("WA")\n \n'] | ['Wrong Answer', 'Accepted'] | ['s658706931', 's742892445'] | [3064.0, 2940.0] | [17.0, 17.0] | [279, 302] |
p03289 | u593005350 | 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 "C" in S[2:len(S)-1]:\n S=S.replace("A","",1)\n S=S.replace("C","",1)\n print(S)\n if S.islower():\n print("AC")\n exit()\nprint("WA")', 'S = input()\nif S[0] == "A":\n if "C" in S[2:len(S)-1]:\n S=S.replace("A","",1)\n S=S.replace("C","",1)\n if S.islower():\n print("AC")\n exit()\nprint("WA")'] | ['Wrong Answer', 'Accepted'] | ['s317826571', 's960672131'] | [3060.0, 2940.0] | [19.0, 19.0] | [212, 195] |
p03289 | u597017430 | 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()\ncount = 0\nif len(S) < 4:\n print('WA')\n exit()\nfor i in range(len(S) - 3):\n if S[i+2] == 'C':\n count += 1\n elif S[i+2].islower():\n continue\n else:\n print('WA')\n exit()\nif A[1].isupper() or A[-1].isupper():\n print('WA')\n exit()\nif count == 1:\n print('AC')\n exit()\nprint('WA')\n ", "S = input()\nif S[0] != 'A':\n print('WA')\n exit()\ncount = 0\nif len(S) < 4:\n print('WA')\n exit()\nfor i in range(len(S) - 3):\n if S[i+2] == 'C':\n count += 1\n elif S[i+2].islower():\n continue\n else:\n print('WA')\n exit()\nif S[1].isupper() or S[-1].isupper():\n print('WA')\n exit()\nif count == 1:\n print('AC')\n exit()\nprint('WA')\n "] | ['Runtime Error', 'Accepted'] | ['s993203174', 's465305911'] | [3064.0, 3064.0] | [18.0, 18.0] | [350, 350] |
p03289 | u606878291 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["S = list(input())\n\nif S[0] != 'A':\n print('WC')\nelif 'C' not in S[2:-1]:\n print('WC')\nelse:\n S.remove('A')\n S.remove('C')\n for c in S:\n if c.is_upper():\n print('WC')\n else:\n print('AC')\n", "S = list(input())\n\nif S[0] != 'A':\n print('WA')\nelif S[2:-1].count('C') != 1:\n print('WA')\nelse:\n S = list(S[1:])\n S.remove('C')\n S = ''.join(S)\n if S.islower():\n print('AC')\n else:\n print('WA')\n"] | ['Runtime Error', 'Accepted'] | ['s633414781', 's400142349'] | [2940.0, 3060.0] | [18.0, 18.0] | [229, 230] |
p03289 | u607729897 | 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. | ["word=input()\ncflg=True\nif word[0]!=A:\n cflg=False\nelif word[2:-2].count('C'):\n cflg=False\ncnt=0\nfor l in word[1:-1]:\n if l.isupper():\n cnt+=1\nelse:\n if cnt!=1:\n cflg=False\n \nif cflg:\n print('AC')\nelse:\n print('WC')", "word=input()\ncflg=True\nif word[0]!='A':\n cflg=False\nelif word[2:-1].count('C')!=1:\n cflg=False\ncnt=0\nfor l in word[1:]:\n if l.isupper():\n cnt+=1\nelse:\n if cnt!=1:\n cflg=False\n \nif cflg:\n print('AC')\nelse:\n print('WA')\n"] | ['Runtime Error', 'Accepted'] | ['s079114587', 's202368097'] | [3060.0, 3060.0] | [17.0, 17.0] | [227, 231] |
p03289 | u614734359 | 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\nS = input()\nif not S[0] is 'A' or not S[2] is 'C':\n print('WA')\n exit()\nfor i in range(1,len(S)):\n if i == 2:\n continue\n if not S[i] in ascii_lowercase:\n print('WA')\n exit()\nprint('AC')\n", "from string import ascii_lowercase\nS = input()\nif not S[0] is 'A' or not 'C' in S[2:-1]:\n print('WA'),exit()\nfor i in range(1,len(S)):\n if i == S.index('C'):\n continue\n if not S[i] in ascii_lowercase:\n print('WA'),exit()\nprint('AC')\n# S[2:-1] in 'C'\n# S.remove('A'),S.remove('C')\n# S is all lower\n"] | ['Wrong Answer', 'Accepted'] | ['s791975486', 's195295659'] | [3832.0, 3768.0] | [26.0, 24.0] | [254, 320] |
p03289 | u618512227 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["s = list(input())\nl = len(s)\nif s[0] == 'A':\n c_cnt = 0\n for i, m in enumerate(s):\n if 1<i<l-1 & m=='C':\n cn = i\n c_cnt += 1\n if c_cnt == 1:\n tmp = s\n tmp.pop(0)\n tmp.pop(cn)\n tmp_s = ''.join(tmp)\n if tmp_s == tmp_s.lower():\n print('AC')\nelse:\n print('WA')\n\n", "s = list(input())\nl = len(s)\nif s[0] == 'A':\n c_cnt = 0\n cn_l = []\n for i, m in enumerate(s):\n if 1<i<l-1 & m=='C':\n cn_l.append(i)\n c_cnt += 1\n if c_cnt == 1:\n cn = cn_l[0]\n tmp = s\n tmp.pop(0)\n tmp.pop(cn)\n tmp_s = ''.join(tmp)\n if tmp_s == tmp_s.lower():\n print('AC')\nelse:\n print('WA')", "s = list(input())\nl = len(s)\nif s[0] == 'A':\n c_cnt = 0\n cn_l = []\n for i, m in enumerate(s):\n if 1<i<l-1 and m=='C':\n cn_l.append(i)\n c_cnt += 1\n if c_cnt == 1:\n cn = cn_l[0]\n tmp = s\n tmp.pop(0)\n tmp.pop(cn)\n tmp_s = ''.join(tmp)\n if tmp_s == tmp_s.lower():\n print('AC')\nelse:\n print('WA')", "s = list(input())\nl = len(s)\nif s[0] == 'A':\n c_cnt = 0\n cn_l = []\n for i, m in enumerate(s):\n if 1<i<l-1 and m=='C':\n cn_l.append(i)\n c_cnt += 1\n if c_cnt == 1:\n cn = int(cn_l[0])\n tmp = s\n tmp.pop(0)\n tmp.remove('C')\n tmp_s = ''.join(tmp)\n if tmp_s == tmp_s.lower():\n print('AC')\n else:\n print('WA')\n else:\n print('WA')\nelse:\n print('WA')"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s155842159', 's579089556', 's636681453', 's814294522'] | [3060.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 18.0] | [345, 386, 388, 465] |
p03289 | u619819312 | 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=input()\ns=list(n)\nl=0\nif s[0]=="A":\n for i in range(2,len(n)-1):\n if s[i]=="C":\n s[i]="c"\n k="a"\n for j in range(1,len(n)):\n k+=s[j]\n if k.islower():\n print("Yes")\n l+=1\n break\nif l!=1:\n print("No")', 'a=input()\nd=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nc=0\nt=len(a)\nif a[0]=="A":\n p=a[2:-1]\n if "C" in p:\n k=a[1:]\n t-=1\n q=0\n for i in range(t):\n if k[i]in d:\n q+=1\n if t-1==q:\n c=1\nprint("WA"if c!=1else"AC")'] | ['Wrong Answer', 'Accepted'] | ['s282922801', 's822452732'] | [3060.0, 3064.0] | [17.0, 24.0] | [317, 351] |
p03289 | u620846115 | 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()\nelse:\n s = s.pop(0)\n \nif "C" in s[2:len(s)-1]:\n s = s.replace("C","",1)\n \nif s.islower()==True:\n print("AC")\nelse:\n print("WA")', 's = list(input())\nflg = "WA"\nif s[0]=="A":\n if "C" in s[2:len(s)-1]:\n s.remove("A")\n s.remove("C")\n s = *s\n if s.islower()==True:\n flg = "AC"\nprint(flg)', 's = input()\nif s[0]!="A":\n print("WA")\n exit()\nelse:\n s.pop(0)\n \nif "C" in s[2:len(s)-1]:\n s.replace("C","",1)\n \nif s.islower():\n print("AC")\nelse:\n print("WA")', 's = input()\nif s[0]!="A":\n print("WA")\n exit()\nelse:\n s.pop(0)\n \ncount =0\nfor i in range(1,-2):\n if s[i] == "C":\n s.pop(i)\n count+=1\n else:\n continue\n \nif count !=1:\n print("WA")\n exit()\nelse:\n continue\n \nif s.islower():\n print("AC")\nelse:\n print("WA")', 's = input()\nif s[0]!="A":\n print("WA")\n exit()\nelse:\n s.pop(0)\n if s[1]!="C" or s[-2]!="C":\n print("WA")\n exit()\n else:\n s.pop(1)\n s.pop(-2)\n if s.islower():\n print("AC")\n else:\n print("WA")', 's = input()\nif s[0]!="A":\n print("WA")\n exit()\nelse:\n s.pop(0)\n \nif "C" in s[2:len(s)-1]:\n s.replace("C","",1)\n \nif s.islower()==True:\n print("AC")\nelse:\n print("WA")', 's = input()\nif s[0]!="A":\n print("WA")\n exit()\nelse:\n s.pop(0)\n \ncount =0\nfor i in range(1,-2):\n if s[i] == "C":\n s.pop(i)\n count+=1 \nif count !=1:\n print("WA")\n exit()\n \nif s.islower():\n print("AC")\nelse:\n print("WA")', 's = list(input())\nflg = "WA"\nif s[0]=="A":\n if "C" in s[2:len(s)-1]:\n s.remove("A")\n s.remove("C")\n s = \'\'.join(s)\n if s.islower()==True:\n flg = "AC"\nprint(flg)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s121107655', 's246143381', 's265361341', 's416826894', 's452119968', 's723918156', 's948226471', 's196616319'] | [9040.0, 9052.0, 9116.0, 9044.0, 9060.0, 9116.0, 9096.0, 9052.0] | [28.0, 25.0, 27.0, 23.0, 27.0, 25.0, 24.0, 27.0] | [182, 170, 168, 276, 223, 174, 237, 178] |
p03289 | u622570247 | 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().rstrip()\n\nif s[0] != \'A\':\n print(\'WA\')\n exit(0)\n\nf = False\nfor i in range(len(s)):\n if s[i] == \'C\':\n if i < 2 or i >= len(s) - 2:\n print(\'WA\')\n exit(0)\n if f:\n print(\'WA\')\n exit(0)\n f = True\n elif not str.islower(s[i]):\n print(\'WA\')\n\nif f:\n print(\'AC\')\nelse:\n print("WA")\n', 's = input().rstrip()\n\nif s[0] != \'A\':\n print(\'WA\')\n exit(0)\n\nf = False\nfor i in range(1, len(s)):\n if s[i] == \'C\':\n if i < 2 or i >= len(s) - 1:\n print(\'WA\')\n exit(0)\n if f:\n print(\'WA\')\n exit(0)\n f = True\n elif not str.islower(s[i]):\n print(\'WA\')\n exit(0)\n\nif f:\n print(\'AC\')\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s282767715', 's088794342'] | [9020.0, 9064.0] | [26.0, 25.0] | [374, 393] |
p03289 | u623065116 | 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())\nflag = 0\ncount = 0\n\nif s[0] == \'A\':\n flag += 1\n\na = s.pop(0)\nb = s.pop(0)\nc = s.pop(-1)\n\nif s.count(\'C\') == 1:\n flag += 1\nif flag ==2:\n s.append(b)\n s.append(c)\n print(s)\n for i in range(len(s)):\n if s[i].islower():\n count += 1\n print(count)\n if (count+1) == len(s):\n flag += 1\nprint(flag)\nif flag == 3:\n print("AC")\nelse:\n print("WA")\n ', 's = list(input())\nflag = 0\ncount = 0\n\nif s[0] == \'A\':\n flag += 1\n#print(flag)\na = s.pop(0)\nb = s.pop(0)\nc = s.pop(-1)\n\nif s.count(\'C\') == 1:\n flag += 1\n#print(flag)\nif flag ==2:\n s.append(b)\n s.append(c)\n print(s)\n for i in range(len(s)):\n if s[i].islower():\n count += 1\n print(count)\n if (count+1) == len(s):\n flag += 1\n##print(flag)\nif flag == 3:\n print("AC")\nelse:\n print("WA")', 's = list(input())\nflag = 0\ncount = 0\n\nif s[0] == \'A\':\n flag += 1\n#print(flag)\na = s.pop(0)\nb = s.pop(0)\nc = s.pop(-1)\n\nif s.count(\'C\') == 1:\n flag += 1\n#print(flag)\nif flag ==2:\n s.append(b)\n s.append(c)\n #print(s)\n for i in range(len(s)):\n if s[i].islower():\n count += 1\n #print(count)\n if (count+1) == len(s):\n flag += 1\n##print(flag)\nif flag == 3:\n print("AC")\nelse:\n print("WA")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s322404414', 's924835734', 's332790513'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [417, 439, 441] |
p03289 | u623687794 | 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=input()\na=len(s)\ncounter = Counter(s[2:a-2])\nif s[0]!="A":\n print("WA")\n break\nelse:\n if counter("C")!=1:\n print("WA")\nelse:\n s.replace("A","a",1)\n s.replace("C","c",1)\n if s.islower()==False:\n print("WA")\n else:\n print("AC")', 'from collections import Counter\ns=input()\na=len(s)\ncounter = Counter(s[2:a-1])\nif s[0]!="A":\n print("WA")\n \nelif counter["C"]!=1:\n \n print("WA")\nelse:\n \n s[1:].replace("C","c",1)\n if s[1:].replace("C","c",1).islower()==False:\n print("WA")\n else:\n print("AC")\n\n'] | ['Runtime Error', 'Accepted'] | ['s277936979', 's854976806'] | [2940.0, 3316.0] | [17.0, 21.0] | [275, 276] |
p03289 | u625741705 | 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 solve(s):\n if(s[0] == "A"):\n v = s[1:]\n i = v.find("C")\n print(i)\n if(i >= 1 and i < len(s)):\n k = v[:i] + v[i+1:]\n print(k)\n if(k.islower()):\n return "AC"\n return "WA"\n\ns = input()\nprint(solve(s))', 'def solve(s):\n if(s[0] == "A"):\n v = s[1:]\n i = v.find("C")\n if(i >= 1 and i < len(v)-1):\n k = v[:i] + v[i+1:]\n if(k.islower()):\n return "AC"\n return "WA"\n \ns = input()\nprint(solve(s))'] | ['Wrong Answer', 'Accepted'] | ['s014827138', 's800176695'] | [3060.0, 3060.0] | [17.0, 22.0] | [283, 248] |
p03289 | u626228246 | 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())\nC_cnt,low,upp = 0,0,0\nif S[0] != "A" or S[-1].isupper() or S[1] == \'C\':\n print("WA")\n sys.exit()\nfor i in range(2,len(S)-1):\n if S[i] == "C":\n C_cnt += 1\n elif S[i].islower():\n low += 1\n elif S[i].isupper():\n upp += 1\nif C_cnt == 1 and low == len(S)-3 and upp == 0:\n print("AC")\nelse :\n print("WA")', 'import sys\nS = list(input())\nC_cnt,low,upp = 0,0,0\nif S[0] != "A" or S[-1].isupper()\n print("WA")\n sys.exit()\nfor i in range(1,len(S)-1):\n if S[i] == "C":\n C_cnt += 1\n elif S[i].islower():\n low += 1\n elif S[i].isupper():\n upp += 1\nif C_cnt = 1 and low = len(S)-3 and upp = 0:\n print("AC")\nelse :\n print("WA")', 'import sys\nS = list(input())\nC_cnt,low,upp = 0,0,0\nif S[0] != "A" or S[-1].isupper() or S[1].isupper():\n print("WA")\n sys.exit()\nfor i in range(2,len(S)-1):\n if S[i] == "C":\n C_cnt += 1\n elif S[i].islower():\n low += 1\n elif S[i].isupper():\n upp += 1\nif C_cnt == 1 and low == len(S)-4 and upp == 0:\n print("AC")\nelse :\n print("WA")\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s278891178', 's678589210', 's260212040'] | [9136.0, 8952.0, 9020.0] | [33.0, 25.0, 30.0] | [343, 324, 347] |
p03289 | u626468554 | 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 = int(input())\n#n,k = map(int,input().split())\n#x = list(map(int,input().split()))\n\n\ns = list(input())\nans = True\nli = list("abcdefghijklmnopqrstuvwxyz")\n\nif s[0]!="A":\n ans = False\nmemo = s[2:-1]\nif not("C" in memo):\n ans = False\nfor i in range(len(memo)):\n if not(memo[i] in li):\n ans = False\n\nif ans:\n print("AC")\nelse:\n print("WA")\n\n\n\n\n\n\n\n\n', '#n = int(input())\n#n,k = map(int,input().split())\n#x = list(map(int,input().split()))\n\n\ns = list(input())\nans = True\nli = list("abcdefghijklmnopqrstuvwxyzC")\n\nif s[0]!="A":\n ans = False\nmemo = s[2:-1]\nif not("C" in memo):\n ans = False\nC_cnt = 0\nfor i in range(1,len(li)):\n if not(memo[i] in li):\n ans = False\n if memo[i] == "C":\n C_cnt += 1\n\nif ans and C_cnt==1:\n print("AC")\nelse:\n print("WA")\n\n\n\n\n\n\n\n\n', '#n = int(input())\n#n,k = map(int,input().split())\n#x = list(map(int,input().split()))\n\n\ns = list(input())\nans = True\nli = list("abcdefghijklmnopqrstuvwxyzC")\n\nif s[0]!="A":\n ans = False\nmemo = s[2:-1]\nif not("C" in memo):\n ans = False\nC_cnt = 0\nfor i in range(1,len(s)):\n if not(s[i] in li):\n ans = False\n if s[i] == "C":\n C_cnt += 1\n\nif ans and C_cnt==1:\n print("AC")\nelse:\n print("WA")\n\n\n\n\n\n\n\n\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s057460556', 's990651546', 's928982652'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [369, 435, 428] |
p03289 | u626881915 | 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()\nac = True\nc = True\nif s[0] != "A":\n ac = False\nif not ord("a") <= ord(s[1]) <= ord("z"):\n ac = False\nif not ord("a") <= ord(s[-1]) <= ord("z"):\n ac = False\nfor i in range(2, len(s)-1):\n if s[i] == "C":\n if c:\n c = False\n else:\n ac = False\n else:\n if not ord("a") <= ord(s[i]) <= ord("z"):\n ac = False\nif ac:\n print("AC")\nelse:\n print("WA")', 's = input()\nac = True\nc = True\nif s[0] != "A":\n ac = False\nif not ord("a") <= ord(s[1]) <= ord("z"):\n ac = False\nif not ord("a") <= ord(s[-1]) <= ord("z"):\n ac = False\nfor i in range(2, len(s)-1):\n if s[i] == "C":\n if c:\n c = False\n else:\n ac = False\n else:\n if not ord("a") <= ord(s[i]) <= ord("z"):\n ac = False\nif c:\n ac = False\nif ac:\n print("AC")\nelse:\n print("WA")\n'] | ['Runtime Error', 'Accepted'] | ['s196569055', 's223144217'] | [3060.0, 3064.0] | [17.0, 18.0] | [380, 402] |
p03289 | u627417051 | 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]\n\njudge = "AC"\nif S[0] != "A":\n\tjudge = "WA"\nelse:\n\tif s.count("C") != 1:\n\t\tjudge = "WA"\n\telse:\n\t\tS = S.replace("A", "")\n\t\tS = S.replace("C", "")\n\t\tch = "Yes"\n\t\tprint(S)\n\t\tfor i in S:\n\t\t\tif ord(i) <= 96:\n\t\t\t\tch = "No"\n\t\tif ch == "No":\n\t\t\tjudge = "WA"\n\nprint(judge)', 'S = input()\ns = S[2:-1]\n\njudge = "AC"\nif S[0] != "A":\n\tjudge = "WA"\nelse:\n\tif s.count("C") != 1:\n\t\tjudge = "WA"\n\telse:\n\t\tS = S.replace("A", "")\n\t\tS = S.replace("C", "")\n\t\tch = "Yes"\n\t\tfor i in S:\n\t\t\tif ord(i) <= 96:\n\t\t\t\tch = "No"\n\t\tif ch == "No":\n\t\t\tjudge = "WA"\n\nprint(judge)'] | ['Wrong Answer', 'Accepted'] | ['s974731683', 's381774417'] | [3064.0, 3064.0] | [18.0, 20.0] | [287, 276] |
p03289 | u629540524 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['s = input()\nif s[0]=="A" and s[2:-2]==\'C\':\n print(\'AC\')\nelse:\n print(\'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]+s[2:c+2]+s[c+3:]).islower():\n print(\'AC\')\n else:\n print(\'WA\')\nelse:\n print(\'WA\')'] | ['Wrong Answer', 'Accepted'] | ['s804735826', 's264194949'] | [9032.0, 9120.0] | [28.0, 26.0] | [80, 194] |
p03289 | u629607744 | 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 i():\n\treturn int(input())\ndef i2():\n\treturn map(int,input().split())\ndef s():\n\treturn str(input())\ndef l():\n\treturn list(input())\ndef intl():\n\treturn list(int(k) for k in input().split())\n\ns = s()\n\nif s[0] != "A":\n\tf1 = True \ncnt = 0\nfor i in range(2,len(s)-1):\n\tif s[i] == "C":\n\t\tcnt += 1\nif cnt1 == 1:\n\tf2 =True\ncnt2 = 0\nfor i in range(1,len(s)):\n\tif s[i].islower():\n\t\tcnt2 += 1\nif cnt2 >= len(s) -2:\n\tf3 = True\n\nif f1 and f2 and f3:\n\tprint("AC")\nelse:\n\tprinet("WA")', 'def i():\n\treturn int(input())\ndef i2():\n\treturn map(int,input().split())\ndef s():\n\treturn str(input())\ndef l():\n\treturn list(input())\ndef intl():\n\treturn list(int(k) for k in input().split())\n\ns = s()\n\nflag = 0\nif s[0] == "A":\n\ts = s.replace("A","",1)\n\tfor i in range(3,len(s)-2):\n\t\tif s[i] == "C":\n\t\t\ts = s.replace("C","",1)\n\t\t\tflag += 1\n\t\t\tbreak\n\tif s.islower() and flag == 1:\n\t\tprint("AC")\n\telse:\n\t\tprint("WA")\nelse:\n\tprint("WA")', 'def i():\n\treturn int(input())\ndef i2():\n\treturn map(int,input().split())\ndef s():\n\treturn str(input())\ndef l():\n\treturn list(input())\ndef intl():\n\treturn list(int(k) for k in input().split())\n\ns = s()\n\nflag = 0\nif s[0] == "A":\n\tflag += 1 \ncnt1 = 0\nfor i in range(2,len(s)-1):\n\tif s[i] == "C":\n\t\tcnt1 += 1\nif cnt1 == 1:\n\tflag += 1\ncnt2 = 0\nfor i in range(1,len(s)):\n\tif s[i].islower():\n\t\tcnt2 += 1\nif cnt2 >= len(s) -2:\n\tflag += 1\n\nif flag == 3:\n\tprint("AC")\nelse:\n\tprint("WA")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s104867353', 's834040638', 's643853011'] | [9044.0, 9072.0, 9152.0] | [28.0, 26.0, 25.0] | [473, 432, 476] |
p03289 | u631914718 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ['import re\n\ns = input()\ntest = re.match(r"^A[a-z]{2,}C[a-z]+$", s)\nif test:\n print(\'AC\')\nelse:\n print(\'WA\')\n', 'import re\n\ns = input()\ntest = re.match(r"^A[a-z]+C[a-z]+$", s)\nif test:\n print(\'AC\')\nelse:\n print(\'WA\')\n'] | ['Wrong Answer', 'Accepted'] | ['s523224550', 's815645090'] | [3188.0, 3188.0] | [19.0, 19.0] | [113, 110] |
p03289 | u634046173 | 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[2:-2].count('C') != 1:\n print('WA')\nelse:\n cindex = S.index('C')\n for i in range(len(S[1:])):\n if i == cindex:\n continue\n if S[i+1].isupper():\n print('WA')\n exit()\n print('AC')\n \n \n ", "S = input()\nif S[0] != 'A':\n print('WA')\nelif S[2:-1].count('C') != 1:\n print('WA')\nelse:\n cindex = S.index('C')\n for i in range(len(S[1:])):\n if i+1 == cindex:\n continue\n if S[i+1].isupper():\n print('WA')\n exit()\n print('AC')\n"] | ['Wrong Answer', 'Accepted'] | ['s518835904', 's608902018'] | [8900.0, 9048.0] | [28.0, 28.0] | [266, 253] |
p03289 | u636683284 | 2,000 | 1,048,576 | You are given a string S. Each character of S is uppercase or lowercase English letter. Determine if S satisfies all of the following conditions: * The initial character of S is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. | ["S = list(input())\ncount = 0\nif S[0] == 'A':\n for i in range(2,len(S)-1):\n if S[i] == 'C':\n count += 1\n elif S[i].lower != S[i]:\n print('WA')\n exit()\n if count == 1:\n print('AC')\n else:\n print('WA')\nelse:\n print('WA')", "S = list(input())\ncount = 0\nif S[0] == 'A':\n S[0] = S[0].lower()\nelse:\n print('WA')\n exit()\n\ncount = 0\nfor i in range(2,len(S)-1):\n if S[i] == 'C' and count == 0:\n count += 1\n S[i] = S[i].lower()\n\nif count == 0:\n print('WA')\n exit()\n\nfor i in range(len(S)):\n if S[i] != S[i].lower():\n print('WA')\n exit()\nprint('AC')"] | ['Wrong Answer', 'Accepted'] | ['s576102731', 's063713553'] | [3060.0, 3064.0] | [17.0, 18.0] | [289, 365] |
p03289 | u636775911 | 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()\ncount=True\ndumy=0\nif(s[0]=="A"):\n for i in range(2,len(s)-2):\n if(s[i]=="C"):\n dumy+=1\nelse:\n count=False\nif(dumy>1 and dumy==0):\n count=False\ndumy=0\nfor i in range(len(s)):\n if(s[i]>"A" and s[i]<"Z"):\n dumy+=1\nif(dumy!=2):\n count=False\nif(count==False):\n print("WA")\nelse:\n print("AC")', '#coding:utf-8\ns=input()\ncount=True\ndumy=0\nfor i in range(len(s)):\n if(s[i]>="A" and s[i]<="Z"):\n dumy+=1\nif(dumy!=2):\n count=False\ndumy=0\nif(s[0]=="A"):\n for i in range(2,len(s)-1):\n if(s[i]=="C"):\n dumy+=1\nelse:\n count=False\nif(dumy!=1):\n count=False\nif(count==False):\n print("WA")\nelse:\n print("AC")'] | ['Wrong Answer', 'Accepted'] | ['s379340625', 's255984129'] | [3064.0, 3064.0] | [18.0, 17.0] | [328, 319] |
p03289 | u637016017 | 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=list(input())\n\nif t[0]=="A" and not t[1]=="C" and not t[-1]=="C":\n rs=1\nelse:\n rs=0\n\nif t[1].isupper()==True or t[-1].isupper()==True:\n rs -=1\n\ndel t[:2]\ndel t[-1]\n\nif not t.count("C")==1:\n rs -=1\n\nif rs==1:\n t.remove("C")\n\nfor i in t:\n if i.isupper()==True:\n rs -=1\n\nif rs==1:\n print("AC")\nelse:\n print("WA")\n\nprint(rs)\n', 't=list(input())\n\nif t[0]=="A" and not t[1]=="C" and not t[-1]=="C":\n rs=1\nelse:\n rs=0\n\nif t[1].isupper()==True or t[-1].isupper()==True:\n rs -=1\n\ndel t[:2]\ndel t[-1]\n\nif not t.count("C")==1:\n rs -=1\n\nif rs==1:\n t.remove("C")\n\nfor i in t:\n if i.isupper()==True:\n rs -=1\n\nif rs==1:\n print("AC")\nelse:\n print("WA")\n'] | ['Wrong Answer', 'Accepted'] | ['s667438745', 's499412110'] | [3064.0, 3064.0] | [17.0, 17.0] | [354, 343] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.