1
23 symbols pyth
Wed Nov 23 17:25:31 2016 Sait2000
VSuXhHGseHcR;.zHpNpd@HN
2
25 symbols pyth
Mon Sep 19 17:00:32 2016 Sait2000
VcR;.z XhNHseN)VSHpNpd@HN
3
49 symbols perl
Fri Sep 26 17:03:20 2014 vakorol
#!/usr/bin/perl -pl
/\S+/;$h{$&}+=$'}for(sort keys%h){s/$/ $h{$_}/
4
51 symbols perl
Fri Jun 27 16:55:48 2014 dionys
#!/usr/bin/perl -pla
$h{$F[0]}+=$F[1]}for(sort keys%h){$_.=" $h{$_}"
5
54 symbols perl
Sun Jun 22 23:00:12 2014 avkhozov
#!/usr/bin/perl -nla
$h{$F[0]}+=$F[1]}{print"$_ $h{$_}"for sort keys%h
6
134 symbols python3
Sun Feb 22 15:46:12 2015 z423x5c6
import sys,collections as c
a=c.Counter()
for i in sys.stdin:
 b=i.split()
 a[b[0]]+=int(b[1])
for i in sorted(a.keys()):print(i,a[i])
7
152 symbols python3
Mon Aug 11 20:24:50 2014 z423x5c6
import sys
a={}
for i in sys.stdin:
 i=i.strip('\n').split()
 try:a[i[0]]+=int(i[1])
 except:a[i[0]]=int(i[1])
for k in sorted(a.keys()):
 print(k,a[k])
8
158 symbols python3
Fri Aug 8 22:25:59 2014 z423x5c6
import sys
a={}
for i in sys.stdin:
 i=i.strip('\n').split()
 if i[0]in a:a[i[0]]+=int(i[1])
 else:a[i[0]]=int(i[1])
for k in sorted(a.keys()):
 print(k,a[k])
9
158 symbols python3
Mon Aug 11 20:24:03 2014 z423x5c6
import sys
a={}
for i in sys.stdin:
 i=i.strip('\n').split()
 try:
  a[i[0]]+=int(i[1])
 except:
  a[i[0]]=int(i[1])
for k in sorted(a.keys()):
 print(k,a[k])
10
177 symbols haskell
Fri Mar 13 16:07:45 2015 YoshikuniJujo
import Data.List
main=interact$unlines.map(\(n,a)->n++" "++show a).map(\p->(fst$head p,sum$map snd p)).groupBy((.fst).(==).fst).sort.map(\l->let[n,a]=words l in(n,read a)).lines
11
256 symbols haskell
Fri Jun 27 03:40:56 2014 salvipeter
import Control.Arrow
import Data.Function
import Data.List
r x=(a,read b)where[a,b]=words x
a x=map(fst.head&&&foldr1(+).map snd)$groupBy(on(==)fst)$sortBy(on compare fst)x
s(a,b)=a++' ':show b
main=do{p<-fmap(map r.lines)getContents;mapM_(putStrLn.s)$a p}
12
287 symbols python2
Sun Jun 22 21:15:09 2014 KoukiMino
import sys
lines=map(str,sys.stdin.read().splitlines())
out={}
for line in lines:
	(item,price) = map(str,line.split(' '))
	if out.has_key(item):
		out[item] += int(price)
	else:
		out[item] = int(price)
for item,price in sorted(out.items(),key=lambda x:x[0]):
	print item+" "+str(price)