Skip to content
Snippets Groups Projects
Commit 8a6675cb authored by Sivakumaran's avatar Sivakumaran
Browse files

Add new file

parents
No related branches found
No related tags found
No related merge requests found
p2.txt 0 → 100644
1.
dict={}
for i inorigItems:if not in dict then adddict[i
for i in items:
if(dict[i]-price[i])!=0:ans++
print ans
2.
i=len(pre)-2
while i>0:
y=pre[i:]
if(text startswith(y)):length=len(y)
if(length<=len(pre):
max1=length
string1=y
i=0
while i<len(suffix):
y=suffix[:i]
if(text endswith(y)):length=len(y)
if(length<=len(pre):
max2=length
string2=y
summ=max1+max2
ans=[]
while i<=len(text):
y=text[:i]
if(text startswith(string1) and text endswith(y)):ans.append(y)
y.sort()
return y[0]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment