We couldnt come up with a name

So the task is still simple: we give you a number (could be of any length). You task is to figure out the digit with maximum repetition and print the digit followed by the number without that digit on a new line.

input: 121
output:
1
2

input: 12321
output:
1
232

input: 123211
output:
1
232

input: 1111
output:
1

IN

1234567891

OUT

1
23456789

IN

99974523720380322104563000995712300

OUT

0
999745237238322145639957123

IN

990765823178729996549909900099912399

OUT

9
765823178726540000123

IN

6000714623686666999912346642376012654874512398666989912344774565632871200991200008700066666124536661

OUT

6
7142389999123442370125487451239898991234477455328712009912000087000124531

IN

12345678912345678912345678912345678911223344127865123121212128981

OUT

1
2345678923456789234567892345678922334427865232222898

IN

4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444441

OUT

4
1


70 symbols python3
Mon Mar 11 23:31:36 2019 vatsalyatandon
d = input() 
a=max(d,key=d.count)
print(a)
print(int(d.replace(a,"")))
98 symbols python2
Mon Mar 11 23:26:19 2019 bazinga65
f=list(raw_input())
x=max(f,key=f.count)
print x+'\n'+''.join(filter(lambda a:a!=x,f)).lstrip("0")
105 symbols python3
Mon Mar 11 23:58:10 2019 pratyush7563
z=[l for l in str(input())]
t=max(z,key=z.count)
z=[x for x in z if x!=t]
print(t)
print(int(''.join(z)))
106 symbols python3
Mon Mar 11 23:09:30 2019 ankurbanga
import collections as c
s=input()
p=c.Counter(s).most_common(1)[0][0]
print(p)
print(int(s.replace(p,"")))
108 symbols python3
Mon Mar 11 22:58:08 2019 dryairship
y=input()
p=print
m=n=b=0
for a in y:
 d=y.replace(a,'')
 j=len(y)-len(d)
 if j>m:m,n,b=j,a,d
p(n)
p(int(b))
108 symbols python3
Mon Mar 11 22:58:43 2019 RohitRanjangit
import collections as b
s=input()
a=b.Counter(s).most_common(1)[0][0]
print(a,int(s.replace(a,'')),sep='\n')
108 symbols python3
Mon Mar 11 23:06:41 2019 sbhagat1729
import collections as q
n=input()
x=q.Counter(n).most_common(1)[0][0]
print(x,int(n.replace(x,"")),sep='\n')
109 symbols python3
Mon Mar 11 23:54:36 2019 pratyush7563
z=[l for l in str(input())]
t=max(z,key=z.count)
z=[x for x in z if x!=t]
print(t)
s=''.join(z)
print(int(s))
110 symbols python3
Mon Mar 11 22:55:03 2019 dryairship
y=input()
m=n=b=0
for a in y:
 d=y.replace(a,'')
 j=len(y)-len(d)
 if j>m:m,n,b=j,a,d
print(n,int(b),sep='\n')
111 symbols python3
Mon Mar 11 22:35:11 2019 ankurbanga
import collections as c
s=input()
p=c.Counter(s).most_common(1)[0][0]
print(p+'\n'+s.replace(p,"").lstrip('0'))
113 symbols python3
Mon Mar 11 22:56:37 2019 RohitRanjangit
import collections
s=input()
a=collections.Counter(s).most_common(1)[0][0]
print(a,int(s.replace(a,'')),sep='\n')
114 symbols python3
Mon Mar 11 22:12:35 2019 sbhagat1729
import collections
n=input()
x=collections.Counter(n).most_common(1)[0][0]
print(x, int(n.replace(x,"")),sep='\n')
120 symbols python3
Mon Mar 11 23:30:13 2019 pratyush7563
z=[]
for l in str(input()):z.append(l)
t=max(z,key=z.count)
z=[x for x in z if x!=t]
print(t)
s=''.join(z)
print(int(s))
121 symbols python3
Mon Mar 11 23:18:54 2019 pratyush7563
z=[]
for l in str(input()):z.append(l)
t=max(z,key=z.count)
print(t)
while(t in z):z.remove(t)
s=''.join(z)
print(int(s))
122 symbols python3
Mon Mar 11 22:30:44 2019 ankurbanga
import collections
s=input()
c=collections.Counter(s).most_common(1)[0][0]
print(c)
a=s.replace(c,"")
print(a.lstrip('0'))
125 symbols python3
Mon Mar 11 23:16:57 2019 pratyush7563
x=input()
z=[]
for l in str(x):z.append(l)
t=max(z,key=z.count)
print(t)
while(t in z):z.remove(t)
s=''.join(z)
print(int(s))
164 symbols python3
Mon Mar 11 23:07:15 2019 pratyush7563
x=input()
z=[]
for l in str(x):z.append(l)
t=max(z,key=z.count)
print(t)
while(t in z):z.remove(t)
while len(z)>0 and z[0]=="0":z.remove(z[0])
s=''.join(z)
print(s)
168 symbols python3
Mon Mar 11 23:30:28 2019 vaithak
f=[0]*10;r=0;s=0;
t=str(int(input()))
for i in t:f[int(i)]+=1
for j in range(10):
	if f[j]>r:r=f[j];s=j
print(s)
a=''
for i in t:
	if int(i)!=s:a=a+str(i)
print(int(a))
172 symbols python3
Mon Mar 11 23:39:11 2019 vaithak
f=[0]*10;r=0;a='';t=input()
for i in t:f[int(i)]+=1
for j in range(10):
	if f[j]>r:r=f[j]
s=f.index(max(f));print(s);a=''
for i in t:
	if int(i)!=s:a=a+str(i)
print(int(a))
180 symbols python3
Mon Mar 11 23:37:08 2019 vaithak
f=[0]*10;r=0;s=0;a='';t=input()
for i in t:f[int(i)]+=1
for j in range(10):
	if f[j]>r:r=f[j];s=j
s=f.index(max(f));print(s);a=''
for i in t:
	if int(i)!=s:a=a+str(i)
print(int(a))

View all solutions