s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s082330749 | p03671 | u318073603 | 1499108821 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 37 | a,b,c = map(int,raw_input().split()) |
s587563079 | p03671 | u318073603 | 1499108206 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 61 | a,b,c = map(int,raw_input().split())
print(min(a+b,b+c,a+c)) |
s060819609 | p03671 | u318073603 | 1499107887 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | a,b,c = map(int,raw_input().split())
d = a + b
e = b + c
f = a + c
print(min(d,e,f))
|
s942367551 | p03671 | u374514823 | 1499020839 | Python | Python (3.4.3) | py | Runtime Error | 159 | 15236 | 421 | from scipy.misc import comb
n = int(input())
a = list(map(int, input().split()))
appeared = {}
double = [0, 0]
for i, v in enumerate(a):
if v in appeared:
double = [appeared[v], i]
break
else:
appeared[v] = i
duplicateElemSize = double[0] + n - double[1]
for i, v in enumerate(a):
... |
s268959547 | p03671 | u374514823 | 1499016032 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3316 | 275 | from collections import deque
n = int(input())
a = map(int, input().split())
b = deque([])
for index, value in enumerate(a):
if index % 2 == 0:
b.appendleft(value)
else:
b.append(value)
if n % 2 == 0:
b = reversed(b)
print(" ".join(map(str, b))) |
s983171225 | p03671 | u432042540 | 1499014145 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 128 | a, b, c = [int(i) for i in input().split()]
if a > b:
swap(a, b)
if b > c:
swap(b, c)
if a > b:
swap(a, b)
print(a+b)
|
s411294551 | p03671 | u846372029 | 1498982785 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 715 | #11
n = int(input())
a = list(map(int, input().split()))
f = [-1]*(n+1)
p = 0
for i in range(n+1):
t = a[i]
if ( f[t] == -1 ):
f[t] = i
else:
p = i - f[t] - 1
break
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
mod = 10**9 + 7
for i in range( 2, n + 2 ):
g1.append( ( g1[-1] * i ) % ... |
s482096545 | p03671 | u846372029 | 1498982341 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 667 | #11
n = int(input())
a = list(map(int, input().split()))
flag = [a.count(a[i])-1 for i in range(n+1) ]
p = flag.index(1) + list(reversed(flag)).index(1)
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
mod = 10**9 + 7
for i in range( 2, n + 2 ):
g1.append( ( g1[-1] * i ) % mod )
inverse.append( ( -inverse[mod % i] * ... |
s448406728 | p03671 | u846372029 | 1498982237 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 863 | MOD = 10**9+7
n = int(input())
la = list(map(int,input().split()))
L = [-1]*(n+1)
l = 0
for i in range(n+1):
a = la[i]
if L[a] == -1:
L[a] = i
else:
l = i - L[a] - 1
break
MAX = n
factorial = [1, 1]
inverse = [0, 1]
inverse_factorial = [1, 1]
for i in range(2,MAX+1):
factorial.append( (factorial[-... |
s791056823 | p03671 | u846372029 | 1498981806 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 761 | MOD = 10**9+7
n = int(input())
la = list(map(int,input().split()))
L = [-1]*(n+1)
l = 0
MAX = n
factorial = [1, 1]
inverse = [0, 1]
inverse_factorial = [1, 1]
for i in range(2,MAX+1):
factorial.append( (factorial[-1]*i)%MOD )
inverse.append( (-inverse[MOD%i]*(MOD//i))%MOD )
inverse_factorial.append( (inverse_fa... |
s828063218 | p03671 | u552668967 | 1498964233 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 87 | from sys import stdin
a = map(int,stdin.readline().split())
a.sort()
print a[0] + a[[1] |
s544062450 | p03671 | u079937957 | 1498962434 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 229 | def gyaku(x):
y = []
for i in range(len(x)):
y.append(x.pop())
return y
n = input()
a = map(int, raw_input().split())
b = []
for i in range(n):
b.append(a[i])
b = gyaku(b)
print(' '.join(map(str, b))) |
s459938109 | p03671 | u741323288 | 1498960078 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 61 | N = int(input())
a = list(map(int, input().split()))
print(N) |
s132180266 | p03671 | u741323288 | 1498960034 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 52 | N = int(input())
a = list(map(int, input().split())) |
s793249271 | p03671 | u654399305 | 1498959986 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 237 | import sys
inputStr = sys.argv
a = int(inputStr[1])
b = int(inputStr[2])
c = int(inputStr[3])
if((a>=1)and(a<=10000)and(b>=1)and(b<=10000)and(c>=1)and(c<=10000)):
val = [ a+b, a+c, b+c]
print max(val)
else:
print 'value is wrong' |
s432375134 | p03671 | u486232694 | 1498959907 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 145 | #!/usr/bin/python
n = map(int, raw_input())
dt = map(int, raw_input().split())
ans = []
for i in dt:
ans.append(i)
ans.reverse()
print(ans) |
s584442838 | p03671 | u654399305 | 1498959641 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 162 | import sys
inputStr = sys.argv
a = int(inputStr[1])
b = int(inputStr[2])
c = int(inputStr[3])
#print a, b, c
val = [ a+b, a+c, b+c]
#print val
print max(val) |
s259699249 | p03671 | u764868186 | 1498958976 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 145 | n = int(input())
a = [int(x) for x in input().split()]
b = []
for i in range(n):
b.append(a[i])
b.reverse()
print(" ".join(map(str, b)))
|
s535536214 | p03671 | u909304507 | 1498958926 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 420 | # coding: utf-8
def get_ln_inputs():
return input().split()
def get_ln_int_inputs():
return list(map(int, get_ln_inputs()))
def main():
n = get_ln_int_inputs()[0]
a = get_ln_int_inputs()
ilist = []
t = n
while t > 0:
ilist.append(t)
t -= 2
t += 1
while t < n:
... |
s186711040 | p03671 | u652737716 | 1498958836 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 434 |
N = int(input())
inp = [int (x) for x in input().split(" ")]
refs = [0 for _ in range(N)]
k = len(inp) - 1
rev = True
for i in range(N):
refs[i] = k
if k == 1 and rev:
k = -2
rev = False
if k == 0 and rev:
k = -1
rev = False
k = k - 2 if rev else k + 2
#print(" ".join(... |
s654158907 | p03671 | u654399305 | 1498958679 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 162 | import sys
inputStr = sys.argv
a = int(inputStr[1])
b = int(inputStr[2])
c = int(inputStr[3])
#print a, b, c
val = [ a+b, a+c, b+c]
#print val
print max(val) |
s815598388 | p03671 | u503052349 | 1498958371 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 293 | import sys
a=0
b=0
c=0
x=3
v,y,z =[int(x) for x in input().split(" ")]
a = v+y
b = y+z
c = z+v
if a<b and a<c:
print (a)
if b<c and b<a:
print (b)
if c<b and c<a:
print (c)
if a=b and b=c:
print (a)
if a=b and b<c:
print (a)
if a=c and a<b:
print (a)
if c=b and b<a:
print (c) |
s144943566 | p03671 | u676010704 | 1498957595 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 209 | import sys
def main():
a = int(sys.argv[1])
b = int(sys.argv[2])
c = int(sys.argv[3])
bells = [a, b, c]
bells.sort()
print(bells[0] + bells[1])
if __name__ == '__main__':
main() |
s868167795 | p03672 | u014139588 | 1600745236 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9036 | 112 | s = input()
for i in range(1,len(s)//2):
if s[:(n-2*i)//2] == s[(n-2*i)//2:n-2*i]:
print(n-2*i)
exit() |
s904270589 | p03672 | u085186789 | 1600662099 | Python | Python (3.8.2) | py | Runtime Error | 31 | 8820 | 108 | S = input()
for i in range(1, len(S)):
s = S[:-i]
l = len(s) / 2
if s[:l] == s[l:]:
print(len(s))
|
s425135887 | p03672 | u085186789 | 1600660825 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8944 | 123 | s = input()
for i in range(int(len(s) + 1) / 2):
if s[i] != s[int(len(s) + 1) / 2]:
del[len(s) - 1]
print(len(s) + 1) |
s352629606 | p03672 | u397496203 | 1599331257 | Python | PyPy3 (7.3.0) | py | Runtime Error | 83 | 74712 | 132 | S = input()
while True:
S = S[:-1]
mid = len(S)//2
if S[:mid] == S[mid:]:
print(len(S))
break
elif S = "":
break |
s445442775 | p03672 | u917879786 | 1599297495 | Python | PyPy3 (7.3.0) | py | Runtime Error | 89 | 74728 | 123 | S = input().strip()
while len(S) > 0:
S = S[:-1]
mid = len(S)//2
if S[:mid] == S[mid:]:
print(len(S))
break
|
s547886975 | p03672 | u705418271 | 1599276940 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9112 | 219 | s=str(input())
flag=0
for i in range(len(s)):
s=s[:len(s)-2*i]
for j in range(len(s)//2):
if s[j]!=s[len(s)-j]:
flag=1
break
if flag==0:
print(len(s))
exit()
else:
flag=0
continue |
s058739623 | p03672 | u620846115 | 1598881105 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9064 | 110 | n = input()
num = len(n)-2
for i in range(num,0,-2):
f = int(i/2)
if s[:f]==s[f:i]:
print(i)
break |
s897522982 | p03672 | u620846115 | 1598881024 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9000 | 109 | n = input()
num = len(s)-2
for i in range(num,0,2):
f = int(i/2)
if s[:f]==s[f:i]:
print(i)
break |
s969302514 | p03672 | u620846115 | 1598818290 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9072 | 160 | a = [list(map(str(input().split())))]
while True:
h = int(len(a)/2)
for i in range(h-1):
if all(a[i]==a[i+h]):
print(len(a))
exit()
a[:-1] |
s258479911 | p03672 | u620846115 | 1598818069 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9140 | 142 | a = str(input())
while True:
h = int(len(a)/2)
for i in range(h-1):
if all(a[i]==a[i+h]):
print(len(a))
exit()
a.pop(-1) |
s417923742 | p03672 | u620846115 | 1598817885 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9068 | 138 | a = str(input())
while True:
for i in range(len(a)//2):
if all(a[i]==a[i+(len(a)//2)]):
print(len(a))
exit()
a.pop(-1) |
s839647951 | p03672 | u848535504 | 1598761785 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8948 | 171 | import itertools
l = list(map(int,input().split()))
com = list(itertools.combinations(l,2))
k = []
for i in range(len(com)):
k.append(sum(com[i]))
print(min(k)) |
s830582102 | p03672 | u468972478 | 1598406262 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8936 | 80 | n = input()[:-1]
while n[:len(n)//2] != [len(n)//2:]:
n = n[:-1]
print(len(n)) |
s392588524 | p03672 | u655048024 | 1598376158 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9048 | 176 | s = str(input())
sl = list(s)
ans = 0
del s[-1]
for i in range(1,len(s)):
if(len(s)%2==0):
if(s[:len(s2//2)]==s[len(s)//2:]):
ans = len(s)
break
print(ans)
|
s650618820 | p03672 | u277318398 | 1598193675 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8932 | 580 | #include<bits/stdc++.h>
using namespace std;
int main(){
string s; cin >> s;
string tmp="", left="", right="";
int ans = 0;
int n = s.length();
for(int i=1; i<n; i++){
tmp = s.substr(0, n-i);
if(tmp.length()%2 != 0){
continue;
}else{
int t_len = tmp.l... |
s112629549 | p03672 | u786020649 | 1595889265 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9000 | 102 | s=input()
n=len(s)//2
for x in range(1,n):
if s[:n-i]==s[n-i:2*n-2*i]:
print(2*n-2*i)
break |
s431333695 | p03672 | u090406054 | 1593032323 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9224 | 178 | s=list(input())
from copy import copy
t=s.copy()
for i in range(len(t)):
if len(s)%2==0 and s[:len(s)/2]==s[len(s)/2:]:
print(len(s))
exit()
else:
s.pop(-1)
|
s287990503 | p03672 | u090406054 | 1593025517 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9032 | 30 | s=int(input())
print(len(s)/2) |
s281175624 | p03672 | u350093546 | 1591605170 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 155 | s=input()
s=s.replace(s[-1],'')
while True:
s=s.replace(s[-1],'')
if len(s)%2==0 and s[:len(s)//2]==s[len(s)//2:]:
print(len(s))
break
|
s457190116 | p03672 | u757274384 | 1591465392 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 289 | s = input()[:-1]
length = len(s)
for a in range(length, 1, -1):
temp = s[:a]
if len(temp) %2 == 0:
half = len(temp)//2
if temp[:half] == temp[half:]:
ans = len(temp)
break #ここでbreakするために,forを"大きいところ"から回してる
print(ans) |
s381526349 | p03672 | u730769327 | 1591249022 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 38256 | 144 | s=list(input())
n=len(s)
s1=s[:n//2]
s2=s[n//2:]
for i in range(n//2):
s2=s1[-1]+s2[:-2]
s1=s1[:-1]
if s2==s1:
break
print(len(s1+s2)) |
s270507735 | p03672 | u730769327 | 1591248990 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38512 | 143 | s=list(input())
n=len(s)
s1=s[:n//2]
s2=s[n//2:]
for i in range(n//2):
s2=s1[-1]+s2[:-2]
s1=s1[:-1]
if s2==s1:
break
print(len(s1+s2) |
s303269145 | p03672 | u344065503 | 1590366132 | Python | PyPy3 (2.4.0) | py | Runtime Error | 184 | 38384 | 93 | s=int(input())
n=len(s)//2
while n!=0:
if s[:n]==s[n:2*n]:
print(n)
break
n=-1 |
s452661133 | p03672 | u991134049 | 1590365352 | Python | PyPy3 (2.4.0) | py | Runtime Error | 169 | 38256 | 152 | S = list(input())[::-1]
s = len(S)
ans = 0
for i in range(s):
if S[2*i:(2*i+s)/2+0.5] == S[(2*i+s)/2+0.5:]:
ans = s-2*i
break
print(ans)
|
s414446827 | p03672 | u863044225 | 1589504663 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 90 | s=input()
for i in range(len(s)/2-1,0,-1):
if s[0:i]==s[i:i+i]:
print(i)
exit(0) |
s961093199 | p03672 | u629350026 | 1589420751 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3060 | 227 | s=str(input())
s=list(s)
while True:
del s[len(s)-1]
if len(s)%2==0:
count=0
for i in range(0,int(len(s)/2)):
if s[i]==s[i+int(len(s)/2)]:
count=count+1
if count==int(len(s)/2):
print(len(s)) |
s599859524 | p03672 | u970809473 | 1588780933 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 141 | s = input()
for i in range(len(s)):
s.pop(-1)
if len(s) % 2 == 0:
if s[:len(s)//2] == s[len(s)//2:]:
print(len(s))
break
|
s777012289 | p03672 | u992910889 | 1588765610 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38256 | 396 | python-scipy-connected-components/
# from scipy.sparse import csr_matrix
# import string
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()
def resolve():
s= str(input())
ls=len(s)
cur=ls//2
i=0
while True:
i+=1
cur-=1
if s[:cur]=... |
s913044042 | p03672 | u042105122 | 1588764910 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 598 | #include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <queue>
#include <stack>
using namespace std;
typedef long long int ll;
typedef pair<int, int> Pii;
const ll mod = 1000000007;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string s;
cin >> s;
... |
s993013890 | p03672 | u285891772 | 1588728417 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 883 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ... |
s341089540 | p03672 | u153823221 | 1587595241 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 287 | s = list(str(input()))
s_rev = list(reversed(s))
n = len(s_rev)
for i in range(len(s_rev)):
del s_rev[0]
if len(s_rev) % 2 == 1:
continue
elif s[0:len(s_rev) // 2] != s[len(s_rev) // 2:len(s_rev)]:
continue
elif len(s_rev) != 0:
print(len(s_rev))
|
s959945426 | p03672 | u252964975 | 1587520942 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 148 | S=str(input())
for i in range(len(S)):
s = S[0:len(S)-i]
if len(s)%2 == 0:
if s[0:len(s)/2] == s[len(s)/2:len(s)]:
break
print(len(s)) |
s072161965 | p03672 | u581603131 | 1587328637 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 127 | S = input
while len(S)!=0:
S.pop()
if len(S)%2==0 and S[0:len(S)/2]==S[len(S)/2:]:
print(len(S))
exit() |
s281719496 | p03672 | u781262926 | 1587180602 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 129 | S = input().sprit()
n = len(S)
for i in range(n-2, 0, -2):
S = S[:i]
k = i // 2
if S[k:] == S[:k]:
print(i)
exit() |
s969987079 | p03672 | u623819879 | 1586650760 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38384 | 94 | s=input()
n=len(s)
print(max([n-i for i in range(0,n//2,2) if s[:(n-i)//2]==s[(n-i)//2:-i]])) |
s953929435 | p03672 | u623819879 | 1586650729 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38384 | 94 | s=input()
n=len(s)
print(max([n-i for i in range(0,n//2,2) if s[:(n-i)//2]==s[(n-i)//2:-i]])) |
s378884226 | p03672 | u623819879 | 1586650685 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38384 | 93 | s=input()
n=len(s)
prnt(max([n-i for i in range(0,n//2,2) if s[:(n-i)//2]==s[(n-i)//2:-i]])) |
s275982770 | p03672 | u852790844 | 1586644170 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 118 | s = deque(input())
while True:
s.pop()
if s[:len(s)//2] == s[len(s)//2:]:
print(len(s))
break |
s304867183 | p03672 | u696444274 | 1586540665 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 235 | s = input()
for i in range(1, len(s)):
a = collections.Counter(s[0:-i])
even = True
for j in a.values():
if j%2!=0:
even=False
if even:
print(len(s[0:-i]))
exit()
#print(a) |
s991390723 | p03672 | u440161695 | 1586526891 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 107 | S=input()
for i in range(N-1):
S=S[:-1]
N=len(S)//2
if S==S[:N]*2:
print(N*2)
exit()
print(1) |
s314837599 | p03672 | u718758485 | 1585052121 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 97 | s=input()
n=len(s)
for i in range(n/2):
s=s[:-2]
if s[:len(s)]==s[len(s):]:
print(len(s)) |
s972913626 | p03672 | u524870111 | 1584532986 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 430 | #create date: 2020-03-18 07:48
import sys
stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))
def main():
s = ns()
s0 = s[0]
n = len(s)
m = (n-1)//2 + 1
for i in range(1, m, 2):
if s[i] == s0:
... |
s020171589 | p03672 | u863044225 | 1584532696 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | s=input()
n=len(s)
for i in range(1,n+1):
if s[0:i]==s[i:i+i]:
print(i)
break: |
s071830597 | p03672 | u524870111 | 1584532540 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 442 | #create date: 2020-03-18 07:48
import sys
stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))
def main():
s = ns()
s0 = s[0]
for i in range(1, len(s)//2, 2):
if s[i] == s0:
if s[:i] ==s[i:2*i... |
s067788897 | p03672 | u478266845 | 1582281360 | Python | Python (3.4.3) | py | Runtime Error | 150 | 13588 | 303 | import numpy as np
S = str(input())
import numpy as np
for i in range(1,int(np.floor(len(S)/2))):
j = int(np.floor(len(S)/2)) - i
print(j)
if first_str == second_str:
num = 2*j
break
elif (first_str != second_str) & (j==1):
num = 0
break
print(num)
|
s178230516 | p03672 | u414458988 | 1580259316 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38256 | 123 | s=list(input())
while len(s) != 0:
s.pop()
if len(s)%2==0 and s[:len(s)//2]==s[len(s)//2:]:
print(len(s)
exit() |
s179354796 | p03672 | u462329577 | 1580161574 | Python | PyPy3 (2.4.0) | py | Runtime Error | 182 | 38384 | 345 | s = input()
for i in range(26):
if chr(97+i) not in s:
print(chr(97+i))
break
if i == 25:
print("None")
l.sort(reverse=True)
print(sum(l[:k]))
s = input()
for i in range(1,len(s)-1):
if (len(s) - i) % 2 == 1: pass
elif s[:(len(s) - i)//2] == s[(len(s) - i)//2:-i]:
print(len(s) - i)... |
s189800644 | p03672 | u686036872 | 1580023225 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 181 | S = str(input())
count=0
for i in range(len(S)):
S=S[:-1]
if S//2==0:
x=S//2
count+=1
if S[:x] == S[x+1:]:
print(count)
break |
s153243092 | p03672 | u735008991 | 1578198837 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 132 | S = input()
while len(S):
S.pop()
if S[:len(S)//2+1] == S[len(S)//2+1:]:
print(len(S[:len(S)//2+1]))
exit()
|
s339678620 | p03672 | u047816928 | 1576860330 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 85 | s = input()
for k in range(len(s)//2-1, 0, -1)
if s[:k] == s[k:2*k]: break
print(k) |
s486072026 | p03672 | u146575240 | 1570936266 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 264 | # B - ss
S = str(input())
count = 0
ans_s = S[:-1]
while count <= len(ans_s):
len_a = int(len(ans_s)/2)
if len(ans_s) % 2 != 0:
ans_s = ans_s[:-1]
count += 1
else ans_s[:len_a] == ans_s[len_a:]:
print(len(ans_s))
exit() |
s569012643 | p03672 | u488127128 | 1567563283 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 130 | s = input()
while len(s)!=0:
s.pop()
if len(s)%2==0 and s[:len(s)//2]==s[len(s)//2:]:
print(len(s))
exit() |
s830616522 | p03672 | u488127128 | 1567563256 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 125 | s = input()
while True:
s.pop()
if len(s)%2==0 and s[:len(s)//2]==s[len(s)//2:]:
print(len(s))
exit() |
s264408191 | p03672 | u784341473 | 1567393544 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 80 | s=input()
l=len(s)
for _ in range(l)
s.pop(l-1)
if(s[:l//2]*2==s)
print(l) |
s841868705 | p03672 | u533039576 | 1567223519 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 135 | s = input()
abaababaabfor i in reversed(range(1, len(s)//2)):
if s[:i] == s[i:2*i]:
ans = i * 2
break
print(ans)
|
s492557677 | p03672 | u835482198 | 1567110591 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 242 | s = input()
n = len(s)
ret = None
for i in range(n - 1, 0, -1):
if len(s[:i]) % 2 == 1:
continue
# print(s[:i // 2], s[i // 2:i][::-1])
if s[:i // 2] == s[i // 2:i][::-1]:
ret = s[:i]
break
print(len(ret))
|
s868649342 | p03672 | u475675023 | 1567086782 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | s=input()
for i in reversed(range(0,len(s)-1,2)):
if s[:len(s)//2]==s[len(s)//2:]:
print(len(s))
break
else:
s=[:len(s)-2] |
s777206784 | p03672 | u243572357 | 1566363840 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 169 | s = list(input())
while len(s)>0:
if len(s) % 2 == 0:
s.pop().pop()
else:
s.pop()
n = len(s)//2
if s[:n] == s[n:]:
print(len(s))
break |
s172803752 | p03672 | u243572357 | 1566363463 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 167 | s = list(input())
while len(s)>0:
if len(s) % 2 == 0:
s.pop(-1).pop(-1)
else:
s.pop(-1)
n = len(s)//2
if s[:n] == s[n-1:]:
print(len(s))
break
|
s874545101 | p03672 | u651879504 | 1565836081 | Python | Python (3.4.3) | py | Runtime Error | 2103 | 3060 | 318 | S = input()
hantei = True
ans = 0
while hantei == True:
for i in range(len(S)//2):
if S[i] != S[-i] or S[i+1] != S[-(i+1)]:
print("yes")
S.strip(S[-1],S[-2])
ans += 2
break
if i == len(S)//2:
hantei = False
break
print(ans) |
s933500114 | p03672 | u623687794 | 1559423767 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 257 | n=int(input())
s=input()
ans=len(s)
def check(m):
a=len(m)
if a%2==1:
return False
else:
if s[0:m//2]==s[m//2:m]:
return True
else:
return False
for i in range(1,len(s),-1):
ans-=1
if check(s[0:i])==True:
print(ans)
|
s160536760 | p03672 | u463655976 | 1559409516 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | S = input()
for i in range(S//2, 0, -1):
if S.find(S[:i], i) == i:
break
print(i)
|
s155755704 | p03672 | u055941944 | 1558576009 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 122 | s=int(input())
for n in range(1,len(s)-1):
s=s[:-2]
if s[:len(s)//2]==s[len(s)//2:]:
break
print(len(s))
|
s498265583 | p03672 | u055941944 | 1558227376 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 128 | s=list(input())
x=len(s)
for i range(1,x//2):
s=s[:-2]
if s[:len(s)//2==s[len(s)//2:]:
break
print(len(s))
|
s649377791 | p03672 | u055941944 | 1558227145 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | s=list(input())
x=len(s)
for i i range(1,x//2):
s=s[:-2]
if s[:len(s)//2==s[len(s)//2:]:
break
print(len(s))
|
s257466076 | p03672 | u856169020 | 1557321287 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 200 | S = list(str(input()))
ans = 0
num = 0
while num < len(S):
num += 1
s = S[:len(S)-num]
if len(s) % 2 == 0:
if s[:len(s)/2] == s[len(s)/2:]:
ans = len(s)
break
print(ans) |
s306862604 | p03672 | u017271745 | 1556149404 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 327 | S = input()
def check(s):
n = len(s)
if n%2 != 0:
return False
else:
s1 = s[:(n//2)]
s2 = s[(n//2):]
if s1 == s2:
return True
else:
return False
for i in range(len(S)-1, 0, -2):
if check(S[:i]):
ans = len(S[:i])
break
pri... |
s642291563 | p03672 | u878138257 | 1553923613 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 311 | s = input()
a=0
b=0
def sakana():
for j in range(len(s)//2):
if s[j] != s[(len(s)//2)+j]:
break
else:
a=a+1
if a==len(s)//2:
return 0
else:
return 1
for i in range(len(s)):
s.rstrip(s[-1])
if len(s)%2==0 and sakana()==0:
break
else:
b=b+1
print(len(s)-b-1)
|
s080204231 | p03672 | u518042385 | 1553709462 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 137 | w=list(input())
for i in range(len(w)):
del w[-1]
del w[-1]
if w[0:len(w)/2]==w[len(w)/2:len(w)]:
print(len(w))
break
|
s708429319 | p03672 | u363610900 | 1553236657 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 185 | S = input()
result = ''
for i in range(1, len(S)):
s = S[0:len(S) - i]
if len(s) % 2 == 0 and s[0:len(s)//2] == s[len(s)//2:]:
result = len(s)
break
print(result)
|
s733428250 | p03672 | u543954314 | 1550635039 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 108 | t = list(input())
del s [-2:]
a = 2
while s[:len(s)//2] != s[len(s)//2:]:
s = s[:-2]
a += 2
print(a) |
s748129069 | p03672 | u118211443 | 1550419138 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 165 | s=list(input())
while(1):
if len(s)==1:
print(s)
break
s.pop(-1)
if s[:t]==s[t:]:
print(len(s))
break
t=int(len(s)/2) |
s352253344 | p03672 | u518556834 | 1540063968 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 105 | s = input()
for i in range(len(s),1,-2):
if s[:i/2+1] == s[i/2+1:]:
print(len(s[:i/2+1]))
break |
s523415196 | p03672 | u151483411 | 1537491849 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 152 | S = gets.chomp.split("")
L = S.length
while L > 0
L -= 1
A = S[0...L/2]
B = S[L/2...L]
if A == B
puts L
break
end
end |
s515770567 | p03672 | u636311816 | 1535654906 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | s=input()
while(1):
s=s[:-2]
l=len(s)
if s[:l/2]==s[l/2:]:
print(l)
break
|
s762415140 | p03672 | u636311816 | 1535654838 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 87 | s=input()
while(1):
s=s[:-2]
l=len(s)
if s[:l/2]==s[l/2:]:
print(l)
break
|
s746311740 | p03672 | u221345507 | 1534701522 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 244 | s=input()
s=list(s)
if len(s)%2==0:
s.pop(len(s)-1)
s.pop(len(s)-1)
else:
s.pop(len(s)-1)
while len(s)>0:
if s[:int(len(s)/2)]==s[int(len(s)/2):]:
print(len(s))
sys.exit()
s.pop(len(s)-1)
s.pop(len(s)-1) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.