Neighbours on a Numpad

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Given a positive digit, output the number of its (von Neumann) neighbours on a numpad (ignoring 0).

-- mender

Options

exec is denied

rejudge feature is enabled

now post-mortem time, all source codes will be revealed

Sample input:_

7

Sample output:

2

Sample input:_

1
9
3
7
4
2
6
8
5

Sample output:

2
2
2
2
3
3
3
3
4

Sample input:_

6
1
9
5
8
3
6
1
2
4
6
8
5
2
7
8
2
2
1
5

Sample output:

3
2
2
4
3
2
3
2
3
3
3
3
4
3
2
3
3
3
2
4

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1mender240.03142016/09/08 01:16:080B / 16B / 7B
2mitchs240.03982016/09/08 11:18:320B / 16B / 7B
3xsot260.03162016/09/07 19:01:416B / 11B / 9B
4Histocrat260.03922016/09/08 03:06:546B / 11B / 9B
5%20270.04092016/09/07 11:52:026B / 13B / 8B

Ruby2 _

RankUserSizeTimeDateStatistics
1mender250.20732016/09/08 01:15:170B / 18B / 6B
2mitchs250.64812016/09/21 03:18:110B / 18B / 6B
3rotary-o280.20122016/09/07 12:35:510B / 13B / 13B
4xsot280.21942016/09/07 20:55:550B / 13B / 12B
5%20300.20342016/09/07 11:54:010B / 22B / 8B

Perl _

RankUserSizeTimeDateStatistics
1%20250.04172016/09/07 08:07:450B / 17B / 6B
2tails250.03292016/09/07 14:10:340B / 17B / 6B
3teebee250.03272016/09/08 02:33:080B / 12B / 13B
4llhuii250.06622016/09/15 10:30:040B / 12B / 13B
5Hendrik250.03772016/09/16 07:34:320B / 17B / 6B
6%20()250.04412016/09/17 16:05:050B / 12B / 13B
7mitchs250.14992016/09/21 03:44:300B / 17B / 6B
8tails (alnum)390.03782016/09/11 14:25:330B / 36B / 0B
9teebee(alnum)390.04202016/09/11 15:09:280B / 36B / 0B
10%20(alnum)420.03342016/09/08 06:08:590B / 39B / 0B
11rsFalse280.03322016/10/09 05:04:050B / 21B / 6B

Python _

RankUserSizeTimeDateStatistics
1mitchs290.10292016/09/07 12:52:400B / 20B / 8B
2teebee290.09622016/09/08 07:10:040B / 20B / 8B
3mender290.10032016/09/21 03:20:570B / 20B / 8B
4%20320.09882016/09/07 08:26:350B / 23B / 8B
5xsot320.09002016/09/07 09:41:240B / 23B / 8B
6hallvabo320.10792016/09/11 21:30:560B / 23B / 9B
7hajedeje320.09532016/09/16 05:54:310B / ?B / ?B
8Da320.10342016/09/18 06:58:080B / ?B / ?B
9rolf340.16222016/09/08 01:04:210B / 26B / 7B
10test340.11012016/09/16 00:12:420B / 26B / 7B
11Erik420.10392016/09/16 05:25:400B / 23B / 13B

Python3 _

RankUserSizeTimeDateStatistics
1teebee360.18012016/09/08 07:26:490B / 23B / 12B
2mender360.59822016/09/21 03:20:370B / 23B / 12B
3mitchs360.15922016/09/21 03:33:480B / 23B / 12B
4%20390.15202016/09/07 08:27:410B / 26B / 12B
5Sp3000390.15552016/09/07 08:39:240B / 26B / 12B
6xsot390.14622016/09/07 09:43:250B / 26B / 12B

Scheme _

RankUserSizeTimeDateStatistics
1kaki330.42692016/12/25 23:22:090B / 22B / 10B

JavaScript _

RankUserSizeTimeDateStatistics
1FizzyTea370.04532016/09/16 00:17:580B / 23B / 14B
2mender370.04712016/09/16 02:29:440B / 23B / 14B

Tcl _

RankUserSizeTimeDateStatistics
1teebee450.05122016/09/12 07:57:510B / 27B / 13B

Perl6 _

RankUserSizeTimeDateStatistics
1tanon321.57912016/09/14 13:02:000B / 16B / 14B

K _

RankUserSizeTimeDateStatistics
1teebee230.03662016/09/08 08:03:530B / 12B / 10B

C _

RankUserSizeTimeDateStatistics
1tails440.03212016/09/07 14:40:310B / 26B / 18B
2mitchs440.03212016/09/08 14:14:360B / 26B / 18B
3nu440.03422016/09/13 00:30:390B / 28B / 16B
4%20460.03172016/09/07 08:37:560B / 26B / 20B
5xsot460.03182016/09/07 11:20:330B / 26B / 20B
6ymorii47470.03212016/09/13 00:14:270B / 27B / 20B
7julien_c520.03922016/09/09 08:28:150B / 29B / 23B

Haskell _

RankUserSizeTimeDateStatistics
1henkma420.03962016/09/15 23:07:320B / 30B / 10B
2Lost_dog450.03502016/09/16 20:23:490B / 29B / 11B
3yuki500.03962016/09/14 10:32:320B / 27B / 23B

