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
p02729
u961945062
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['i = list(map(int, input().split()))\n\nn = int(i[0])\nm = int(i[1])\n\np = (m+n)*(m+n-1)/2 - (m*n)\n\nprint(p)', 'i = list(map(int, input().split()))\n\nn = int(i[0])\nm = int(i[1])\n\np = (m+n)*(m+n-1)/2 - (m*n)\n\nprint(int(p))']
['Wrong Answer', 'Accepted']
['s152630262', 's540492797']
[3064.0, 2940.0]
[18.0, 17.0]
[103, 108]
p02729
u962609087
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['def main():\n n,m = map(int,input().split())\n print(n * (n - 1) / 2 + m * (m - 1) / 2)\nmain()', 'def main():\n n,m = map(int,input().split())\n print(n + (n - 1) / 2 + m * (m - 1) / 2)\nmain()', 'def main():\n n,m = map(int,input().split())\n print(n * (n - 1) // 2 + m * (m - 1) // 2)\nmain()']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s015380372', 's529529816', 's077667633']
[9080.0, 9152.0, 9136.0]
[27.0, 28.0, 28.0]
[92, 92, 94]
p02729
u963349415
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['inputText1 = "3 3"\nnumberTextList = inputText1.split()\ngNumber = numberTextList[0]\nkNumber = numberTextList[1]\ngNumbers = []\nfor gNum in range(int(gNumber)):\n gNumbers.append(2)\n\nkNumbers = []\nfor kNum in range(int(kNumber)):\n kNumbers.append(1)\n\n# print("end")\ngNumbers.extend(kNumbers)\nallNumbers = gNumbers\nallNumbersCount = len(allNumbers)\nsuccessCount = 0\nfor num1 in range(len(allNumbers)):\n for num2 in range(len(allNumbers)):\n if num1 + num2 + 1 == allNumbersCount:\n break\n # print(num1)\n\n if (allNumbers[num1] + allNumbers[num1 + num2 + 1]) % 2 == 0:\n successCount += 1\n\n\n\n\n\n\n\n\nprint(successCount)\n', 'inputText1 = input()\nnumberTextList = inputText1.split()\ngNumber = numberTextList[0]\nkNumber = numberTextList[1]\ngNumbers = []\nfor gNum in range(int(gNumber)):\n gNumbers.append(2)\n\nkNumbers = []\nfor kNum in range(int(kNumber)):\n kNumbers.append(1)\n\n# print("end")\ngNumbers.extend(kNumbers)\nallNumbers = gNumbers\nallNumbersCount = len(allNumbers)\nsuccessCount = 0\nfor num1 in range(len(allNumbers)):\n for num2 in range(len(allNumbers)):\n if num1 + num2 + 1 == allNumbersCount:\n break\n # print(num1)\n\n if (allNumbers[num1] + allNumbers[num1 + num2 + 1]) % 2 == 0:\n successCount += 1\n\n\n\n\n\n\n\n\nprint(successCount)\n']
['Wrong Answer', 'Accepted']
['s298266969', 's080389601']
[3064.0, 3064.0]
[17.0, 25.0]
[663, 665]
p02729
u963915126
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['n, m = map(int,input().split())\n\nprint((n*(n-1)+m*(m-1))/2)', 'n, m = map(int,input().split())\n\nprint(round((n*(n-1)+m*(m-1))//2))']
['Wrong Answer', 'Accepted']
['s179306523', 's975039929']
[2940.0, 2940.0]
[18.0, 17.0]
[59, 67]
p02729
u964966380
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['n, m = map(int, input().split())\n\nans = n * (n - 1) / 2 + m * (m - 1) / 2\n\nprint(ans)', 'n, m = map(int, input().split())\n\nans = n * (n - 1) / 2 + m * (m - 1) / 2\n\nprint(int(ans))']
['Wrong Answer', 'Accepted']
['s772930315', 's207469323']
[2940.0, 2940.0]
[17.0, 17.0]
[85, 90]
p02729
u965723631
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['\t\t\t\t\ndef factorial(number):\n\tif number>2:\n\t\treturn number*factorial(number-1)\n\telif not number==0:\n\t\treturn number\n\telse:\n\t\treturn 1\ndef choose2(number):\n\tif number>=2:\n\t\treturn number*(number-1)/2\n\telse:\n\t\treturn 0\nN = int(input())\nklist = input()\nk = []\nfor x in range(N-1):\n\tk.append(int(klist[:klist.index(" ")]))\n\tklist = klist[klist.index(" ")+1:]\nk.append(int(klist))\nvalArr = list(set(k))\noccurence = []\nfor i in range(len(valArr)):\n\toccurence.append(0)\nfor j in range(N):\n\tfor x in range(len(valArr)):\n\t\tif k[j]==valArr[x]:\n\t\t\toccurence[x]+=1\nfor ball in range(len(k)):\n\tans = 0\n\tkArray = occurence[:len(occurence)]\n\tfor index in range(len(valArr)):\n\t\tif valArr[index]==k[ball]:\n\t\t\tkArray[index]-=1\n\t\t\tbreak;\n\tfor time in kArray:\n\t\tans+=choose2(time)\n\tprint(int(ans))\n', '\nx = input()\nN = int(x[:x.index(" ")])\nM = int(x[x.index(" ")+1:])\ndef factorial(number):\n\tif number>2:\n\t\treturn number*factorial(number-1)\n\telif not number==0:\n\t\treturn number\n\telse:\n\t\treturn 1\ndef choose2(number):\n\tif number>=2:\n\t\treturn factorial(number)/(2*factorial(number-2))\n\telse:\n\t\treturn 0\n\nprint(int(choose2(N)+choose2(M)))\n']
['Runtime Error', 'Accepted']
['s707822541', 's987088146']
[3064.0, 3060.0]
[18.0, 17.0]
[777, 347]
p02729
u966207392
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['N, M = map(int, input().split())\nprint((N*(N-1)/2) + (M*(M-1)/2))', 'N, M = map(int, input().split())\nprint(int((N*(N-1)/2) + (M*(M-1)/2)))']
['Wrong Answer', 'Accepted']
['s395911780', 's349342359']
[9056.0, 9060.0]
[26.0, 27.0]
[65, 70]
p02729
u966311314
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
["N, M = map(int, input().split(' '))\n\ncnt = (N*(N-1))/2 + (M*(M-1))/2\n\nprint(cnt)", "N, M = map(int, input().split(' '))\n \ncnt = (N*(N-1))//2 + (M*(M-1))//2\n \nprint(cnt)"]
['Wrong Answer', 'Accepted']
['s498815734', 's653924643']
[2940.0, 2940.0]
[17.0, 17.0]
[80, 84]
p02729
u966542724
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['import math\nimport itertools as it\n\n\ni = input().split()\n\n\n\nn = i[0]\nm = i[1]\nnc = it.combinations(range(n),2)\nmc = it.combinations(range(m),2)\n\nprint(len(list(nc) + list(mc)))', 'import math\nimport itertools as it\n\n\ni = input().split()\n\n\n\nn = int(i[0])\nm = int(i[1])\nnc = it.combinations(range(n),2)\nmc = it.combinations(range(m),2)\n\nprint(len(list(nc) + list(mc)))']
['Runtime Error', 'Accepted']
['s130543024', 's583340512']
[3060.0, 3828.0]
[18.0, 19.0]
[176, 186]
p02729
u967484343
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['import math\n\nN,M = map(int,input().split())\n\n\n\n\nif N >= 2:\n Nf = math.factorial(N)//(math.factorial(N-2)*2)\nelse:\n Nf = 0\n\nif M >= 2:\n Mf = math.factorial(M)//(math.factorial(M-2)*2)\nelse:\n Mf = 0\nans = int(Nf + Mf)\n\n', 'import math\n\nN,M = map(int,input().split())\n\n\n\n\nNf = math.factorial(N)/math.factorial(N-2)/2\n\n\nMf = math.factorial(M)/math.factorial(M-2)/2\n\nans = int(Nf + Mf)\n\nprint(ans)', 'import math\n\nN,M = map(int,input().split())\n\n\n\n\nif N >= 2:\n Nf = math.factorial(N)//(math.factorial(N-2)*2)\nelse:\n Nf = 0\n\nif M >= 2:\n Mf = math.factorial(M)//(math.factorial(M-2)*2)\nelse:\n Mf = 0\nans = int(Nf + Mf)\nprint(ans)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s019662495', 's375783898', 's791911098']
[9000.0, 9120.0, 9096.0]
[26.0, 33.0, 28.0]
[269, 219, 279]
p02729
u969080040
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['N,M=map(int,input().split())\ns=N*(N-1)/2+M*(M-1)/2\nprint(s)', 'n,m=map(int,input().split())\ns=n*(n-1)*0.5+m*(m-1)*0.5\nprint(s)', 'N,M=input().split()\nN=int(N)\nM=int(M)\nprint((N*(N-1)/2)+(M*(M-1)/2))', 'N,M=map(int,input().split())\ns=N*(N-1)*0.5+M*(M-1)*0.5\nprint(s)', 'N,M=map(int,input().split())\ns=N*(N-1)//2+M*(M-1)//2\nprint(s)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s154744302', 's289588919', 's319066436', 's820478673', 's447555370']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 17.0, 17.0]
[59, 63, 68, 63, 61]
p02729
u969226579
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['m, n = map(int,input().split())\nprint( m*(m-1)/2 + n*(n-1)/2 )\n', 'm, n = map(int,input().split())\nprint(m*n)', 'm, n = map(int,input().split())\nans = int( m*(m-1)/2 + n*(n-1)/2 )\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s573936281', 's987738370', 's273058371']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[63, 42, 77]
p02729
u969708690
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['import math\ndef comb(n, r):\n return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))\nN,M=map(int,input().split())\nif N==0:\n a=0\nelse:\n a = comb(N,2)\nif M==0:\n b=0\nelse:\n b = comb(M,2)\nprint(a+b)', 'N,M=map(int,input().split())\nprint((N*(N-1)+M*(M-1))//2)']
['Runtime Error', 'Accepted']
['s849399596', 's861783121']
[3060.0, 2940.0]
[17.0, 20.0]
[217, 56]
p02729
u970598682
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['N,M=map(int,input().split())\n\npattern_even=(N-1)*N/2\npattern_odd=(M-1)*M/2\n\nreturn (pattern_even+pattern_odd)', 'N,M=map(int,input().split())\n\npattern_o=(N-1)*N/2\npattern_e=(M-1)*M/2\n\nprint(int(pattern_o+pattern_e))']
['Runtime Error', 'Accepted']
['s366823885', 's062785152']
[8956.0, 9088.0]
[26.0, 20.0]
[109, 102]
p02729
u971096161
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['N, M = map(int, input().split())\n\nans = N*(N-1)/2 + M(M-1)/2\n\nprint(ans)', 'N, M = map(int, input().split())\n\nans = N*(N-1)/2 + M*(M-1)/2\n\nprint(int(ans))']
['Runtime Error', 'Accepted']
['s414156431', 's214511881']
[2940.0, 2940.0]
[17.0, 17.0]
[72, 78]
p02729
u975652044
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['n, m = (int(i) for i in input().split());\nres = (n * (n - 1) + m * (m - 1)) / 2;\nprint(res);', 'n, m = (int(i) for i in input().split());\nres = (n * (n - 1) + m * (m - 1)) // 2;\nprint(res);']
['Wrong Answer', 'Accepted']
['s224316452', 's863438835']
[2940.0, 2940.0]
[18.0, 18.0]
[92, 93]
p02729
u985949234
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['def out(m, n):\n a = m*(m-1)%2 + n*(n-1)%2\n return a\n\nm, n = map(int, input().split())\na = out(m,n)\n\nprint(a)', 'def out(m, n):\n a = m*(m-1)/2 + n*(n-1)/2\n return a\n\nm, n = map(int, input().split())\na = out(m,n)\n\nprint(a)', 'n, m = input().split()\na = n*(n-1)/2 + m*(m-1)/2\nprint(a)', 'def out(m, n):\n a = m*(m-1)%2 + n*(n-1)%2\n return a\n\nm, n = list(input())\na = out(m,n)\n\nprint(a)', "print('a')", 'n, m = map(int, input().split())\na = n*(n-1)/2 + m*(m-1)/2\nprint(a)', 'def out(m, n):\n a = (m+n)*(m+n-1) % 2\n b = a - m*n\n return b', 'def out(m, n):\n a = m*(m-1)%2 + n*(n-1)%2\n return a\n\nm, n = int(input())\na = out(m,n)\n\nprint(a)', 'def out(m, n):\n a = m*(m-1)%2 + n*(n-1)%2\n return a\n\nm, n = int(input())\na = out(m,n)\n\nprint(a)', 'n, m = map(int, input().split())\na = n*(n-1)/2 + m*(m-1)/2\nprint(int(a))\n']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s129379945', 's174863179', 's299178686', 's752034670', 's843456623', 's843563838', 's883202735', 's890501866', 's944333537', 's920049819']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 17.0, 17.0, 19.0, 17.0, 17.0, 17.0, 18.0]
[110, 110, 57, 98, 10, 67, 63, 97, 97, 73]
p02729
u986884213
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['i = list(map(int, input().split()))\nn = i[0]\nm = i[1]\n\nans_n = 0\nans_m = 0\n\nif n != 0 :\n ans_n = n*(n-1)/2\nelse:\n ans_n = 0\nif m != 0 :\n ans_m = m*(m-1)/2\n \nprint(ans_n + ans_m)', 'i = list(map(int, input().split()))\nn = i[0]\nm = i[1]\n\nans_n = 0\nans_m = 0\nif(n == 0):\n ans_n = 0\nelse:\n ans_n = n*(n-1)//2\nif(m == 0):\n ans_m = 0\nelse:\n ans_m = m*(m-1)//2\n\nprint(ans_n + ans_m)']
['Wrong Answer', 'Accepted']
['s747332756', 's220169552']
[3060.0, 3064.0]
[17.0, 17.0]
[181, 206]
p02729
u987164499
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['from sys import stdin,setrecursionlimit\nn,m = map(int,stdin.readline().rstrip().split())\nprint(n*(n-1)+m*(m-1))', 'from sys import stdin,setrecursionlimit\nn,m = map(int,stdin.readline().rstrip().split())\nprint(n*(n-1)//2+m*(m-1)//2)']
['Wrong Answer', 'Accepted']
['s111032160', 's387769100']
[2940.0, 2940.0]
[17.0, 20.0]
[111, 117]
p02729
u987637902
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['# ABC159\n# A The Number of Even Pairs\nimport math\nn, m = map(int, input().split())\nif n < 2:\n x = 0\nelse:\n x = math.factorial(n) // (math.factorial(n-2) * math.factorial(2))\n\nif m < 0:\n y = 0\nelse:\n y = math.factorial(m) // (math.factorial(m-2) * math.factorial(2))\n\nprint(x+y)\n', '# ABC159\n# A The Number of Even Pairs\nimport math\nn, m = map(int, input().split())\nif n < 2:\n x = 0\nelse:\n x = math.factorial(n) // (math.factorial(n-2) * math.factorial(2))\n\nif m < 2:\n y = 0\nelse:\n y = math.factorial(m) // (math.factorial(m-2) * math.factorial(2))\n\nprint(x+y)\n ']
['Runtime Error', 'Accepted']
['s034434957', 's018151853']
[9052.0, 9052.0]
[28.0, 28.0]
[290, 292]
p02729
u992541367
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['from scipy.misc import comb\n\nN, M = map(int,input().split(" "))\n\nans = comb(N,2) + comb(M,2)\n\n\nprint(int(ans))', 'import math\n\ndef perm(n, r):\n return math.factorial(n)//math.factorial(n-r)\n\ndef comb(n, r):\n if n <= 1:\n return 0\n return perm(n, r)//math.factorial(r)\n\nN, M = map(int,input().split(" "))\n\nans = comb(N,2) + comb(M,2)\n\n\nprint(int(ans))']
['Wrong Answer', 'Accepted']
['s236856322', 's462253836']
[23764.0, 3060.0]
[353.0, 19.0]
[110, 251]
p02729
u994521204
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['n, m =map(int,input().split())\nans=n*(n-1)+m*(m-1)\nprint(ans)', 'n, m =map(int,input().split())\nans=n*(n-1)//2+m*(m-1)//2\nprint(ans)']
['Wrong Answer', 'Accepted']
['s724798906', 's439959552']
[2940.0, 2940.0]
[17.0, 17.0]
[61, 67]
p02729
u994910167
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['N, M = map(int, input().split())\nans = N*(N-1)/2 + M*(M-1)/2\nprint(ans)\n', 'N, M = map(int, input().split())\nans = N*(N-1)/2 + M*(M-1)/2\nprint(int(ans))\n']
['Wrong Answer', 'Accepted']
['s412980779', 's146197931']
[2940.0, 3316.0]
[17.0, 19.0]
[72, 77]
p02729
u995163736
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['n, m = map(int, input())\nans = n*(n-1)/2 + m*(m-1)/2\nprint(ans)', 'n, m = map(int, input().split())\nans = n*(n-1)/2 + m*(m-1)/2\nprint(int(ans))']
['Runtime Error', 'Accepted']
['s255001282', 's390835088']
[9140.0, 9080.0]
[24.0, 30.0]
[63, 76]
p02729
u995419623
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['N,M = map(int,input().split())\n\nans = 0\n\nif N > 1 and M > 1:\n ans = N*(N-1)//2 + M*(M-1)//2\nelif N == 0 and M > 1:\n ans = M*(M-1)//2\nelif N > 1 and M == 0:\n ans = N*(N-1)//2\n \nprint(ans)', 'N,M = map(int,input().split())\n\nans = 0\n\nif N >= 1 and M >= 1:\n ans = N*(N-1)//2 + M*(M-1)//2\nelif N == 0 and M >= 1:\n ans = M*(M-1)//2\nelif N >= 1 and M == 0:\n ans = N*(N-1)//2\n \nprint(ans)']
['Wrong Answer', 'Accepted']
['s542777212', 's719021624']
[3060.0, 3060.0]
[17.0, 19.0]
[190, 194]
p02729
u996731299
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['n,m=list(map,int().split())\nprint(n*(n-1)//2+m*(m-1)//2)', 'N,M=map(int,input().split())\nans=N*(N-1)//2+M*(M-1)//2\nprint(ans)']
['Runtime Error', 'Accepted']
['s218658951', 's410065012']
[2940.0, 2940.0]
[17.0, 17.0]
[56, 65]
p02729
u997389162
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['import math\nn,k = input().split()\nn = int(n) \nk = int(k)\nse = 0\n\nif k > 1:\n if n > 1:\n se = math.factorial(k)//(math.factorial(k-2)*2) + math.factorial(n)//(math.factorial(n-2)*2)\n else:\n se= math.factorial(k)//(math.factorial(k-2)*2)\nelse:\n if n > 1:\n se = math.factorial(n)//math.factorial(n-2)*2\n else:\n se = 0\nprint(se)', 'import math\ndef fac(k):\n return(math.factorial(k)//(math.factorial(k-2)*2))\n\n\nn,k = input().split()\nn = int(n) \nk = int(k)\nse = 0\n\nif k > 1:\n if n > 1:\n se = fac(k) + fac(n)\n else:\n se= fac(k)\nelse:\n if n > 1:\n se = fac(n)\n else:\n se = 0\nprint(se)']
['Wrong Answer', 'Accepted']
['s498264641', 's088320621']
[3064.0, 3060.0]
[17.0, 17.0]
[364, 291]
p02729
u999482355
2,000
1,048,576
We have N+M balls, each of which has an integer written on it. It is known that: * The numbers written on N of the balls are even. * The numbers written on M of the balls are odd. Find the number of ways to choose two of the N+M balls (disregarding order) so that the sum of the numbers written on them is even. It can be shown that this count does not depend on the actual values written on the balls.
['N,M=list(map(int,input().split()))\nprint(N*(N-1)/2+M*(M-1)/2)', 'N,M=list(map(int,input().split()))\nprint(int(N*(N-1)/2+M*(M-1)/2))']
['Wrong Answer', 'Accepted']
['s728577229', 's259172672']
[2940.0, 2940.0]
[17.0, 18.0]
[61, 66]
p02730
u000037600
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['a=int(input())\nc=len(a)\nb=a[:(c-1)//2]\nd=a[(c+3)//2:]\nif a==a[::-1] and b==b[::-1] and d==d[::-1]:\n print("Yes")\nelse:\n print("No")', 'a=input()\nc=len(a)\nb=a[:(c-1)//2]\nd=a[(c+3)//2-1:]\nif a==a[::-1] and b==b[::-1] and d==d[::-1]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s037672284', 's131805364']
[9104.0, 9064.0]
[22.0, 27.0]
[133, 130]
p02730
u000085263
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['inp=input()\nif inp[2]==inp[3] and inp[4]==inp[5]:\n print("Yes")\nelse:\n print("No")', 'n = int(input())\nl=[]\nfor i in range(n): \n if ((i%3)!=0) and ((i%5)!=0):\n l.append(i)\nprint(sum(l))', 'import sys\nX=input()\nn=len(X)\nif n%2==0:\n print("No")\n sys.exit()\nans="No"\ndef check(s): \n return s == s[::-1] \nans="No"\nif check(X):\n if check(X[0:int((n-1)/2)]):\n if check(X[int(((n+3)/2)-1):]):\n ans="Yes"\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s376258323', 's492539142', 's154951839']
[9056.0, 9168.0, 9004.0]
[27.0, 22.0, 28.0]
[84, 110, 248]
p02730
u000557170
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['akasaka', '# -*- coding: utf-8 -*-\n\nimport sys\nimport math\n\n\ndebug = False\n\ndef log(text):\n if debug:\n print(text)\n\ndef parse_input(lines_as_string = None):\n\n global debug\n lines = []\n if lines_as_string is None:\n debug = False\n # for line in sys.stdin:\n # lines.append(line)\n lines.append(input())\n else:\n debug = True\n lines = [e for e in lines_as_string.split("\\n")][1:-1]\n\n s = lines[0]\n\n return (s, )\n\n\ndef solve(s, ):\n\n n = len(s)\n ma = (n - 1) // 2 \n mb = (n + 3) // 2\n\n def test_text(text):\n if debug:\n log("text=%s" % text)\n n = len(text) \n m = (n - 1) // 2\n result = True\n for i in range(m+1):\n if debug:\n log(\'(s[%d], s[%d])=(%s, %s)\' % (i, -(i+1), s[i], s[-(i+1)]))\n if text[i] != text[-(i+1)]:\n result = False\n break\n\n return result\n\n if debug:\n log("s =%s" % s)\n log("ma=%d, sa=%s" % (ma, s[:ma]))\n log("mb=%d, sb=%s" % (mb, s[mb-1:]))\n\n result1 = test_text(s) \n result2 = test_text(s[:ma]) \n result3 = test_text(s[mb-1:]) \n if debug:\n log(\'result1=%s, result2=%s, result3=%s\' % (result1, result2, result3))\n\n result = \'No\'\n if result1 and result2 and result3:\n result = \'Yes\'\n\n\n \n return result\n \n\n\ndef main():\n \n result = solve(*parse_input())\n if isinstance(result, list):\n for r in result:\n print("%s" % r, sep=\'\')\n else:\n print("%s" % result, sep=\'\')\n\nif __name__ == \'__main__\':\n\n main()']
['Runtime Error', 'Accepted']
['s386811221', 's071145253']
[2940.0, 3188.0]
[17.0, 18.0]
[7, 1615]
p02730
u004271495
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['"""\n"""\n\n\ndef int_as_array(num): return list(map(int, [y for y in str(num)]))\n\n\ndef array_as_int(arr): return int(\'\'.join(map(str, arr)))\n\n\ndef read_int(): return int(input())\n\n\ndef read_array(): return list(map(int, input().split(\' \')))\n\n\ndef array_to_string(arr, sep=\' \'): return sep.join(map(str, arr))\n\n\ndef matrix_to_string(arr, sep=\' \'): return \'[\\n\' + \'\\n\'.join(\n [sep.join(map(str, row)) for row in arr]) + \'\\n]\'\n\n\ndef solve(string):\n if string != string[::-1]:\n return False\n first = string[0:(len(string) - 1) // 2]\n if first != first[::-1]:\n return False\n second = string[0:(len(string) + 3) // 2]\n if second != second[::-1]:\n return False\n return True\n\n\nstring = input()\nif solve(string):\n print(\'Yes\')\nelse:\n print(\'No\')\n', '"""\n"""\n\n\ndef int_as_array(num): return list(map(int, [y for y in str(num)]))\n\n\ndef array_as_int(arr): return int(\'\'.join(map(str, arr)))\n\n\ndef read_int(): return int(input())\n\n\ndef read_array(): return list(map(int, input().split(\' \')))\n\n\ndef array_to_string(arr, sep=\' \'): return sep.join(map(str, arr))\n\n\ndef matrix_to_string(arr, sep=\' \'): return \'[\\n\' + \'\\n\'.join(\n [sep.join(map(str, row)) for row in arr]) + \'\\n]\'\n\n\ndef solve(string):\n if string != string[::-1]:\n return False\n first = string[0:(len(string) - 1) // 2]\n if first != first[::-1]:\n return False\n second = string[(len(string) + 2) // 2:]\n if second != second[::-1]:\n return False\n return True\n\n\nstring = input()\nif solve(string):\n print(\'Yes\')\nelse:\n print(\'No\')\n']
['Wrong Answer', 'Accepted']
['s259508681', 's634775262']
[3064.0, 3064.0]
[17.0, 18.0]
[782, 781]
p02730
u004482945
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s = list(input())\na = (len(s) - 1)/2\nb = s[:a]\nc = b[::-1]\nif b == c:\n print('Yes')\nelse:\n print('No')", "s = list(input())\ns_reverse = s[::-1]\na = int((len(s) - 1)/2)\nb = s[:a]\nc = b[::-1]\nif b == c and s == s_reverse:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s437538126', 's901694007']
[2940.0, 3060.0]
[18.0, 17.0]
[104, 148]
p02730
u006883624
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['def main():\n S = input()\n N = len(S)\n\n if check(S[:(N-1)//2]) and check(S[(N+3)//2-1:]):\n print("Yes")\n else:\n print("No")\n\n\ndef check(s):\n print(s)\n for i in range(len(s) // 2):\n c1 = s[i]\n c2 = s[-(i+1)]\n if c1 != c2:\n return False\n return True\n\nmain()', 'def main():\n S = input()\n N = len(S)\n\n if check(S) and check(S[:(N-1)//2]) and check(S[(N+3)//2-1:]):\n print("Yes")\n else:\n print("No")\n\n\ndef check(s):\n #print(s)\n for i in range(len(s) // 2):\n c1 = s[i]\n c2 = s[-(i+1)]\n if c1 != c2:\n return False\n return True\n\nmain()']
['Wrong Answer', 'Accepted']
['s507096831', 's999022151']
[3060.0, 3060.0]
[17.0, 17.0]
[321, 335]
p02730
u008911501
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s=input()\nn=len(s)\ndef p(s):\n return s==s[::-1]\nif p(s[:(n-1)//2]):\n if p(s[(n+1)//2:]):\n print('Yes')\n else:\n print('No')\nprint('No')", "s=input()\nn=len(s)\ndef p(s):\n return s==s[::-1]\nif p(s[:(n-1)//2]):\n if p(s[(n+1)//2:]):\n print('Yes')\n exit()\n else:\n print('No')\n exit()\nprint('No')", "s=input()\nn=len(s)\ndef p(s):\n return s==s[::-1]\nif p(s):\n if p(s[:(n-1)//2]):\n if p(s[(n+1)//2:]):\n print('Yes')\n exit()\n else:\n print('No')\n exit()\nprint('No')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s458795533', 's867215833', 's050841378']
[2940.0, 2940.0, 3060.0]
[18.0, 17.0, 17.0]
[144, 166, 188]
p02730
u011062360
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s = list(input())\nx = len(s)\na = s[:x//2]\nb = s[x//2+1:]\nb.reverse()\ny = len(a)\n\nc = a[:y//2]\nd = a[y//2+1:]\nd.reverse()\ne = b[y//2+1:]\ne.reverse()\nf = b[:y//2]\n\nprint(c, d)\nprint(e,f)\nans = "No"\nif (x+1)%4 == 0:\n if a == b:\n if c == d:\n if a == b:\n ans = "Yes"\n\nprint(ans)\n', 's = list(input())\nl = len(s)\nans = "No"\nif s == s[::-1] and s[:(l-1)//2] == s[:(l-1)//2][::-1] and s[(l-1)//2+1:] == s[(l-1)//2+1:][::-1]:\n ans = "Yes"\nprint(ans)']
['Wrong Answer', 'Accepted']
['s340587269', 's962411394']
[3064.0, 3060.0]
[18.0, 17.0]
[310, 165]
p02730
u011202375
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S=input()\ni=0\nkot=[]\nfor a in S:\n kot.append(a)\ntok=list(reversed(kot))\n\n\nfor a in range(len(kot)):\n if kot[a]==tok[a]:\n i=0\n else:\n print("No")\n i=1\n break\nif i==0:\n for a in range(int((len(kot)-1)/2)):\n if kot[a]==tok[int((len(kot)-1)/2)-a-1]:\n i=0\n else:\n print("No")\n i=1\n break\nprint(i)\nif i==0:\n for a in range(int((len(kot)-1)/2)):\n if kot[int((len(kot)+3)/2)+a-1]==tok[-a-1]:\n i=0\n\n else:\n print("No")\n i=1\n break\nprint(i)\nif i==0:\n print("Yes")\n', 'S=input()\ni=0\nkot=[]\nfor a in S:\n kot.append(a)\ntok=list(reversed(kot))\n\nprint(tok)\nprint(kot)\nfor a in range(len(kot)):\n if kot[a]==tok[a]:\n i=0\n else:\n print("No")\n i=1\n break\nif i==0:\n for a in range(int((len(kot)-1)/2)):\n if kot[a]==tok[int((len(kot)-1)/2)-a-1]:\n i=0\n else:\n print("No")\n i=1\n break\nprint(i)\nif i==0:\n for a in range(int((len(kot)-1)/2)):\n if kot[int((len(kot)+3)/2)+a-1]==tok[-a-1]:\n i=0\n\n else:\n print("No")\n i=1\n break\nprint(i)\nif i==0:\n print("Yes")\n', 'S=input()\ni=0\nkot=[]\nfor a in S:\n kot.append(a)\ntok=list(reversed(kot))\n\nfor a in range(len(kot)):\n if kot[a]==tok[a]:\n i=0\n else:\n print("No")\n i=1\n break\nif i==0:\n for a in range(int((len(kot)-1)/2)):\n if kot[a]==tok[int((len(kot)-1)/2)-a-1]:\n i=0\n else:\n print("No")\n i=1\n break\n\nif i==0:\n for a in range(int((len(kot)-1)/2)):\n if kot[int((len(kot)+3)/2)+a-1]==tok[-a-1]:\n i=0\n\n else:\n print("No")\n i=1\n break\n\nif i==0:\n print("Yes")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s687153991', 's810178429', 's048173918']
[9132.0, 9000.0, 9068.0]
[31.0, 29.0, 27.0]
[644, 665, 627]
p02730
u013281968
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['st=input()\ndef iskaibun(s):\n print(s)\n if(s==""):\n return 1;\n else:\n if(s[0]==s[-1]):\n return iskaibun(s[1:-1])\n else:\n return 0\n\nl = len(st)\nq = (l-1)//2\nst1 = st[0:q]\n\nst2 = st[q+1:]\n\nif(st1 == st2[-1] and iskaibun(st1)==1 and iskaibun(st2)==1):\n print("Yes")\nelse:\n print("No")', 'st=input()\ndef iskaibun(s):\n print(s)\n if(s==""):\n return 1;\n else:\n if(s[0]==s[-1]):\n return iskaibun(s[1:-1])\n else:\n return 0\n\nl = len(st)\nq = (l-1)//2\nst1 = st[0:q]\n\nst2 = st[q+1:]\n\n\nif(st1 == st2[::-1] and iskaibun(st1)==1 and iskaibun(st2)==1):\n print("Yes")\nelse:\n print("No")', 'st=input()\ndef iskaibun(s):\n print(s)\n if(s==""):\n return 1;\n else:\n if(s[0]==s[-1]):\n return iskaibun(s[1:-1])\n else:\n return 0\n\nl = len(st)\nq = (l-1)//2\nst1 = st[0:q]\n\nst2 = st[q+1:]\n\nif(st1 == st2[:-1] and iskaibun(st1)==1 and iskaibun(st2)==1):\n print("Yes")\nelse:\n print("No")', 'st=input()\ndef iskaibun(s):\n if(s==""):\n return 1;\n else:\n if(s[0]==s[-1]):\n return iskaibun(s[1:-1])\n else:\n return 0\n\nl = len(st)\nq = (l-1)//2\nst1 = st[0:q]\n\nst2 = st[q+1:]\n\nif(st1 == st2[:-1] and iskaibun(st1)==1 and iskaibun(st2)==1):\n print("Yes")\nelse:\n print("No")', 'st=input()\ndef iskaibun(s):\n if(s==""):\n return 1;\n else:\n if(s[0]==s[-1]):\n return iskaibun(s[1:-1])\n else:\n return 0\n\nl = len(st)\nq = (l-1)//2\nst1 = st[0:q]\nst2 = st[q+1:]\n\nif(st1 == st2[::-1] and iskaibun(st1)==1 and iskaibun(st2)==1):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s131356437', 's424497518', 's434280635', 's649900008', 's615555554']
[3064.0, 3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 18.0, 17.0, 17.0]
[322, 325, 323, 312, 312]
p02730
u013956357
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['ef hantei(s):\n rev_s = s[::-1]\n\n for x in range(len(s)):\n if s[x] != rev_s[x]:\n return False\n \n return True\n\ns = input()\n\nif hantei(s) and hantei(s[:int((len(s)-1)/2)]) and hantei(s[int((len(s)+3)/2)-1:]):\n print("Yes")\nelse:\n print("No")\n', 'def hantei(s):\n rev_s = s[::-1]\n\n for x in range(len(s)):\n if s[x] != rev_s[x]:\n return False\n \n return True\n\ns = input()\n\nif hantei(s) and hantei(s[:int((len(s)-1)/2)]) and hantei(s[int((len(s)+3)/2)-1:]):\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s898620061', 's787397086']
[2940.0, 2940.0]
[17.0, 18.0]
[275, 276]
p02730
u016323272
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["S = input()\nN = len(S)\nr = (N-1)//2\nu = (N+3)//2\nif S==S[::-1] and S[:r]==S[r-1::-1] and S[u-1:]==S[:u:-1]:\n print('Yes')\nelse:\n print('No')", "S = input()\nN = len(S)\nr = (N-1)//2\nu = (N+3)//2\nif S==S[::-1] and S[:r]==S[:r][::-1] and S[u-1:]==S[u-1:][::-1]:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s650987461', 's141822505']
[3060.0, 3060.0]
[17.0, 17.0]
[146, 152]
p02730
u018771977
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["#! env/bin/local python3\n# -*- coding:utf-8 -*-\n\ns = input()\nls = len(s)\n\ndef is_kaibun(s):\n rs = s[::-1]\n\n if s == rs:\n return True\n else:\n return False\n\n\nflag = False\nif is_kaibun(s):\n if is_kaibun(s[:(ls-1)//2]):\n if is_kaibun(s[(ls+3)//2: ls]):\n flag = True\n\nprint('Yes' if flag else 'No')\n\n\n", "#! env/bin/local python3\n# -*- coding:utf-8 -*-\n\ns = input()\nls = len(s)\n\n\ndef is_kaibun(s):\n rs = s[::-1]\n print(s, rs)\n if s == rs:\n return True\n else:\n return False\n\n\nflag = False\nif is_kaibun(s):\n if is_kaibun(s[:(ls-1)//2]):\n if is_kaibun(s[(ls+3)//2-1: ls]):\n flag = True\n\nprint('Yes' if flag else 'No')\n\n\n", "#! env/bin/local python3\n# -*- coding:utf-8 -*-\n\ns = input()\nls = len(s)\n\n\ndef is_kaibun(s):\n rs = s[::-1]\n if s == rs:\n return True\n else:\n return False\n\n\nflag = False\nif is_kaibun(s):\n if is_kaibun(s[:(ls-1)//2]):\n if is_kaibun(s[(ls+3)//2-1: ls]):\n flag = True\n\nprint('Yes' if flag else 'No')\n\n\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s079446399', 's943190538', 's334429181']
[3060.0, 3060.0, 3060.0]
[17.0, 18.0, 18.0]
[340, 359, 342]
p02730
u019075898
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['#B\ndef isReverse(s):\n p1 = 0\n p2 = len(s) - 1\n flag = True\n while p1 <= p2:\n if s[p1] != s[p2]:\n flag = False\n p1 += 1\n p2 += -1\n return flag\nif __name__ == "__main__":\n s = input()\n s1 = s[:int((len(s) - 1) / 2)]\n s2 = s[int((len(s) + 1) / 2):]\n print(s, s1, s2)\n print(isReverse(s), isReverse(s1), isReverse(s2))\n if isReverse(s) and isReverse(s1) and isReverse(s2):\n print("Yes")\n else:\n print("No")', 'def isReverse(s):\n p1 = 0\n p2 = len(s) - 1\n flag = True\n while p1 <= p2:\n if s[p1] != s[p2]:\n flag = False\n p1 += 1\n p2 += -1\n return flag\nif __name__ == "__main__":\n s = input()\n s1 = s[:int((len(s) - 1) / 2)]\n s2 = s[int((len(s) + 1) / 2):]\n # print(s, s1, s2)\n # print(isReverse(s), isReverse(s1), isReverse(s2))\n if isReverse(s) and isReverse(s1) and isReverse(s2):\n print("Yes")\n else:\n print("No")']
['Wrong Answer', 'Accepted']
['s834372890', 's411743188']
[3064.0, 3064.0]
[17.0, 17.0]
[484, 485]
p02730
u021086907
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["S = input()\nN = len(S)\nS_list=[]\nfor i in S:\n S_list.append(i) \nrS_list = list(reversed(S_list))\nsecond_list = S_list[:(int((N-1)/2))]\nprint(f'second: {second_list}')\nrsecond_list = list(reversed(second_list))\nthird_list = S_list[(int(((N+3)-1)/2)):N]\nprint(f'third: {third_list}')\nrthird_list = list(reversed(third_list))\nif S_list == rS_list:\n \n if second_list == rsecond_list:\n \n if third_list == rthird_list:\n \n print('Yes') \n else:\n print('No') \nelse:\n print('No') ", "S = input()\nN = len(S)\nS_list=[]\nfor i in S:\n S_list.append(i) \nrS_list = list(reversed(S_list))\nsecond_list = S_list[:(int((N-1)/2))]\n#print(f'second: {second_list}')\nrsecond_list = list(reversed(second_list))\nthird_list = S_list[(int(((N+3)-1)/2)):N]\n#print(f'third: {third_list}')\nrthird_list = list(reversed(third_list))\nif S_list == rS_list:\n \n if second_list == rsecond_list:\n \n if third_list == rthird_list:\n \n print('Yes') \n else:\n print('No') \nelse:\n print('No') "]
['Wrong Answer', 'Accepted']
['s260162288', 's411316312']
[9152.0, 9116.0]
[32.0, 28.0]
[605, 609]
p02730
u023229441
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s=list(input())\nif s==s[::-1]:\n n=len(s)\n if s[:n//2-1]==s[:n//2-1:-1]:\n if s[n//2+1:]==s[n//2+1::-1]:\n print("Yes")\n exit()\nprint("No")', 's=list(input())\nn=len(s)\ndef qq(s):\n return s==s[::-1]\n\nif qq(s):\n if qq(s[:n//2]):\n if qq(s[n//2+1]):\n print("Yes")\n exit()\nprint("No")']
['Wrong Answer', 'Accepted']
['s013734339', 's282678809']
[3060.0, 3060.0]
[17.0, 17.0]
[151, 151]
p02730
u026788530
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S = input()\nN= len(S)\nS1=S[:(N-1)//2]\nS2=S[(N+1)//2:]\n\ndef solve(s):\n if s == s[::-1]:\n return True\n return False\n\nprint(S,S1,S2)\nif solve(S) and solve(S1) and solve(S2):\n print("Yes")\nelse:\n print("No")', 'S = input()\nN= len(S)\nS1=S[:(N-1)//2]\nS2=S[(N+1)//2:]\n\ndef solve(s):\n if s == s[::-1]:\n return True\n return False\n\nif solve(S) and solve(S1) and solve(S2):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s011710574', 's919227015']
[3060.0, 3060.0]
[17.0, 17.0]
[222, 207]
p02730
u031115006
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S=str(input())\n\nN=len(S)\ni=0\nr="No"\n\ns=int((N-1)/2)\nt=int((N+3)/2)\n\na=S[0:s]\nb=S[t-1:N]\n\nprint(a)\nprint(b)\n\nif(N==3 and S==S[::-1]):\n print("Yes")\nelif(S==S[::-1] and a==(a[::-1]) and b==(b[::-1])):\n print("Yes")\nelse:\n print("No")', 'S=str(input())\n\nN=len(S)\ni=0\nr="No"\n\ns=int((N-1)/2)\nt=int((N+3)/2)\n\na=S[0:s]\nb=S[t-1:N]\n\nif(N==3 and S==S[::-1]):\n print("Yes")\nelif(S==S[::-1] and a==(a[::-1]) and b==(b[::-1])):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s356118420', 's317086352']
[3064.0, 3064.0]
[17.0, 18.0]
[234, 215]
p02730
u032955959
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s=input()\nn=len(s)\np=n//2\nt=1\n\nfor i in range(p):\n if s[i]==s[p-1-i]:\n t=1\n else:\n t=0\n break;\n\nx=1\n\nfor i in range(p):\n if s[p+1+i]==s[n-1-i]:\n x=1\n else:\n x=0\n break\n\ny=1\n\nfor i in range(n):\n if s[i]==s[n-1-i]:\n y=1\n else:\n y=0\n break\n\nif (t==1 and x==1 and y==1):\n print('Yes')\nelse:\n print('No')", "s=input()\nn=len(s)\np=n//2\nt=1\n\nfor i in range(p):\n if s[i]==s[p-1-i]:\n t=1\n else:\n t=0\n break;\n\nx=1\n\nfor i in range(p):\n if s[p+1+i]==s[n-1-i]:\n x=1\n else:\n x=0\n break\n\ny=1\n\nfor i in range(n):\n if s[i]==s[n-1-i]:\n y=1\n else:\n y=0\n break\n\nif (t==1 and x==1 and y==1):\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s540139590', 's135047471']
[8984.0, 9084.0]
[22.0, 26.0]
[380, 382]
p02730
u036340997
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["def kai(s):\n n = len(s)\n for i in range(n):\n if s[i]!=s[n-i-1]:\n return False\n else:\n return True\n \ns = input()\nn = len(s)\nif kai(s) and kai(s[:(n-1)//2]) and kai(s[(n+3)//2:]):\n print('Yes')\nelse:\n print('No')\n", "def kai(s):\n n = len(s)\n for i in range(n):\n if s[i]!=s[n-i-1]:\n return False\n else:\n return True\n \ns = input()\nn = len(s)\nif kai(s) and kai(s[:(n-1)//2]) and kai(s[(n+1)//2]):\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s303676995', 's160994914']
[3060.0, 3060.0]
[17.0, 17.0]
[228, 227]
p02730
u038136206
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s = input()\nn = len(s)\ns1 = s[:(n - 1) // 2]\ns2 = s[(n + 3) // 2 - 1:]\nprint(s2)\nif s1 == s1[::-1] and s2 == s2[::-1]:\n print("Yes")\nelse:\n print("No")\n', 's = input()\nn = len(s)\ns1 = s[:(n - 1) // 2]\ns2 = s[(n + 1) // 2:]\nif s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s518827459', 's816976058']
[9108.0, 8856.0]
[32.0, 28.0]
[158, 161]
p02730
u039934639
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["S = input()\nN = int(len(S))\n\nx = (N-1)/2\ny = (N+3)/2\n\nif S[:x] == S[:x].reverse() and S[:y] == S[:y].reverse():\n print('Yes')\nelse:\n print('No')", "S = input()\nN = len(S)\n\nx = (N-1)/2\ny = (N+3)/2\n\n\nif S[:x] == S[:x].reverse() and S[:y] == S[:y].reverse():\n print('Yes')\nelse:\n print('No')", "S = str(input())\nN = int(len(S))\n\nx = int((N-1)/2)\ny = int((N+3)/2)\n\na = str(S[:x])\nb = str(S[y:N])\n\nif str(a) == str(reversed(a)) and str(b) == str(reversed(b)):\n print('Yes')\nelse:\n print('No')", "S = input()\nN = len(S)\n\nx = (N-1)/2\ny = (N+3)/2\n\na = S[:x]\nb = S[:y]\n\nif a == reversed(a) and b == reversed(b):\n print('Yes')\nelse:\n print('No')", "S = str(input())\nN = int(len(S))\n\nx = int((N-1)/2)\ny = int((N+3)/2)\n\na = str(S[:x])\nb = str(S[y:N])\n\nreverse_a = ''.join(list(reversed(a)))\nreverse_b = ''.join(list(reversed(b)))\n\nif str(a) == str(reverse_a) and str(b) == str(reverse_b):\n print('Yes')\nelse:\n print('No')", "S = str(input())\nN = int(len(S))\n\nx = int((N-1)/2)\ny = int((N+3)/2)\n\na = str(S[:x])\nb = str(S[y:N])\n\nreverse_S = ''.join(list(reversed(S)))\nreverse_a = ''.join(list(reversed(a)))\nreverse_b = ''.join(list(reversed(b)))\n\nif str(S) == str(reverse_S) and str(a) == str(reverse_a) and str(b) == str(reverse_b):\n print('Yes')\nelse:\n print('No')", "S = str(input())\nN = int(len(S))\n\nx = int((N-1)/2)\ny = int((N+3)/2)\n\na = str(S[:x])\nb = str(S[y:N-1])\n\nreverse_S = ''.join(list(reversed(S)))\nreverse_a = ''.join(list(reversed(a)))\nreverse_b = ''.join(list(reversed(b)))\n\nif str(S) == str(reverse_S) and str(a) == str(reverse_a) and str(b) == str(reverse_b):\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s020882184', 's230650679', 's289680176', 's347002436', 's538826229', 's564885203', 's669709313']
[3060.0, 3060.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0, 26.0, 17.0, 18.0, 18.0]
[146, 142, 197, 146, 272, 340, 342]
p02730
u041783158
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['def a(s):\n n = len(s)\n for i in range(n // 2):\n if s[i] != s[-(i + 1)]:\n return False\n\n return True\n\n\ndef test(s):\n if not a(s):\n return "No1"\n\n n = len(s)\n if not a(s[:(n - 1) // 2]):\n return "No1"\n\n if not a(s[(n + 3) // 2 - 1:]):\n return "No3"\n\n return "Yes"\n\n\nprint(test(input().strip())[:2])\n', 'def a(s):\n n = len(s)\n for i in range(n // 2):\n if s[i] != s[-(i + 1)]:\n return False\n\n return True\n\n\ndef test(s):\n if not a(s):\n return "No"\n\n n = len(s)\n if not a(s[:(n - 1) // 2]):\n return "No"\n\n if not a(s[(n + 3) // 2 - 1:]):\n return "No"\n\n return "Yes"\n\n\nprint(test(input().strip()))\n']
['Wrong Answer', 'Accepted']
['s221043597', 's119271655']
[3060.0, 3060.0]
[17.0, 17.0]
[322, 315]
p02730
u044138790
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s = input()\nn = len(s)\nt = s[0:(n+3)//2]\nu = s[-1:-(n+1)//2]\nif t == u:\n print('Yes')\nelse:\n print('No')", "s = input()\nn = len(s)\ns1 = s[0:(n-1)//2]\ns2 = s1[::-1]\ns3 = s[(n+3)//2-1:n]\ns4 = s3[::-1]\nif s1 == s2 == s3 == s4:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s891687804', 's685382691']
[3060.0, 3060.0]
[17.0, 17.0]
[106, 150]
p02730
u044220565
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["# coding: utf-8\nS = input()\nN = len(S)\nif S == S[::-1]:\n if S[:(N-1)//2] == S[:(N-1)//2][::-1]:\n if S[(N+3)//2:] == S[(N+3)//2:][::-1]:\n print('Yes')\n else:\n print('No')\n else:\n print('No') \nelse:\n print('No')", "# coding: utf-8\nS = input()\nN = len(S)\nif S == S[::-1]:\n if S[:(N-1)//2] == S[:(N-1)//2][::-1]:\n if S[(N+3)//2:] == S[(N+3)//2:][::-1]:\n print('Yes')\nelse:\n print('No')", "# coding: utf-8\nS = input()\nN = len(S)\nn1 = (N-1)//2 - 1\nn2 = (N+3)//2 - 1\nif S == S[::-1]:\n if S[:n1] == S[:n1][::-1]:\n if S[n2:] == S[n2:][::-1]:\n print('Yes')\n else:\n print('No')\n else:\n print('No') \nelse:\n print('No')", '# coding: utf-8\nimport sys\n#from operator import itemgetter\nsysread = sys.stdin.buffer.readline\nread = sys.stdin.buffer.read\n#from heapq import heappop, heappush\n#from collections import defaultdict\nsys.setrecursionlimit(10**7)\n#import math\n#from itertools import product#accumulate, combinations, product\n\n#import numpy as np\n#from copy import deepcopy\n#from collections import deque\ndef run():\n S = input()\n N = len(S)\n if S[:(N-1)//2] == S[:(N-1)//2][::-1] and S == S[::-1] and S[(N+3)//2-1:] == S[(N+3)//2-1:][::-1]:\n print(\'Yes\')\n else:\n print(\'No\')\nif __name__ == "__main__":\n run()\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s369488627', 's371346249', 's507351119', 's224204096']
[3060.0, 2940.0, 3060.0, 3060.0]
[17.0, 18.0, 17.0, 17.0]
[235, 178, 247, 649]
p02730
u048166300
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S=str(input())\nN=len(S)\np=0\na=0\nc=0\n\n\nfor i in range(int((N-1)/2)):\n if S[i]==S[-i-1]:\n p+=1\nif p==(N-1)/2:\n for i in range(int((N-1)/4)):\n T=S[:int((N-1)/2)]\n if T[i]==T[-i-1]:\n a+=1\n if a==int((N-1)/4):\n\n for y in range(int((N-(N+3)/2)/2)):\n\n F=S[int((N+3)/2)-1:]\n\n if F[y]==F[-y-1]:\n c+=1\n if c==(int((N-(N+3)/2)/2)):\n print("yes")\n else:\n print("No")\n\n\n else:\n print("No")\n\n\nelse:\n print("No")\n', 'S=str(input())\nN=len(S)\np=0\na=0\nc=0\nfor i in range(int((N-1)/2)):\n if S[i]==S[-i-1]:\n p+=1\nif p==(N-1)/2:\n for i in range(int((N-1)/4)):\n T=S[:int((N-1)/2)]\n if T[i]==T[-i-1]:\n a+=1\n if a==int((N-1)/4):\n for y in range(int((N-(N+3)/2)/2)):\n F=S[int((N+3)/2)-1:]\n if F[y]==F[-y-1]:\n c+=1\n if c==(int((N-(N+3)/2)/2)):\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s966058615', 's846026221']
[3064.0, 3064.0]
[18.0, 18.0]
[544, 535]
p02730
u050706842
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S = input()\n\n\ndef is_palindrome(s):\n N = len(s)\n half = N // 2\n f = s[:half]\n r = s[-half:][::-1]\n return f == r\n\n\nif (\n is_palindrome(S)\n and is_palindrome(S[: (len(S) - 1) // 2])\n and is_palindrome(S[(len(S) + 3) // 2 :])\n):\n print("Yes")\nelse:\n print("No")\n', 'import sys\n\nS = input()\n\n\ndef is_palindrome(s):\n N = len(s)\n half = N // 2\n f = s[:half]\n r = s[-half:][::-1]\n print(s, f, r)\n return f == r\n\n\nif is_palindrome(S) and is_palindrome(S[: len(S) // 2]):\n print("Yes")\nelse:\n print("No")\n', 'import sys\n\nS = input()\n\n\ndef is_palindrome(s):\n N = len(s)\n if N == 1:\n return True\n\n half = N // 2\n f = s[:half]\n r = s[-half:][::-1]\n return f == r\n\n\nif is_palindrome(S) and is_palindrome(S[: len(S) // 2]):\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s364468874', 's531305606', 's604495037']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[290, 257, 274]
p02730
u053035261
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["n = input()\nprint(n[::-1])\nif n == n[::-1]:\n zenhan = n[0:int(len(n)//2)]\n if zenhan == zenhan[::-1]:\n kouhan = n[int(len(n)//2)+1::]\n\n if kouhan == kouhan[::-1]:\n print('Yes')\n exit()\n\nprint('No')\n", "n = input()\nif n == n[::-1]:\n zenhan = n[0:int(len(n)//2)]\n if zenhan == zenhan[::-1]:\n kouhan = n[int(len(n)//2)+1::]\n\n if kouhan == kouhan[::-1]:\n print('Yes')\n exit()\n\nprint('No')\n"]
['Wrong Answer', 'Accepted']
['s926441710', 's610805760']
[2940.0, 3064.0]
[17.0, 17.0]
[240, 225]
p02730
u053699292
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["def check(s):\n\tl = len(s)\n\tc = 1\n\n\tif l != 1:\n\n\t\tif l % 2 == 1:\n\t\t\tl -= 1\n\n\t\tfor i in range(int(l/2)):\n\t\t\tif s[i] != s[0-1-i]:\n\t\t\t\tc = 0\n\n\treturn c\n\nif __name__ == '__main__':\n\tS = input()\n\tLEN = len(S)\n\tl = int((LEN-1)/2)\n\n\tr = l+1\n\ts1 = S[0:l]\n\ts2 = S[r:LEN]\n\n\tprint(s1)\n\tprint(s2)\n\n\tc = check(s1) * check(s2) * check(S)\n\n\tif c == 1:\n\t\tprint('Yes')\n\telse:\n\t\tprint('No')", "def check(s):\n\tl = len(s)\n\tc = 1\n\n\tif l != 1:\n\n\t\tif l % 2 == 1:\n\t\t\tl -= 1\n\n\t\tfor i in range(int(l/2)):\n\t\t\tif s[i] != s[0-1-i]:\n\t\t\t\tc = 0\n\n\treturn c\n\nif __name__ == '__main__':\n\tS = input()\n\tLEN = len(S)\n\tl = int((LEN-1)/2)\n\n\tr = l+1\n\ts1 = S[0:l]\n\ts2 = S[r:LEN]\n\n\tc = check(s1) * check(s2) * check(S)\n\n\tif c == 1:\n\t\tprint('Yes')\n\telse:\n\t\tprint('No')"]
['Wrong Answer', 'Accepted']
['s223251115', 's691621917']
[3064.0, 3064.0]
[17.0, 17.0]
[371, 348]
p02730
u054514819
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["S = input()\ndef check(s):\n return s[:int((len(s)-1)/2+1)]==s[int((len(s)-1)/2):][::-1]\nif check(S) and check(S[:int((len(S)-1)/2+1)]) and check(S[int((len(S)+3)/2):]):\n print('Yes')\nelse:\n print('No')", "S = input()\n\ndef check(s):\n return s==s[::-1]\n\nif check(S) and check(S[:int((len(S)-1)/2)]) and check(S[int((len(S)+3)/2-1):]):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s707271416', 's520111838']
[3060.0, 3060.0]
[17.0, 17.0]
[203, 163]
p02730
u055529891
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["#B\nS = input()\nn = len(S)\na = list(S)\nreva = a[n::-1]\nsub1 = a[0:(int((n-1)/2))]\nsub2 = a[int((n+3)/2-1):]\nprint([sub1, sub2])\nif a == reva and sub1 == sub1[len(sub1)::-1] and sub2 == sub2[len(sub2)::-1]:\n print('Yes')\nelse:\n print('No')\n", "#B\nS = input()\nn = len(S)\na = list(S)\nreva = a[n::-1]\nsub1 = a[0:(int((n-1)/2))]\nsub2 = a[int((n+3)/2-1):]\nif a == reva and sub1 == sub1[len(sub1)::-1] and sub2 == sub2[len(sub2)::-1]:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s479577721', 's906091179']
[3064.0, 3060.0]
[17.0, 17.0]
[244, 224]
p02730
u060012100
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S = String(input().length())\nif S == S[::-1]:\n print("Yes")\nelse:\n print("No")\n', 'S = input().length()\nif S == S[::-1]:\n print("Yes")\nelse:\n print("No")\n', 'S = input().length()\nif S == S[::-1]:\n print("Yes")\nelse:\n print("No")\n', "s = input()\nn = len(s)\nleft = s[:(n-1)//2]\nprint('Yes' if left == left[::-1] == s[(n+3)//2 - 1:] else 'No')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s041316575', 's369040888', 's682695998', 's745990925']
[2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0, 17.0]
[81, 73, 73, 108]
p02730
u060736237
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['def check(s):\n if len(s) % 2 == 0:\n L = len(s)//2\n head=s[:L]\n tale=s[L:]\n else:\n L = (len(s)-1)//2\n head = s[:L]\n tale = s[L+1:]\n print(s, head, tale)\n if head == tale[::-1]:\n return True\n return False\ns = input()\nif not check(s):\n print("No")\nelif not check(s[:(len(s)-1)//2]):\n print("No")\nelif not check(s[(len(s)+3)//2-1:]):\n print("No")\nelse:\n print("Yes")', 'def check(s):\n if len(s) % 2 == 0:\n L = len(s)//2\n head=s[:L]\n tale=s[L:]\n else:\n L = (len(s)-1)//2\n head = s[:L]\n tale = s[L+1:]\n print(s, head, tale)\n if head == tale[::-1]:\n return True\n return False\ns = input()\nif not check(s):\n print("No")\nelif not check(s[:(len(s)-1)//2]):\n print("No")\nelif not check(s[(len(s)+3)//2-1:]):\n print("No")\nelse:\n print("Yes")', 'def check(s):\n if len(s) % 2 == 0:\n L = len(s)//2\n head=s[:L]\n tale=s[L:]\n else:\n L = (len(s)-1)//2\n head = s[:L]\n tale = s[L+1:]\n if head == tale[::-1]:\n return True\n return False\ns = input()\nif not check(s):\n print("No")\nelif not check(s[:(len(s)-1)//2]):\n print("No")\nelif not check(s[(len(s)+3)//2-1:]):\n print("No")\nelse:\n print("Yes")\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s154591804', 's342178322', 's927068126']
[3064.0, 3064.0, 3064.0]
[18.0, 18.0, 18.0]
[438, 438, 414]
p02730
u061566631
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['import sys\ninput = sys.stdin.readline\n\n\ndef main():\n S = input().strip()\n N = len(S)\n for i in range(N):\n if S[i] == S[N-i-1]:\n print("No")\n exit()\n for i in range((N-1)//2):\n if not (S[i] == S[(N-1)//2-i-1] and S[(N+3)//2+i-1] == S[N-i-1]):\n print("No")\n exit()\n print("Yes")\n\n\nif __name__ == \'__main__\':\n main()\n', 'import sys\ninput = sys.stdin.readline\n\n\ndef main():\n S = input().strip()\n N = len(S)\n for i in range(N):\n if S[i] != S[N-i-1]:\n print("No")\n exit()\n for i in range((N-1)//2):\n if S[i] != S[(N-1)//2-i-1] or S[(N+3)//2+i-1] != S[N-i-1]:\n print("No")\n exit()\n print("Yes")\n\n\nif __name__ == \'__main__\':\n main()\n']
['Wrong Answer', 'Accepted']
['s150286368', 's045880395']
[3064.0, 3064.0]
[18.0, 17.0]
[390, 383]
p02730
u062754605
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S = input()\na = len(S)\nif S[:(a - 1) / 2] == S[(a + 1) / 2:]:\n print("Yes")\nelse:\n print("No")\n', 'S = input()\nn = len(S)\na = S[:int((n - 1) / 2)]\nb = S[int((n + 1) / 2):]\nif a == b:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s829977538', 's470781091']
[2940.0, 2940.0]
[17.0, 17.0]
[101, 123]
p02730
u062808720
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['# -*- coding: utf-8 -*-\n\nS = input()\nN = len(S)\n\nbefor = S[0:(( N ) // 2)]\nafter = S[(( N + 1) // 2):N]\nprint(befor)\nprint(after)\nif ( befor == after ) :\n print("Yes")\nelse :\n print("No")\n', '# -*- coding: utf-8 -*-\n\nS = input()\nN = len(S)\n\nbefor = S[0:(( N ) // 2)]\nafter = S[(( N + 1) // 2):N]\nif ( befor == after ) :\n print("Yes")\nelse :\n print("No")\n\n']
['Wrong Answer', 'Accepted']
['s831129424', 's842842449']
[2940.0, 2940.0]
[18.0, 18.0]
[194, 169]
p02730
u063346608
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S = input()\n\nflag = 0\nfor i in range(0, len(S), 1):\n\tif S[i] != S[len(S)-1-i]:\n\t\tflag = 1\n\nfor i in range(0, (len(S) + 1) //2, 1):\n\tif S[i] != S[len(S)//2-1-i]:\n\t\tflag = 1\n\nif flag == 0:\n\tprint("Yes")\nelse:\n\tprint("No")', 'S = input()\n\nflag = 1\nfor i in range(0,(len(S) - 1)//2 ):\n\tif S[i] != S[len(S) -1 -i]:\n\t\tflag = 0\n\t#print(i)\n#print(flag)\n\n#flag= 1\nfor i in range(0,((len(S)- 1)//2-1 )//2):\n\tif S[i] != S[(len(S) -1 )//2 -1 -i]:\n\t\tflag=0\n\t#print(i)\n#print(flag)\n\n#flag= 1\nfor i in range( (len(S) + 3 )//2-1, (3 * len(S)-1)//4 ):\n\tif S[i] != S[(len(S) -1 )//2 -1 -i]:\n\t\tflag=0\n#\tprint(i)\n\nif flag == 1:\n\tanswer = "Yes"\nelse:\n\tanswer = "No"\n\nprint(answer)\n ', 'S = input()\n\nflag = 1\nfor i in range(0,(len(S) - 1)//2 ):\n\tif S[i] != S[len(S) -1 -i]:\n\t\tflag = 0\n\t#print(i)\n#print(flag)\n\n#flag= 1\nfor i in range(0,((len(S)- 1)//2-1 )//2):\n\tif S[i] != S[(len(S) -1 )//2 -1 -i]:\n\t\tflag=0\n\t#print(i)\n#print(flag)\n\n#flag= 1\nfor i in range( (len(S) + 3 )//2-1, (3 * len(S)-1)//4 ):\n\tif S[i] != S[(len(S) -1 )//2 -1 -i]:\n\t\tflag=0\n#\tprint(i)\nprint(flag)\n ', 'S = input()\n\nflag = 0\nfor i in range(0, len(S), 1):\n\tif S[i] != S[len(S)-1-i]:\n\t\tflag = 1\n\nfor i in range(0, (len(S) + 1) //2, 1):\n\tif S[i] != S[len(S)//2-1-i]:\n\t\tflag = 1\n\nif flag == 0:\n\tprint("Yes")\nelse:\n\tprint("No")', 'S = input()\n\nflag = 0\nfor i in range(0, len(S), 1):\n\tif S[i] != S[len(S)-1-i]:\n\t\tflag = 1\n\nfor i in range(0, (len(S) + 1) //2, 1):\n\tif S[i] != S[(len(S)-1)//2-i]:\n\t\tflag = 1\n\nif flag == 0:\n\tprint("Yes")\nelse:\n\tprint("No")', 'S = "aacbaoooooo"\n\nflag = 1\nfor i in range(0,(len(S) - 1)//2 ):\n\tif S[i] != S[len(S) -1 -i]:\n\t\tflag = 0\n\t#print(i)\n#print(flag)\n\n#flag= 1\nfor i in range(0,((len(S)- 1)//2-1 )//2):\n\tif S[i] != S[(len(S) -1 )//2 -1 -i]:\n\t\tflag=0\n\t#print(i)\n#print(flag)\n\n#flag= 1\nfor i in range( (len(S) + 3 )//2-1, (3 * len(S)-1)//4 ):\n\tif S[i] != S[(len(S) -1 )//2 -1 -i]:\n\t\tflag=0\n\tprint(i)\nprint(flag)\n ', 'S = input()\n\nflag = 0\nfor i in range(0, len(S), 1):\n\tif S[i] != S[len(S)-1-i]:\n\t\tflag = 1\n\nfor i in range(0, len(S)//2, 1):\n\tif S[i] != S[len(S)//2-1-i]:\n\t\tflag = 1\n\nif flag == 0:\n\tprint("Yes")\nelse:\n\tprint("No")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s067752729', 's077221466', 's129955890', 's220106134', 's373439068', 's801991003', 's046625588']
[9056.0, 3064.0, 3064.0, 9124.0, 9128.0, 3064.0, 9112.0]
[26.0, 17.0, 18.0, 30.0, 27.0, 17.0, 29.0]
[219, 447, 392, 219, 221, 397, 212]
p02730
u064963667
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s = input()\nlength = len(s)\n\ndef palindrome(string):\n if string == string[::-1]:\n return True\n else:\n return False\n\nprint(s[:(length-1)//2],s[(length+1)//2:])\nif palindrome(s) and palindrome(s[:(length-1)//2]) and palindrome(s[(length+1)//2:]):\n print('Yes')\nelse:\n print('No')", "s = input()\nlength = len(s)\n\ndef palindrome(string):\n if string == string[::-1]:\n return True\n else:\n return False\n\nif palindrome(s) and palindrome(s[:(length-1)//2]) and palindrome(s[(length+1)//2:]):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s955984922', 's424227432']
[3060.0, 3060.0]
[17.0, 18.0]
[303, 260]
p02730
u065040863
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S = input()\nN = len(S)\nT = list(S)\ni = 0\n\nwhile i != int((N-1)/2):\n if T[i] != T[N-i-1]:\n print("No")\n break\n else:\n i = i+1\nif i == (N-1)/2:\n print("yes")', 'S = input()\nN = len(S)\nT = list(S)\ni = 0\nchack = 0\n\nif N > 3 or N < 99:\n chack = 1\n\nwhile i != int((N-1)/2):\n if T[i] != T[N-i-1]:\n chack = 1\n break\n else:\n i = i+1\n\ni = 0\nwhile i != int((N-1)/4):\n if T[i] != T[int((N-1)/2-i-1)]:\n chack = 1\n break\n else:\n i = i+1\n\ni = 0\nwhile i != int((N-1)/4):\n if T[int((N+1)/2)+i] != T[N-i-1]:\n chack = 1\n break\n else:\n i = i+1\n\nif chack == 0:\n print("yes")\nelse:\n print("No")\n', 'S = input()\nN = len(S)\nT = list(S)\ni = 0\nchack = 0\n\nwhile i != int((N-1)/2):\n if T[i] != T[N-i-1]:\n chack = 1\n break\n else:\n i = i+1\n\ni = 0\nwhile i != int((N-1)/4):\n if T[i] != T[int((N-1)/2-i-1)]:\n chack = 1\n break\n else:\n i = i+1\n\ni = 0\nwhile i != int((N-1)/4):\n if T[int((N+1)/2)+i] != T[N-i-1]:\n chack = 1\n break\n else:\n i = i+1\n\nif chack == 0:\n print("yes")\nelse:\n print("No")\n', 'S = input()\nN = len(S)\nT = list(S)\ni = 0\nchack = 0\n\nwhile i != int((N-1)/2):\n if T[i] != T[N-i-1]:\n chack = 1\n break\n else:\n i = i+1\n\ni = 0\nwhile i != int((N-1)/4):\n if T[i] != T[int((N-1)/2-i-1)]:\n chack = 1\n break\n else:\n i = i+1\n\ni = 0\nwhile i != int((N-1)/4):\n if T[int((N+1)/2)+i] != T[N-i-1]:\n chack = 1\n break\n else:\n i = i+1\n\nif chack == 0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s055045423', 's063329314', 's948147870', 's725877361']
[3060.0, 3064.0, 3064.0, 3064.0]
[17.0, 18.0, 17.0, 17.0]
[185, 504, 469, 468]
p02730
u065302334
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['str1 = input()\nn = len(str1)\nm = (n-1)/2\no = (n+3)/2\nstr2 = str1[:m]\nstr3 = str1[o:n]\nif str1 != str1[::-1]:\n\tprint("No")\nelse:\n \tif str2 != str2[::-1]:\n \tprint("No")\n else:\n \tif str3 != str3[::-1]:\n \tprint("No")\n else:\n \tprint("Yes")\n \t\n\t', 'str1 = input()\nn = len(str1)\nm = int((n-1)/2)\no = int((n+3)/2)\nstr2 = str1[:m]\nstr3 = str1[(o-1):n]\nif str1 != str1[::-1]:\n\tprint("No")\nelse:\n if str2 != str2[::-1]:\n\t print("No")\n else: \n if str3 != str3[::-1]:\n print("No")\n else:\n print("Yes")']
['Runtime Error', 'Accepted']
['s114217323', 's133131752']
[2940.0, 3064.0]
[17.0, 17.0]
[273, 292]
p02730
u066551652
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['S = str(input())\nN = len(S)\n\nS1 = S[0:N//2]\nS1_1=S1[0:len(S)//4]\nS1_2=S1[len(S)//4+1:]\nprint(S1_1, S1_2)\n\nS2= S[N//2+1:]\nS2_1=S2[0:len(S)//4]\nS2_2=S2[len(S)//4+1:]\nprint(S2_1, S2_2)\n\nif S1_1 == S1_2 and S2_1 == S2_2:\n print("Yes")\nelse:\n print("No")', 'S = str(input())\nN = len(S)\n\nS1 = S[0:N//2]\nS1_1=S1[0:len(S)//4]\nS1_2=S1[len(S)//4:len(S)//2]\n\n\nS2= S[N//2+1:]\nS2_1=S2[0:len(S)//4]\nS2_2=S2[len(S)//4:len(S)//2]\n\n\nif S1_1 == S1_2 and S2_1 == S2_2:\n print("Yes")\nelse:\n print("No")', 's = str(input())\nn = len(s)\n\ns_inv = s[::-1]\n\nt = s[0:(n-1)//2]\nt_inv = t[::-1]\n\nu = s[(n+3) // 2 - 1:]\nu_inv = u[::-1]\n\nif s==s_inv and t == t_inv and u == u_inv:\n print(\'Yes\')\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s083780100', 's943720337', 's871524592']
[3064.0, 3064.0, 3060.0]
[19.0, 17.0, 17.0]
[255, 235, 202]
p02730
u075303794
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["import numpy as np\n\nS = np.array([i for i in input()])\nS_rev = S[::-1]\nN = len(S)\n\nans = 'No'\n\nif all(S == S_rev):\n temp_S = S[:(N-1)//2+1]\n temp_S_rev = temp_S[::-1]\n \n if all(temp_S == temp_S_rev):\n temp_S = S[(N+3)//2:]\n temp_S_rev = temp_S[::-1]\n \n if all(temp_S == temp_S_rev):\n ans = 'Yes'\nprint(ans)", "import numpy as np\n\nS = np.array([i for i in input()])\nS_rev = S[::-1]\nN = len(S)\n\nans = 'No'\n\nif all(S == S_rev):\n temp_S = S[:(N-1)//2]\n temp_S_rev = temp_S[::-1]\n \n if all(temp_S == temp_S_rev):\n temp_S = S[(N+3)//2-1:]\n temp_S_rev = temp_S[::-1]\n \n if all(temp_S == temp_S_rev):\n ans = 'Yes'\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s396870647', 's520816302']
[12400.0, 12384.0]
[150.0, 153.0]
[327, 327]
p02730
u075595666
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s = list(input())\nt = s[::-1]\nn = len(s)\nif s != t:\n print ('No')\n exit()\nif n == 3:\n print('Yes')\n exit()\nd = s[:int((n-1)/2)+1]\ne = d[::-1]\nr = s[int((n+3)/2-1):]\nq = r[::-1]\n#print(r,q)\nif d != e:\n print('No')\n exit()\nif r != q:\n print ('No')\n exit()\n \nprint('Yes')", "s = list(input())\nt = s[::-1]\nn = len(s)\nif s != t:\n print ('No')\n exit()\nif n == 3:\n print('Yes')\n exit()\nd = s[:int((n-1)/2)+1]\ne = d[::-1]\n#print(d,e)\nr = s[int((n+3)/2-1):]\nq = r[::-1]\n#print(r,q)\nif d != e:\n print('No')\n exit()\nif r != q:\n print ('No')\n exit()", "s = list(input())\nt = s[::-1]\nn = len(s)\nif s != t:\n print ('No')\n exit()\nif n == 3:\n print('Yes')\n exit()\nd = s[:int((n-1)/2)]\ne = d[::-1]\n#print(d,e)\nr = s[int((n+3)/2-1):]\nq = r[::-1]\n#print(r,q)\nif d != e:\n print('No')\n exit()\nif r != q:\n print ('No')\n exit()\n \nprint('Yes')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s933882767', 's948575339', 's494535007']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0]
[277, 273, 287]
p02730
u076360626
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["def kaibun(str):\n return True if str == str[::-1] else False\n\ns = input()\nif not kaibun(s) :\n print('No')\n return\nn = len(s)\nn1 = (n - 1) // 2\nif not kaibun(s[:n1]) :\n print('No')\n return\nn2 = (n + 3) // 2 - 1\nif not kaibun(s[n2:]) :\n print('No')\n return\nprint('Yes')", "def resolve():\n s = input()\n if not kaibun(s) :\n print('No')\n return\n n = len(s)\n n1 = (n - 1) // 2\n if not kaibun(s[:n1]) :\n print('No')\n return\n n2 = (n + 3) // 2 - 1\n if not kaibun(s[n2:]) :\n print('No')\n return\n print('Yes')\n\ndef kaibun(str):\n return True if str == str[::-1] else False\n\nresolve()"]
['Runtime Error', 'Accepted']
['s194811586', 's059886361']
[3064.0, 3064.0]
[17.0, 17.0]
[288, 370]
p02730
u077291787
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['\ndef main():\n S = input().rstrip()\n mid = len(S) // 2 + 1\n left, right = S[:mid], S[mid + 1 :]\n is_palindrome = S == S[::-1]\n check_left = left == left[::-1]\n check_right = right == right[::-1]\n print("Yes" if is_palindrome and check_left and check_right else "No")\n\n\nif __name__ == "__main__":\n main()\n', '\ndef main():\n S = input().rstrip()\n N = len(S)\n left, right = S[: (N - 1) // 2], S[(N + 3) // 2 - 1:]\n is_palindrome = S == S[::-1]\n check_left = left == left[::-1]\n check_right = right == right[::-1]\n print("Yes" if is_palindrome and check_left and check_right else "No")\n\n\nif __name__ == "__main__":\n main()\n']
['Wrong Answer', 'Accepted']
['s723529420', 's912857263']
[3060.0, 3060.0]
[17.0, 18.0]
[350, 357]
p02730
u079827881
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s = list(input())\n\nthresh_1 = int((len(s) - 1) / 2)\nthresh_2 = int((len(s) + 3) / 2)\n\ns_1 = s[:thresh_1]\ns_2 = s[thresh_2 - 1:]\nprint(s_1)\nprint(s_2)\nif s == s[::-1] and s_1 == s_1[::-1] and s_2 == s_2[::-1]:\n print('Yes')\nelse:\n print('No')\n", "s = list(input())\n\nthresh_1 = int((len(s) - 1) / 2)\nthresh_2 = int((len(s) + 3) / 2)\n\ns_1 = s[:thresh_1]\ns_2 = s[thresh_2 - 1:]\n\nif s == s[::-1] and s_1 == s_1[::-1] and s_2 == s_2[::-1]:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s537540882', 's983404498']
[3060.0, 2940.0]
[17.0, 17.0]
[248, 227]
p02730
u080364835
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s = input()\nn = len(s)\ns1 = s[:(n-1)//2]\ns2 = s1[::-1]\n\ns3 = s[(n+3)//2-1:]\ns4 = s3[::-1]\n\ns0 = s[::-1]\n\nprint(s1, s2)\nprint(s3, s4)\n\nif s1 == s2 and s3 == s4 and s == s0:\n print('Yes')\nelse:\n print('No')", "s = input()\nn = len(s)\ns1 = s[:(n-1)//2]\n\nif s == s[::-1] and s1 == s1[::-1]:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s294771922', 's322832887']
[3064.0, 2940.0]
[18.0, 17.0]
[210, 116]
p02730
u083874202
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['import random\n\na = random.uniform(1, 2)\n\nif(a == 1):\n print("Yes")\nelse:\n print("No")\n ', 'kaibun = input()\nNList = list(kaibun)\nN = len(NList)\n\nT1 = True\nT2 = True\nT3 = True\n\nfor s in range(len(NList)):\n if NList[s] != NList[len(NList) - (s+1)]:\n T1 = False\n break\n\n\nNList = list(kaibun[0:int((N - 1)/2)])\n\nfor s in range(len(NList)):\n if NList[s] != NList[len(NList) - (s+1)]:\n T2 = False\n break\n\nNList = list(kaibun[int(((N+3)/2)-1):N])\nfor s in range(len(NList)):\n if NList[s] != NList[len(NList) - (s+1)]:\n T3 = False\n break\n\nif T1 and T2 and T3:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s019381100', 's263682289']
[3440.0, 3064.0]
[22.0, 18.0]
[92, 550]
p02730
u085530099
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["import math\ns = input()\nn = len(s)\nzen_c = 0\nz = math.floor((n-1)/2)\nk = math.floor((n+2)/2)\nzenhan = s[0:z]\nkouhan = s[k:n]\nzen_l = len(zenhan)-1\ncount = 0\nfor i in range(0, n):\n if s[i] == s[n-i-1]:\n count += 1\nfor i in range(0, math.floor((zen_l+1)/2)):\n if zenhan[i] == zenhan[zen_l-i] and i != (zen_l-i):\n print(zenhan[i])\n zen_c += 1\nzen_l = math.floor(zen_l/2)\nn = math.floor((n-1)/2)\nprint('Yes' if zen_c == zen_l and zenhan == kouhan else 'No')", "import math\ns = input()\nn = len(s)\nzen_c = 0\nkou_c = 0\nz = math.floor((n-1)/2)\nk = math.floor((n+2)/2)\nzenhan = s[0:z]\nkouhan = s[k:n]\nzen_l = len(zenhan)-1\nfor i in range(0, math.floor((zen_l+1)/2)):\n if zenhan[i] == zenhan[zen_l-i] and i != (zen_l-i):\n zen_c += 1\nprint('Yes' if zen_c == math.floor(z/2) and zenhan == kouhan else 'No')"]
['Wrong Answer', 'Accepted']
['s352356393', 's423408863']
[3064.0, 3064.0]
[18.0, 18.0]
[464, 341]
p02730
u086438369
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s = input()\n\nif s[:(n-1)/2] == s[(n+3)/2:] and s[:(n-1)/2] == s[(n+3)/2:]:\n print('Yes')\nelse:\n print('No')", "s = input()\nn = len(s)\n\nif s[:int((n-1)/2)] == s[int((n+3)/2)-1:] and s[:int((n-1)/2)] == (s[int((n+3)/2)-1:])[::-1]:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s436904266', 's748887201']
[2940.0, 2940.0]
[17.0, 17.0]
[109, 153]
p02730
u088115428
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s= input()\nl = list(s)\nans= "No"\nfor i in range(0,(len(s)-1)//2):\n if(l[i]!=l[-1-i]):\n ans = "No"\nprint(ans)', 's= input()\nl = list(s)\nans= "Yes"\nif(s != s[::1]):\n ans = "No"\n break\nelse:\n s1 = s[:len(s)//2]\n s2 = s[len(s)//2+1:]\n if s1!=s2:\n print("No")\n else:\n print("Yes")\nprint(ans)\n', 's= input()\nl = list(s)\nans= "Yes"\nfor i in range(0,(len(s)-1)//2):\n if(l[i]!=l[-1-i]):\n ans = "No"\n break\n else:\n s1 = s[:len(s)//2]\n s2 = s[len(s)//2+1:]\n if s1!=s2:\n print("No")\n else:\n print("Yes")\nprint(ans)\n', 's= str(input())\nif s != s[::-1]:\n print("No")\n exit()\nelse:\n s1 = s[:len(s)//2]\n s2 = s[len(s)//2+1:]\n if (s1!=s2):\n print("No")\n else:\n print("Yes")']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s068495273', 's130090456', 's394414039', 's032365981']
[2940.0, 2940.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[112, 207, 282, 181]
p02730
u089622972
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s = input().strip()\nn = len(s)\n\ndef is_kaibun(s):\n n = len(s)\n head = s[:(n - 1) // 2]\n tail = s[(n + 3) // 2-1:]\n print("head = {} tail = {}".format(head, tail[::-1]))\n return head == tail[::-1]\n\nif is_kaibun(s) and is_kaibun(s[:(n-1)//2]) and is_kaibun(s[(n+3)//2-1:]):\n print("Yes")\nelse:\n print("No")\n', 's = input().strip()\nn = len(s)\n\ndef is_kaibun(s):\n n = len(s)\n head = s[:(n - (n % 2)) // 2]\n tail = s[(n+(n%2)) // 2:]\n \n return head == tail[::-1]\n\nif is_kaibun(s) and is_kaibun(s[:(n-1)//2]) and is_kaibun(s[(n+3)//2-1:]):\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s460127788', 's557706342']
[3060.0, 3060.0]
[18.0, 17.0]
[326, 333]
p02730
u091307273
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s = input()\nn = len(s)\n\nt = s[:(n-1)//2]\nu = s[(n+3)//2:]\n\nif (s == s[::-1]\n and len(t) > 0\n and len(u) > 0\n and t == t[::-1]\n and u == u[::-1]):\n print('Yes')\nelse:\n print('No')\n \n", "s = input()\nn = len(s)\nif (s == s[::-1]\n and s[:(n-1)//2] == s[:(n-1)//2:-1]\n and s[(n+3)//2:] == s[(n+3)//2::-1]):\n print('Yes')\nelse:\n print('No')\n ", "s = input()\nn = len(s)\n\nt = s[:(n-1)//2]\nu = s[(n+3)//2:]\n\nif (s == s[::-1]\n and len(t) > 0 and len(u) > 0 and\n and t == t[::-1]\n and u == u[::-1]):\n print('Yes')\nelse:\n print('No')\n \n", "s = input()\nn = len(s)\n\nt = s[:(n-1)//2]\nu = s[(n+3)//2:]\n\nif (s == s[::-1]\n and t == t[::-1]\n and u == u[::-1]):\n print('Yes')\nelse:\n print('No')\n \n", "s = input()\nn = len(s)\n\nt = s[:(n-1)//2]\nu = s[(n+3)//2-1:]\n\nif (s == s[::-1]\n and t == t[::-1]\n and u == u[::-1]):\n print('Yes')\nelse:\n print('No')\n \n"]
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s000994160', 's724394437', 's854532221', 's890230382', 's348907131']
[9112.0, 9072.0, 9032.0, 8992.0, 9036.0]
[29.0, 28.0, 26.0, 27.0, 25.0]
[196, 159, 196, 158, 160]
p02730
u092646083
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['def kaibunCheck(s):\n flag = True\n n = len(s)\n for i in range((n + 1) // 2):\n if s[i] != s[(i + 1) * (-1)]:\n flag = False\n \n return flag\n \nS = input()\nN = len(S)\n\nS1 = S[:(N - 1) // 2]\nS2 = S[(N + 1) // 2 :]\n\nif kaibunCheck(S) == True and kaibunCheck(S1) == True and kaibunCheck(S2) == True:\n print("Yes")\nelse:\n print("No")', 'def kaibunCheck(s):\n flag = True\n n = len(s)\n for i in range((n + 1) // 2):\n if s[i] != s[(i + 1) * (-1)]:\n flag = False\n\n return flag\n \nS = input()\nN = len(S)\n\nS1 = S[:(N - 1) // 2]\nS2 = S[(N + 1) // 2 :]\n\nif kaibunCheck(S) == True and kaibunCheck(S1) == True and kaibunCheck(S2) == True:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s101550804', 's293093056']
[2940.0, 3064.0]
[18.0, 17.0]
[355, 343]
p02730
u093861603
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s=input()\nflag=True\nn=len(s)\nif s!=s.reversed():\n flag=False\nif s[:(n-1)/2]!=s[:(n-1)/2].reversed():\n flag=False\nif s[(n+3)/2-1:]!=s[(n+3)/2-1:].reversed():\n flag=False\nprint("Yes" if flag else "No")\n\n', '\ns=input()\nflag=True\nn=len(s)\nif s!=s[::-1]:\n print(reversed(s))\n flag=False\nif s[:(n-1)//2]!=s[-1:(n-1)//2:-1]:\n print(reversed(s[:(n-1)//2]))\n flag=False\nif s[(n+3)//2-1:]!=s[-1:(n+3)//2-1:-1]:\n print(reversed(s[(n+3)//2-1:]))\n flag=False\nprint("Yes" if flag else "No")\n', 's=input()\nflag=True\nn=len(s)\nif s!=reversed(s):\n flag=False\nif s[:(n-1)//2]!=reversed(s[:(n-1)//2]):\n flag=False\nif s[(n+3)//2-1:]!=reversed(s[(n+3)//2-1:]):\n flag=False\nprint("Yes" if flag else "No")\n', 's=input()\nflag=True\nn=len(s)\nif s!=s.reversed():\n flag=False\nif s[:(n-1)/2]!=s[:(n-1)/2:-1]:\n flag=False\nif s[(n+3)/2-1:]!=s[(n+3)/2-1::-1]:\n flag=False\nprint("Yes" if flag else "No")\n\n', 's=input()\na=s\ns=a\nflag=True\nn=len(s)\nif s!=s.reversed():\n flag=False\nif s[:(n-1)/2]!=s[:(n-1)/2].reversed():\n flag=False\nif s[(n+3)/2-1:]!=s[(n+3)/2-1:].reversed():\n flag=False\nprint("Yes" if flag else "No")\n\n', 's=str(input())\nflag=True\nn=len(s)\nif s!=s.reversed():\n flag=False\nif s[:(n-1)/2]!=s[:(n-1)/2].reversed():\n flag=False\nif s[(n+3)/2-1:]!=s[(n+3)/2-1:].reversed():\n flag=False\nprint("Yes" if flag else "No")\n\n', 's=input()\nflag=True\nn=len(s)\nif s!=reversed(s):\n flag=False\nif s[:(n-1)/2]!=reversed(s[:(n-1)/2]):\n flag=False\nif s[(n+3)/2-1:]!=reversed(s[(n+3)/2-1::-1]):\n flag=False\nprint("Yes" if flag else "No")\n', 's=input()\nflag=True\nn=len(s)\nif s!=reversed(s):\n flag=False\nif s[:(n-1)//2]!=reversed(s[:(n-1)//2]):\n flag=False\nif s[(n+3)//2-1:]!=reversed(s[(n+3)//2-1::-1]):\n flag=False\nprint("Yes" if flag else "No")\n', '\ns=input()\nflag=True\nn=len(s)\nif s!=s[::-1]:\n flag=False\nif s[:(n-1)//2]!="".join(list(reversed(s[:(n-1)//2]))):\n flag=False\nif s[(n+3)//2-1:]!="".join(list(reversed(s[(n+3)//2-1:]))):\n flag=False\nprint("Yes" if flag else "No")']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s044920185', 's209441609', 's344298655', 's344406995', 's638810669', 's663383074', 's671420132', 's733026039', 's913935165']
[3060.0, 3064.0, 3060.0, 3064.0, 3060.0, 3060.0, 3060.0, 3060.0, 3064.0]
[18.0, 17.0, 18.0, 18.0, 18.0, 17.0, 17.0, 17.0, 17.0]
[210, 290, 210, 194, 218, 215, 209, 213, 236]
p02730
u094425865
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["b = s[:m]\n\nfor i in range(int(m/2)):\n if b[i:(i+1)] != b[(m-i-1):m-i]:\n print('No')\n sys.exit()\nm = int((n+3)/2)\nb = s[m-1:]\nm= len(b)\nfor i in range(int(m/2)):\n if b[i:(i+1)] != b[(m-i-1):m-i]:\n print('No')\n sys.exit()\nprint('Yes')", "import sys\ns = input()\n\nn = len(s)\nm = int((n-1)/2)\nb = s[:m]\n\nfor i in range(int(m/2)):\n if b[i:(i+1)] != b[(m-i-1):m-i]:\n print('No')\n sys.exit()\nm = int((n+3)/2)\nb = s[m-1:]\nm= len(b)\nfor i in range(int(m/2)):\n if b[i:(i+1)] != b[(m-i-1):m-i]:\n print('No')\n sys.exit()\nfor i in range(int(n/2)):\n if s[i:(i+1)] != s[(n-i-1):n-i]:\n print('No')\n sys.exit() \nprint('Yes')"]
['Runtime Error', 'Accepted']
['s279172136', 's023886951']
[3064.0, 3188.0]
[18.0, 22.0]
[266, 422]
p02730
u098982053
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['def kaibun(s):\n n = len(s)\n if n%2==0:\n S1 = s[:n//2]\n S2 = s[n//2:]\n for i in range(n//2):\n if S1[i]!=S2[i]:\n return False\n return True\n else:\n S1 = s[:n//2]\n S2 = s[n//2+1:]\n for i in range(n//2-1):\n if S1[i]!=S2[i]:\n return False\n return True\n \nS = input()\n# print(len(S))\ns1 = S[:int((len(S)-1)/2)+1]\ns2 = S[int((len(S)+3)/2)-1:]\n\ns_b = kaibun(S)\ns1_b = kaibun(s1)\ns2_b = kaibun(s2)\n\nif (s_b and s1_b and s2_b):\n print("Yes")\nelse:\n print("No")\n', '# coding: utf-8\n# Your code here!\ndef kaibun(s):\n n = len(s)\n if n%2==0:\n s1 = s[:n//2]\n s2 = s[n//2:]\n else:\n s1 = s[:(n-1)//2]\n s2 = s[((n-1)//2)+1:]\n \n m = len(s1)\n for i in range(m):\n if s1[i]!=s2[m-i-1]:\n return False\n return True\n \nS = input()\nN = len(S)\nS1 = S[:(N-1)//2]\nS2 = S[(N+3)//2-1:]\n\nb1 = kaibun(S)\nb2 = kaibun(S1)\nb3 = kaibun(S2)\n\nif b1 and b2 and b3:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s587486792', 's898340381']
[3064.0, 3064.0]
[17.0, 18.0]
[579, 477]
p02730
u101839330
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s = input()\nn = len(s)\nfor i in range((n//2)):\n if(s[i] != s[-(i+1)]):\n print("No")\n exit()\nfor i in range(((n//2)//2)):\n print(s[i],s[((n//2)-1)-i])\n if((s[i] != s[((n//2)-1)-i]) and s[((n+3)/2) != s[-(i+1)]]):\n print("No")\n exit()\nprint("Yes")', 's = input()\nn = len(s)\nfor i in range((n//2)):\n if(s[i] != s[-(i+1)]):\n print("No")\n exit()\nfor i in range(((n//2)//2)):\n if((s[i] != s[((n//2)-1)-i]) and (s[((n+3)/2) != s[-(i+1)]])):\n print("No")\n exit()\nprint("Yes")']
['Wrong Answer', 'Accepted']
['s932441204', 's301918493']
[3064.0, 3064.0]
[17.0, 17.0]
[260, 232]
p02730
u106095117
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s = input()\ns_len = len(s)\ns1 = s[0:int((s_len - 1) / 2)]\ns2 = s[int((s_len + 3) / 2) - 1:s_len]\n\nprint(s1)\nprint(s2)\n\nif s1 == s1[::-1] and s2 == s2[::-1]:\n print('Yes')\nelse:\n print('No')\n", "s = input()\ns_len = len(s)\ns1 = s[0:int((s_len - 1) / 2)]\ns2 = s[int((s_len + 3) / 2) - 1:s_len]\nif s1 == s1[::-1] and s2 == s2[::-1] and s == s[::-1]:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s121313461', 's488736169']
[3060.0, 2940.0]
[17.0, 17.0]
[196, 191]
p02730
u106181248
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s = input()\nn = s.size()\nans=""\n \nhalf = s[0:(n-1)/2]\n \nif s==s[::-1] and half==half[::-1]:\n\tans = "Yes"\nelse:\n\tans = "No"\n \nprint(ans)', 's = input()\nn = s.size()\nans=""\n \nhalf = s[0:(n-1)/2]\n \nif(s==s[::-1] && half==half[::-1]){\n\tans = "Yes";\n}\nelse\n\tans = "No";\n \nprint(ans)\n}', 's = input()\nn = len(s)\nans=""\n \nhalf = s[:int((n-1)/2)]\n \nif s==s[::-1] and half==half[::-1]:\n\tans = "Yes"\nelse:\n\tans = "No"\n \nprint(ans)\n\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s302699923', 's990720476', 's760685217']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[136, 141, 140]
p02730
u110615365
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['a = input();\ncnt = 0;\nif(a == a[::-1]):\n\tcnt+=1\nn = len(a)\nif(a[:(n-1)//2] == a[:(n-1)//2:-1):\n cnt+=1\nif(a[(n+3)//2::-1] == a[(n+3)//2:]):\n cnt+=1\nif(cnt == 3):\n print("Yes")\nelse:\n \tprint("No")', 'a = input();\ncnt = 0;\nif(a == a[::-1]):\n\tcnt+=1\nn = len(a)\nif(a[:(n-1)//2] == a[:(n-1)//2:-1]):\n cnt+=1\nif(a[(n+3)//2::-1] == a[(n+3)//2:]):\n cnt+=1\nif(cnt == 3):\n print("Yes")\nelse:\n \tprint("No")\n', 'a = input();\ncnt = 0;\nif(a == a[::-1]):\n\tcnt+=1\nn = len(a)\nif(a[:(n-1)//2] == a[:(n-1)//2:-1]):\n cnt+=1\nif(a[(n+3)//2-1::][::-1] == a[(n+3)//2-1:]):\n cnt+=1\nif(cnt == 3):\n print("Yes")\nelse:\n \tprint("No")\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s202344825', 's333327352', 's204685561']
[2940.0, 3064.0, 3064.0]
[17.0, 18.0, 17.0]
[206, 208, 216]
p02730
u111652094
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['import sys\n\nS=str(input())\nN=len(S)\n\nN1=int((N-1)/2)\nN2=int((N+3)/2-1)\n\nS1=list(S[:N1])\nS2=list(S[N2:])\n\n\nS3=list(reversed(S1))\nS4=list(reversed(S2))\nSr=list(reversed(S))\n\nif S==Sr:\n if S1==S3:\n if S2==S4:\n print("Yes")\n sys.exit()\nprint("No")', 'import sys\n\nS=list(str(input()))\nN=len(S)\n\nN1=int((N-1)/2)\nN2=int((N+3)/2-1)\n\nS1=list(S[:N1])\nS2=list(S[N2:])\n\n\nS3=list(reversed(S1))\nS4=list(reversed(S2))\nSr=list(reversed(S))\n\nif S==Sr:\n if S1==S3:\n if S2==S4:\n print("Yes")\n sys.exit()\nprint("No")\n']
['Wrong Answer', 'Accepted']
['s302801286', 's548174881']
[3064.0, 3064.0]
[17.0, 17.0]
[275, 282]
p02730
u112247039
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s=input().strip();\tn=len(S)\nprint("Yes" if s==s[::-1] and s[:(n-1)//2]==s[:(n-1)//2][::-1] and s[(n+3)//2-1:]==s[(n+3)//2-1:][::-1] else "No")', 's=input().strip();\tn=len(s)\nprint("Yes" if s==s[::-1] and s[:(n-1)//2]==s[:(n-1)//2][::-1] and s[(n+3)//2-1:]==s[(n+3)//2-1:][::-1] else "No")']
['Runtime Error', 'Accepted']
['s334524843', 's738953447']
[3060.0, 3060.0]
[18.0, 17.0]
[142, 142]
p02730
u113991073
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s=input()\nn=len(s)\nflag=0\n\n\nfor i in range((n-1)//2):\n if s[i]==s[n-1-i]==s[((n-1)//2)-1-i]:\n flag=flag+1\n\nif v==((n-1)//2)\n print("Yes")\nelse:\n print("No")', 'def kaibun(s):\n for _ in range(n//2):\n if s[_]==s[n-_-1]:\n continue\n else:\n return False\n return True\n\ns=input()\nn=len(s)\nif kaibun(s) and kaibun(s[:(n-1)//2])and kaibun(s[(n+3)//2-1:]):\n print("Yes")\nelse:\n print("No")', 's=input()\nn=len(s)\nflag=0\n\n\nfor i in range((n-1)//2):\n if s[i]==s[n-1-i]==s[((n-1)//2)-1-i]:\n flag=flag+1\n\nif flag==((n-1)//2):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s316475100', 's540944856', 's889153004']
[2940.0, 3060.0, 3060.0]
[18.0, 18.0, 17.0]
[172, 267, 176]
p02730
u118665579
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['str = input()\n\nstr1 = str[::-1]\na = str1 == str\nstr2 = str[:int((len(str)-1)/2)]\nstr3 = str2[::-1]\nb = str3 == str2\nstr4 = str[int((len(str)+3)/2)-1:]\nstr5 = str4[::-1]\nc = str5 == str4\nprint(a, b, c)\nif a and b and c:\n print("Yes")\nelse:\n print("No")', 'str = input()\n\nstr1 = str[::-1]\na = str1 == str\nstr2 = str[:int((len(str)-1)/2)]\nstr3 = str2[::-1]\nb = str3 == str2\nstr4 = str[int((len(str)+3)/2)-1:]\nstr5 = str4[::-1]\nc = str5 == str4\nif a and b and c:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s125219670', 's653006431']
[3064.0, 3064.0]
[17.0, 19.0]
[257, 242]
p02730
u124498235
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['\nn, m = map(int, input().split())\nimport math\ndef comb(n, r):\n\treturn math.factorial(s) // (math.factorial(s - r) * math.factorial(s))\nprint (comb(n,2) + comb(m,2))', 's = input()\nn = len(s)\nif s != s[::-1]:\n\tprint ("No")\n\texit()\nif s[:n//2] != s[:n//2][::-1]:\n\tprint ("No")\n\texit()\nif s[(n+3)//2-1:] != s[(n+3)//2-1:][::-1]:\n\tprint ("No")\n\texit()\nprint ("Yes")']
['Runtime Error', 'Accepted']
['s177294325', 's984595605']
[3064.0, 3064.0]
[17.0, 22.0]
[164, 193]
p02730
u127110353
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['string = input()\n\nmiddle=len(string)//2\n\ndef isPal(string):\n return string==string[::-1]\n\nif isPal(string):\n if isPal(string[:middle]):\n print(True)\n else:\n print(False)\nelse:\n print(False)', 'import sys\ninpt = sys.stdin.readline()\n\nstp=len(inpt)//2\nscnd_str=stp+1\n\nfrst=inpt[:stp]\nscnd=inpt[scnd_str:]\n\nif frst!=scnd:\n print("No")\nelse:\n print("Yes")', 'import sys\ninpt = sys.stdin.readline()\nfrst_stp=(len(inpt)-1)//2\nstp=frst_stp+1\nscnd_stp=frst_stp+2\nfrst=[]\nscnd=[]\n\nfor number,i in enumerate(inpt):\n index=number+1\n if index<=frst_stp:\n frst.append(i)\n elif index==stp:\n pass\n else:\n scnd.append(i)\n\nif "".join(frst)=="".join(scnd):\n print("Yes")\nelse:\n print("No")', 'string = input()\n\nmiddle=len(string)//2\n\ndef isPal(string):\n return string==string[::-1]\n\nif isPal(string):\n if isPal(string[:middle]):\n print("True")\n else:\n print("False")\nelse:\n print("False")', 'string = input()\n\nmiddle=len(string)//2\n\ndef isPal(string):\n return string==string[::-1]\n\nif isPal(string):\n if isPal(string[:middle]):\n print("Yes")\n else:\n print("No")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s423281287', 's616296125', 's698531023', 's705346341', 's749769703']
[2940.0, 3064.0, 3064.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0, 17.0, 18.0]
[215, 164, 355, 221, 214]
p02730
u129961029
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["s=input()\nsl=len(s)\nif s[:(sl-1)/2]==s[((sl+3)/2)-1:]:\n print('Yes')\nelse :\n print('No')\n", "s=input()\nsl=len(s)\nif s[:int((sl-1)/2)]==s[int(((sl+3)/2)-1):]:\n print('Yes')\nelse :\n print('No')\n"]
['Runtime Error', 'Accepted']
['s178758699', 's204941646']
[3064.0, 2940.0]
[19.0, 17.0]
[95, 105]
p02730
u130492706
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\ns = input()\n\nif s[0] == s[-1] and s[1] == s[-2] and s[2] == s[-3] and s[0] == s[1]:\n print('Yes')\nelse:\n print('No')", "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\ns = input()\nc = 0\nfor i in range((len(s) - 1)// 2):\n if s[i] == s[-1 - i] and s[i] == s[(len(s) - 1)// 2 - 1 - i]:\n pass\n else:\n c += 1\n break\n\nif c == 0:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s837197675', 's181870700']
[2940.0, 3060.0]
[18.0, 18.0]
[170, 268]
p02730
u131666536
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['# -*- coding: utf-8 -*-\n"""\nCreated on Thu Mar 19 11:55:12 2020\n\n@author: 17664\n"""\nkaibun = input()\njoken1 = kaibun[:(len(kaibun)-1)//2]\n\njoken2 = kaibun[(len(kaibun)+2)//2:]\n\n\nans = \'yes\'\n\nif kaibun != kaibun[::-1]:\n ans = \'no\'\nif joken1 != joken1[::-1]:\n ans = \'no\'\nif joken2 != joken2[::-1]:\n ans = \'no\'\n \nprint(ans)', '# -*- coding: utf-8 -*-\n"""\nCreated on Thu Mar 19 11:55:12 2020\n\n@author: 17664\n"""\nkaibun = input()\njoken1 = kaibun[:(len(kaibun)-1)//2]\n\njoken2 = kaibun[(len(kaibun)+2)//2:]\n\n\nans = \'no\'\n\nif kaibun == kaibun[::-1] and joken1 == joken1[::-1] and joken2 == joken2[::-1]:\n ans = \'yes\'\n \nprint(ans)', '# -*- coding: utf-8 -*-\n"""\nCreated on Thu Mar 19 11:55:12 2020\n\n@author: 17664\n"""\nkaibun = input()\njoken1 = kaibun[:(len(kaibun)-1)//2]\n\njoken2 = kaibun[(len(kaibun)+2)//2:]\n\n\nans = \'No\'\n\nif kaibun == kaibun[::-1] and joken1 == joken1[::-1] and joken2 == joken2[::-1]:\n ans = \'Yes\'\n \nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s451082329', 's668891464', 's050625531']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[362, 332, 332]
p02730
u131881594
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
['s=input()\nn=len(s)\nif s==s[::-1]:\n if s[0:n//2]==s[0:n//2:-1]:\n if s[n//2+2:n]==s[n//2+2:n:-1]:\n print("Yes")\n exit()\nprint("No")', 's=input()\nn=len(s)\ns1=s[0:n//2]\ns2=s[n//2+1:n]\nif s=s[::-1]and s1=s1[::-1] and s2=s2[::-1]: print("Yes")\nelse: print("No")', 's=input()\nn=len(s)\ns1=s[0:n//2]\ns2=s[n//2+1:n]\nif s==s[::-1]and s1==s1[::-1] and s2==s2[::-1]: print("Yes")\nelse: print("No")']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s282018287', 's435491615', 's489560053']
[9116.0, 8904.0, 9000.0]
[29.0, 27.0, 27.0]
[143, 122, 125]
p02730
u132331017
2,000
1,048,576
A string S of an odd length is said to be a _strong palindrome_ if and only if all of the following conditions are satisfied: * S is a palindrome. * Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome. * The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome. Determine whether S is a strong palindrome.
["def kaibun(mojiretu):\n leg = len(mojiretu)\n mid = (leg-1) /2\n for i in range(mid):\n if mojiretu[i] != mojiretu[(mid+1)+i]:\n return False\n return True\n\ninput_line = input()\nif not kaibun(input_line):\n print('No')\n quit()\n\nmid = (leg-1) /2\nif not kaibun(input_line[0:mid]):\n print('No')\n quit()\n\nif not kaibun(input_line[mid+1:]):\n print('No')\n quit()", "def fin():\n print('No')\n quit()\n\ninput_line = input()\nif not input_line == input_line[::-1]:\n fin()\n\nN = len(input_line)\nnew_str = input_line[0:(N-1)//2]\nif not new_str == new_str[::-1]:\n fin()\n\nprint('Yes')"]
['Runtime Error', 'Accepted']
['s405506806', 's892478570']
[3064.0, 3060.0]
[18.0, 17.0]
[397, 219]