1
14 symbols pyth
Wed Sep 28 07:23:04 2016 Sait2000
s--J{rz7hMJtMJ
2
15 symbols pyth
Wed Sep 28 07:20:03 2016 Sait2000
J{rz7s--JhMJtMJ
3
16 symbols pyth
Wed Sep 21 03:40:39 2016 Sait2000
J{rz7sf!@J,hTtTJ
4
18 symbols pyth
Mon Sep 19 16:33:51 2016 Sait2000
JS.{rz7sf!@J,hTtTJ
5
18 symbols pyth
Mon Sep 19 16:33:51 2016 Sait2000
JS.{rz7sf!@J,hTtTJ
6
31 symbols bash
Mon Oct 17 07:53:28 2016 Sait2000
sed '/9/c27
/7/c0
/4/c20
/8/c8'
7
32 symbols bash
Mon Oct 17 07:49:22 2016 Sait2000
sed '/9/c27
/8$/c8
/8/c20
/ /c0'
8
36 symbols bash
Mon Oct 17 07:46:48 2016 Sait2000
sed '/^2/c20
/2 3/c8
/2 4/c27
/ /c0'
9
38 symbols bash
Tue Aug 16 21:58:09 2016 hidefromkgb
sed '/^2/c20
/2 3/c8
/2 4/c27
/2 5/c0'
10
42 symbols bash
Tue Aug 16 20:56:15 2016 hidefromkgb
sed $'/^2/c20\n/2 3/c8\n/2 4/c27\n/2 5/c0'
11
70 symbols perl
Thu Oct 2 14:08:28 2014 vakorol
#!/usr/bin/perl -p
$l=($n=$&)-1,$g=$n+1,!/$l|$g/&&($s+=$n)&&s/$n//g while/\d+/g;$_=$s+0
12
72 symbols python3
Fri Jan 15 22:10:17 2016 Sait2000
L=set(map(int,input().split()))
print(sum(a*(L-{a-1,a+1}==L)for a in L))
13
73 symbols perl
Thu Jul 24 02:33:30 2014 dionys
#!/usr/bin/perl -pa
@@[@F]=@F;$_=0;pop@@?($@=@@,pop@@?do{0while pop@@}:($_+=$@)):0while@@
14
77 symbols python3
Fri Oct 9 14:37:23 2015 BogdanShevchenko
s=0
L=set(map(int,input().split()))
for a in L:s+=a*(L-{a-1,a+1}==L)
print(s)
15
81 symbols python3
Fri Feb 27 05:14:13 2015 bluebear94
s=0
l=set(map(int,input().split()))
for a in l:s+=a*({a-1,a+1}&l==set())
print(s)
16
82 symbols python2
Fri Aug 8 03:42:13 2014 PFischbeck
l=set(map(int,raw_input().split()))
print sum([a*({a-1,a+1}&l==set()) for a in l])
17
84 symbols python2
Fri Aug 8 03:37:32 2014 PFischbeck
s=0
l=set(map(int,raw_input().split()))
for a in l:s+=a*({a-1,a+1}&l==set())
print s
18
85 symbols python3
Sun Sep 14 18:59:07 2014 z423x5c6
a=set(map(int,input().split()))
print(sum([i for i in a if 1-((i-1in a)|(i+1in a))]))
19
86 symbols perl
Thu Jul 24 00:46:48 2014 dionys
#!/usr/bin/perl -pa
$a[$_]=1for@F;$_=0;while(@a){if(pop@a){$i=@a;if(pop@a){0while pop@a}else{$_+=$i}}}
20
86 symbols python3
Sat Aug 9 00:48:02 2014 z423x5c6
a=set(map(int,input().split()))
print(sum([i for i in a if not((i-1in a)|(i+1in a))]))
21
87 symbols perl
Thu Jul 24 00:36:23 2014 dionys
#!/usr/bin/perl -pa
$a[$_]=1for@F;$_=0;while(@a){if(pop@a){$i=@a;if(pop@a){while(pop@a){}}else{$_+=$i}}}
22
93 symbols ruby2.0
Mon Aug 15 20:41:04 2016 mhib
puts (a=gets.split(' ').map(&:to_i)).reject{|n|a.index(n-1)||a.index(n+1)}.uniq.inject(:+)||0
23
94 symbols python3
Sat Aug 9 00:45:59 2014 z423x5c6
a=set([int(i)for i in input().split()])
print(sum([i for i in a if not((i-1in a)|(i+1in a))]))
24
96 symbols python2
Fri Aug 8 03:32:25 2014 PFischbeck
s=0
l=set(map(int,raw_input().split()))
for a in l:
 if not(a-1 in l or a+1 in l):
	s+=a
print s
25
99 symbols bash
Mon Jul 25 07:33:28 2016 hidefromkgb
s=0;n=`tr \  \\\n|sort -u`;for i in $n;do grep -wq "\($[i+1]\|$[i-1]\)"<<<$n||((s+=i));done;echo $s
26
99 symbols ruby2.0
Mon Aug 15 20:40:27 2016 mhib
puts (a=gets.chomp.split(' ').map(&:to_i)).reject{|n|a.index(n-1)||a.index(n+1)}.uniq.inject(:+)||0
27
103 symbols bash
Mon Jul 25 01:31:58 2016 hidefromkgb
s=0;n=`tr \  \\\n|sort -u`;for i in $n;do grep -wq "\($((i+1))\|$((i-1))\)"<<<$n||((s+=i));done;echo $s
28
105 symbols ruby2.0
Mon Aug 15 20:35:46 2016 mhib
puts (a=gets.chomp.split(' ').map(&:to_i)).reject{|n|a.include?(n-1)||a.include?(n+1)}.uniq.inject(:+)||0
29
106 symbols bash
Sun Jul 24 15:50:34 2016 hidefromkgb
s=0;n=`tr \  \\\n|sort -u`;for i in $n;do echo $n|grep -wq "\($((i+1))\|$((i-1))\)"||((s+=i));done;echo $s
30
119 symbols php
Fri Jan 16 10:09:35 2015 BlackFan
<?php $a=array_unique(explode(' ',fgets(STDIN)));foreach($a as$x){$s+=$x*!in_array($x-1,$a)*!in_array($x+1,$a);}echo$s;
31
131 symbols perl
Thu Jul 24 00:08:18 2014 dionys
#!/usr/bin/perl -pa
%h=map{$_=>1}@F;@F=sort{$a<=>$b}keys%h;$_=0;for(;$i<@F;$i++){$v=$F[$i];next
if$i&&$F[$i-1]>$v-2||$i+1<@F&&$F[$i+1]<$v+2;$_+=$v}
32
134 symbols perl
Thu Jul 24 00:06:45 2014 dionys
#!/usr/bin/perl -pa
%h=map{$_=>1}@F;@F=sort{$a<=>$b}keys%h;for(;$i<@F;$i++){$v=$F[$i];next
if$i&&$F[$i-1]>$v-2||$i+1<@F&&$F[$i+1]<$v+2;$s+=$v}$_=$s||0
33
144 symbols haskell
Sun Mar 15 04:56:25 2015 YoshikuniJujo
import Data.List
main=interact$show.sum.nub.g t.sort.map read.words
t=True
g b[p]|b=[p]|t=[]
g b(p:a@(n:_))|(p-n)^2==1=g(1<0)a|b=p:g t a|t=g t a