ObjC _

RankUserSizeTimeDateStatistics
1%20460.03182016/09/07 08:38:060B / 26B / 20B

Java _

RankUserSizeTimeDateStatistics
1teebee1120.16912016/09/08 05:05:330B / 70B / 38B
2Klemmbrett1300.44002016/09/07 23:12:160B / ?B / ?B
3teebee(mitchs,tails)1090.16672016/09/22 05:22:310B / 70B / 35B

sed _

RankUserSizeTimeDateStatistics
1%20220.03252016/09/07 08:09:480B / 19B / 3B
2tails220.04052016/09/07 14:08:390B / 19B / 3B
3mitchs220.03162016/09/08 11:39:140B / 19B / 0B
4mender220.03222016/09/16 02:36:170B / 22B / 0B
5Hendrik220.03162016/09/16 07:49:190B / 19B / 3B
6ninjalj220.03142016/09/19 09:13:050B / 19B / 3B

Bash _

RankUserSizeTimeDateStatistics
1%20160.02722016/09/07 08:09:080B / 13B / 1B
2tails160.03552016/09/07 14:07:320B / 13B / 1B
3rotary-o160.01392016/09/08 00:53:170B / 13B / 1B
4Hendrik160.02282016/09/08 01:32:310B / 13B / 1B
5teebee160.02732016/09/08 05:46:050B / 13B / 1B
6mitchs160.03312016/09/08 11:37:410B / 13B / 1B
7ninjalj160.02532016/09/19 09:15:370B / 13B / 1B
8tails (alnum)190.00842016/09/15 18:37:190B / 17B / 0B
9teebee(alnum)190.02542016/09/19 06:42:510B / 17B / 0B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1tails310.03882016/09/11 16:30:270B / 15B / 13B

Zsh _

RankUserSizeTimeDateStatistics
1%20160.02412016/09/07 08:58:360B / 13B / 1B
2Hendrik160.04022016/09/15 22:00:220B / 13B / 1B
3teebee160.05842016/09/19 06:45:250B / 13B / 1B
4ninjalj160.02662016/09/19 09:15:430B / 13B / 1B
5mitchs160.13342016/09/21 03:46:080B / 13B / 1B

Fish _

RankUserSizeTimeDateStatistics
1%20160.08672016/09/07 08:58:390B / 13B / 1B
2Hendrik160.06892016/09/15 22:04:200B / 13B / 1B
3teebee160.07322016/09/19 06:45:450B / 13B / 1B
4ninjalj160.04252016/09/19 09:15:500B / 13B / 1B
5mitchs160.26022016/09/21 03:46:210B / 13B / 1B

Whitespace _

RankUserSizeTimeDateStatistics
1kaz_u800.66052016/09/18 23:40:460B / 0B / 0B
2%20860.04282016/09/17 15:26:450B / 0B / 0B

Befunge _

RankUserSizeTimeDateStatistics
1%20180.03502016/09/07 08:18:470B / 10B / 8B
2mender180.03632016/09/16 04:22:080B / 10B / 8B

><> _

RankUserSizeTimeDateStatistics
1%20140.23862016/09/07 08:15:350B / 13B / 1B
2Sp3000140.27482016/09/07 08:42:140B / 13B / 1B
3mitchs140.22662016/09/14 10:48:110B / 13B / 1B
4mender140.30392016/09/16 02:52:370B / 11B / 3B

GolfScript _

RankUserSizeTimeDateStatistics
1mender130.07072016/09/21 03:19:570B / 3B / 10B
2mitchs140.05712016/09/07 13:01:100B / 5B / 9B
3tails140.07742016/09/15 19:03:010B / 5B / 9B
4whio160.05892016/09/13 23:19:340B / 9B / 7B
5%20170.05352016/09/07 11:35:276B / 2B / 9B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs90.25742016/09/14 09:07:292B / 4B / 3B
2whio100.23772016/09/21 05:30:353B / 6B / 1B

FerNANDo _

RankUserSizeTimeDateStatistics
1tails810.25802016/09/11 15:43:160B / 41B / 0B
2%20830.15392016/09/07 09:23:220B / 42B / 0B

Vim _

RankUserSizeTimeDateStatistics
1udioica210.05012016/11/30 23:09:270B / ?B / ?B

Groovy _

RankUserSizeTimeDateStatistics
1teebee392.94662016/09/08 09:01:180B / 26B / 13B

Language Ranking_

RankLangUserSizeScore
1gs2mitchs910000
2GolfScriptmender136923
3><>%20146428
4Bash%20165625
5Zsh%20165625
6Fish%20165625
7Befunge%20185000
8Vimudioica214285
9sed%20224090
10Kteebee233913
11Rubymender243750
12Perl%20253600
13Ruby2mender253600
14Pythonmitchs293103
15Bash (builtins)tails312903
16Perl6tanon322812
17Schemekaki332727
18Python3teebee362500
19JavaScriptFizzyTea372432
20Groovyteebee392307
21Haskellhenkma422142
22Ctails442045
23Tclteebee452000
24ObjC%20461956
25Whitespacekaz_u801125
26FerNANDotails811111
27Javateebee(mitchs,tails)109825

return top