MD5

Input:
String
Output:
All numers from md5($string) in ascending order in the first line
All letters from md5($string) in lexicographic order in the 2nd line

IN

hello!

OUT

012356789
abde

IN

md5

OUT

12346789
abcdf

IN

-=-x$vik-jagc-md5-task$x-=-

OUT

012345789
abcde
Login to submit solution


29 symbols pyth
Mon Oct 31 04:29:22 2016 Sait2000
-jk++UTb<G6@c"6f 05e 4cf"dChz
50 symbols bash
Tue Jul 26 18:05:22 2016 hidefromkgb
md5sum|fold -w1|sort -u|tr -d \\n\ -|sed s/9/9\\n/
55 symbols bash
Tue Jan 13 23:52:03 2015 beched
md5sum|grep -o .|sort|uniq|tr -d '\n \-'|sed 's/a/\na/'
56 symbols pyth
Fri Oct 21 22:03:26 2016 Sait2000
:{Sv%"__import__('hashlib').md5(b%s).hexdigest()"`z\a"
a
58 symbols bash
Tue Jan 13 22:32:19 2015 beched
md5sum|grep -o .|sort|uniq|tr -d '\n \-'|sed 's/a/\na/'<&0
81 symbols perl
Mon Sep 29 22:34:39 2014 maxymania
#!/usr/bin/perl -p
use Digest::MD5 md5_hex;$_=join'',sort split//,md5_hex$_;s/(.)\1+/$1/g;s/a/\na/
83 symbols perl
Sun Aug 24 05:57:24 2014 gabrielmad
#!/usr/bin/perl -p
use Digest::MD5 'md5_hex';$_=join'',sort split//,md5_hex$_;s/(.)\1+/$1/g;s/a/\na/
87 symbols perl
Sun Aug 24 04:49:42 2014 gabrielmad
#!/usr/bin/perl 
use Digest::MD5 'md5_hex';$_=join'',sort split//,md5_hex<>;s/(.)\1+/$1/g;s/a/\na/;print
88 symbols python2
Mon Aug 11 13:20:58 2014 xsot
import md5
print`sorted(set(md5.new(raw_input()).hexdigest()))`[2::5].replace('a','\na')
96 symbols python2
Sat Aug 9 16:50:44 2014 PFischbeck
import hashlib as h
print''.join(sorted(set(h.md5(raw_input()).hexdigest()))).replace("a","\na")
109 symbols ruby
Mon Aug 15 19:12:38 2016 mhib
require 'digest'
puts Digest::MD5.hexdigest(gets.chomp).chars.partition{|n|n.ord<58}.map{|n|n.sort.uniq.join}
110 symbols python3
Mon Aug 11 04:26:36 2014 PFischbeck
import hashlib as h
print(''.join(sorted(set(h.md5(input().encode('utf-8')).hexdigest()))).replace("a","\na"))
127 symbols python2
Thu Aug 7 01:19:46 2014 PixelIndigo
import hashlib as h
m=h.md5()
m.update(raw_input())
s=''.join(sorted(set(m.hexdigest())))
a=s.index('a')
print s[:a]+"\n"+s[a:]
134 symbols python2
Wed Aug 6 04:42:05 2014 vik
import hashlib as h
m=h.md5()
m.update(raw_input())
s="".join(sorted(set(m.hexdigest())))
print s[:s.index('a')]+"\n"+s[s.index('a'):]
143 symbols python2
Wed Aug 6 04:40:31 2014 vik
import hashlib as h
m=h.md5()
m.update(raw_input())
s=sorted(set(m.hexdigest()))
print "".join(s[:s.index('a')])+"\n"+"".join(s[s.index('a'):])
144 symbols python2
Wed Aug 6 04:39:25 2014 vik
import hashlib as h
m=h.md5()
m.update(raw_input())
s=sorted(set(m.hexdigest()))
print "".join(s[:s.index('a')])
print "".join(s[s.index('a'):])
147 symbols python2
Mon Aug 4 22:06:22 2014 LLcoolNJ
import hashlib as h
m=h.md5()
m.update(raw_input())
s=sorted(set(m.hexdigest()))
d=w=''
for i in s:
 if i>'9':
  w+=i
 else:
  d+=i
print d
print w
162 symbols python3
Fri Aug 1 14:44:00 2014 PixelIndigo
import hashlib as h
m=h.md5()
m.update(input().encode('utf8'))
s=sorted(set(m.hexdigest()))
print(''.join([x for x in s if x<':']+['\n']+[x for x in s if x>'9']))
173 symbols python3
Fri Aug 1 14:34:06 2014 PixelIndigo
import hashlib as h
m=h.md5()
m.update(input().encode('utf8'))
s=sorted(set(x for x in m.hexdigest()))
print(''.join([x for x in s if x<':']+['\n']+[x for x in s if x>'9']))
178 symbols python3
Fri Aug 1 14:29:52 2014 PixelIndigo
import hashlib as h
m=h.md5()
m.update(input().encode('utf-8'))
s=set(x for x in m.hexdigest())
print(''.join(sorted(x for x in s if x<':')+['\n']+sorted(x for x in s if x>'9')))

View all solutions