Count of circles in a number aka 2581

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

You may know this riddle already, but what's about trying to solve it using computing power?

If you get a number, you have to count the number of circles, this number has in the arabic decimal number system.

For example the numbers 6, 9 and 0 do have one circle, while 8 even got two. If you now don't get what I mean, take a screenshot and fill the background with black. As a result you get the circles in the numbers and just have to count the round dots.

How many circles there are in the number 2581?

Options

exec is denied

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

Sample input:_

2581

Sample output:

2

Sample input:_

8809
3333
7111
5555
2172
8193
6666
8096
1111
7777
3213
9999
7662
7756
9312
6855
0000
9881
2222
5531

Sample output:

6
0
0
0
0
3
4
5
0
0
0
4
2
1
1
3
4
5
0
0

Sample input:_

1786192756982767718025267301201738201878
2155892712987519876517276712302398752193
1256572518267629157861589235017872135912
3785279372987169769125763123078238972521
1358970351870896287639587123708231937952
0193850368983701378931360870213987235123

Sample output:

22
16
16
17
22
23

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid350.06822012/03/07 07:55:490B / 20B / 12B
2yvl350.07132012/03/07 13:40:530B / 20B / 12B
3clock350.11642012/03/26 01:01:510B / 20B / 12B
4kaki360.05572012/03/30 13:33:020B / 21B / 12B
5eban400.05672012/03/07 12:13:110B / 24B / 15B
6Kotiya Sanae420.12172012/04/01 23:25:490B / ?B / ?B
7@tttttanaka430.06282012/04/01 03:43:330B / 23B / 17B
8inaniwa910.09992012/04/17 15:50:083B / 52B / 29B

Perl _

RankUserSizeTimeDateStatistics
1teebee280.05032012/03/07 03:48:430B / 13B / 13B
2tails280.04612012/03/07 16:07:040B / 13B / 13B
3shlomif280.05142012/03/08 07:39:560B / 13B / 13B
4nfouille280.07072012/03/11 19:25:070B / ?B / ?B
5macik420.07202012/03/31 21:51:090B / ?B / ?B
6test1(alnum)500.08012012/03/16 22:03:280B / 41B / 0B
7teebee(alnum)500.07732012/03/17 04:18:450B / 41B / 0B

Python _

RankUserSizeTimeDateStatistics
1leonid490.15982012/03/07 04:18:420B / 35B / 12B
2hallvabo490.07112012/03/07 04:24:530B / 35B / 12B
3twobit490.08562012/03/07 04:43:470B / 35B / 12B
4kt3k490.12272012/03/07 10:31:570B / 35B / 12B
5Hendrik490.08382012/03/08 02:19:290B / 35B / 12B
6shlomif570.08852012/03/13 02:16:580B / ?B / ?B
7xsot610.11782012/03/07 10:07:350B / ?B / ?B

PHP _

RankUserSizeTimeDateStatistics
1clock740.27012012/04/03 12:43:2310B / 33B / 30B
2teebee760.13142012/03/10 19:00:121B / 41B / 34B
3Endres1100.11442012/03/07 03:29:370B / ?B / ?B
4teebee(ddudz)660.06432017/01/03 00:11:2410B / 35B / 20B

Scheme _

RankUserSizeTimeDateStatistics
1kaki770.49742012/03/08 03:05:200B / 46B / 26B
2kaki750.14432013/03/25 05:49:570B / 44B / 28B

Common LISP _

RankUserSizeTimeDateStatistics
1kaki950.21922012/03/31 07:54:560B / 69B / 17B

Arc _

RankUserSizeTimeDateStatistics
1pooq654.92252012/03/15 21:23:190B / 35B / 26B

Clojure _

RankUserSizeTimeDateStatistics
1pooq644.19572012/03/17 22:35:050B / 39B / 24B

Io _

RankUserSizeTimeDateStatistics
1pooq870.33382012/03/15 05:19:340B / 65B / 19B

JavaScript _

RankUserSizeTimeDateStatistics
1nn610.10032012/03/10 14:43:300B / 36B / 25B
2clock610.05712012/03/10 18:29:440B / 36B / 25B
30mg630.06742012/03/10 14:27:330B / 40B / 21B
4Hendrik710.34642012/04/01 06:41:010B / 43B / 28B
5walkerneo770.07652012/03/10 11:03:500B / ?B / ?B

Lua _

RankUserSizeTimeDateStatistics
1pooq600.05302012/03/08 01:02:390B / 36B / 23B
2twobit600.06852012/03/08 03:11:350B / 37B / 22B
3Hendrik600.10432012/04/01 06:36:350B / 36B / 23B
4clock590.04292012/08/09 19:27:560B / 35B / 23B

Tcl _

RankUserSizeTimeDateStatistics
1pooq790.06002012/03/15 06:24:470B / 46B / 22B

Xtal _

RankUserSizeTimeDateStatistics
1teebee790.09472012/03/18 07:23:530B / 44B / 35B
2pooq850.11792012/03/17 19:20:100B / 43B / 41B
3teebee640.05472017/01/03 00:35:370B / 36B / 28B
4teebee(ush)650.09552012/04/04 06:28:000B / 39B / 26B

SNOBOL _

RankUserSizeTimeDateStatistics
1chocobi1170.06262012/03/29 22:30:050B / 66B / 29B
2clock790.03752012/07/20 19:21:210B / 41B / 20B

Icon _

RankUserSizeTimeDateStatistics
1teebee790.05622012/04/03 06:48:130B / 52B / 22B
2pooq900.09042012/04/03 18:22:420B / 62B / 21B
3teebee(ush)690.06472012/04/09 08:03:470B / 41B / 24B

REXX _

RankUserSizeTimeDateStatistics
1pooq780.05742012/04/15 14:41:470B / 53B / 12B

BASIC _

RankUserSizeTimeDateStatistics
1pooq680.04312012/03/15 05:25:350B / 37B / 27B
2teebee560.05132017/01/03 05:06:490B / 34B / 18B

J _

RankUserSizeTimeDateStatistics
1pooq340.10192012/03/15 00:38:420B / 13B / 20B
2Hendrik370.14522012/03/30 06:25:240B / 15B / 22B
3Motorola420.10492012/03/08 23:15:550B / 19B / 23B
4Intel430.11242012/03/08 23:19:140B / 20B / 23B
5I., S.(pooq,Hendrik)310.44702012/04/08 19:55:170B / 12B / 19B

K _

RankUserSizeTimeDateStatistics
1teebee220.07662012/03/20 13:03:100B / 7B / 15B
2twobit220.04862012/03/21 00:33:070B / 7B / 15B

C _

RankUserSizeTimeDateStatistics
1ush680.04112012/03/09 10:21:350B / 39B / 29B
2inaniwa680.04452012/03/10 16:51:562B / 35B / 31B
3Hendrik920.04542012/03/09 06:45:100B / 51B / 41B
4smkt method21160.04812012/03/07 16:53:020B / 58B / 57B
5smkt1480.06272012/03/07 16:43:010B / 85B / 58B

D _

RankUserSizeTimeDateStatistics
1macik1070.05072012/03/31 20:39:040B / ?B / ?B

Go _

RankUserSizeTimeDateStatistics
1uru1310.06012012/03/13 22:40:280B / 78B / 26B

Haskell _

RankUserSizeTimeDateStatistics
1cojna560.05092012/03/09 21:52:020B / ?B / ?B
2henkma560.08182012/03/10 12:08:180B / ?B / ?B
3Lost_dog560.04942012/03/15 19:45:290B / 35B / 20B
4notogawa560.05362012/03/15 23:15:170B / 35B / 20B
5rst76560.04462012/03/16 00:43:460B / 35B / 20B
6kaki560.06782012/03/31 06:39:520B / 35B / 20B
7Icewing590.05872012/03/09 02:26:590B / 35B / 22B
8mroman610.04912012/03/12 22:43:090B / 39B / 21B
9Hendrik610.04452012/03/12 23:08:530B / 37B / 23B
10dianne560.03372017/02/20 09:32:570B / 35B / 20B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*1100.05902012/03/17 13:52:530B / 78B / 23B

C# _

RankUserSizeTimeDateStatistics
1macik1440.26462012/03/26 05:51:240B / ?B / ?B

Maxima _

RankUserSizeTimeDateStatistics
1pooq1140.45132012/03/15 00:49:010B / 64B / 47B
2pooq(ush)1060.56672012/04/04 11:56:020B / 64B / 39B

Euphoria _

RankUserSizeTimeDateStatistics
1clock1280.04392012/04/04 01:25:240B / 83B / 32B

AWK _

RankUserSizeTimeDateStatistics
1nn300.03552012/12/01 19:53:130B / 16B / 14B

sed _

RankUserSizeTimeDateStatistics
1tails700.07082012/04/02 04:15:040B / 42B / 20B
2clock760.04102012/03/30 21:29:370B / 47B / 19B
3kaki(embed)780.03912012/03/30 14:39:320B / 48B / 20B
4clock(no embed)940.04912012/04/03 16:54:120B / 33B / 51B
5tails (no embed)960.05442012/04/03 16:36:280B / 46B / 43B
6kaki1020.04792012/03/30 14:34:120B / 46B / 44B

Bash _

RankUserSizeTimeDateStatistics
1clock470.06132012/04/03 12:55:230B / 25B / 18B
2eban490.32782012/03/07 13:52:240B / 23B / 16B

wake _

RankUserSizeTimeDateStatistics
1clock1180.09042012/03/26 03:16:330B / 38B / 75B

dc _

RankUserSizeTimeDateStatistics
1tails510.05022012/03/31 16:22:220B / 35B / 16B

R _

RankUserSizeTimeDateStatistics
1pooq731.71962012/03/15 00:40:370B / 37B / 34B

Befunge _

RankUserSizeTimeDateStatistics
1@tttttanaka840.04502012/04/01 17:30:171B / 31B / 42B

GolfScript _

RankUserSizeTimeDateStatistics
1tails190.17402012/03/07 16:31:310B / 10B / 9B
2leonid190.07932012/03/08 04:30:300B / 10B / 9B
3twobit190.07872012/03/08 05:05:540B / 10B / 9B
4clock190.13122012/03/09 11:34:110B / 10B / 9B
5nn190.09852012/03/24 16:41:280B / 10B / 9B

gs2 _

RankUserSizeTimeDateStatistics
1whio120.24352017/03/03 03:52:537B / 3B / 2B

FlogScript _

RankUserSizeTimeDateStatistics
1milieu180.23492012/03/10 21:24:000B / ?B / ?B

z80 _

RankUserSizeTimeDateStatistics
1*yuko*410.07682012/03/15 23:16:1722B / 10B / 6B

Vim _

RankUserSizeTimeDateStatistics
1clock(!!)390.16062012/03/10 22:14:561B / 23B / 11B
2nn480.08712012/03/07 14:10:253B / 21B / 22B
3clock480.15682012/03/08 01:29:373B / 23B / 20B
4ejls630.13442012/03/07 08:57:484B / 35B / 20B

goruby _

RankUserSizeTimeDateStatistics
1leonid260.10352012/03/07 07:55:370B / 13B / 12B
2kaki270.16052012/03/30 13:35:360B / 15B / 11B

Groovy _

RankUserSizeTimeDateStatistics
1hakusui654.17172012/03/10 00:07:140B / 47B / 17B
2teebee653.88172012/03/10 09:46:580B / 45B / 19B
3clock674.16122012/03/10 10:08:090B / 48B / 18B
4nn674.23852012/03/10 12:05:120B / 44B / 23B

Scala _

RankUserSizeTimeDateStatistics
1pooq6411.51932012/03/17 11:05:410B / 43B / 20B
2Lost_dog6612.61552012/03/16 22:56:230B / 45B / 19B
3teebee4410.16542017/01/03 00:20:420B / 31B / 12B

Logo _

RankUserSizeTimeDateStatistics
1teebee640.07012012/03/08 05:49:300B / 47B / 9B

Language Ranking_

RankLangUserSizeScore
1gs2whio1210000
2FlogScriptmilieu186666
3GolfScripttails196315
4Kteebee225454
5gorubyleonid264615
6Perlteebee284285
7AWKnn304000
8JI., S.(pooq,Hendrik)313870
9Rubyleonid353428
10Vimclock(!!)393076
11z80*yuko*412926
12Scalateebee442727
13Bashclock472553
14Pythonleonid492448
15dctails512352
16Haskellcojna562142
17BASICteebee562142
18Luaclock592033
19JavaScriptnn611967
20Logoteebee641875
21Clojurepooq641875
22Xtalteebee641875
23Groovyhakusui651846
24Arcpooq651846
25PHPteebee(ddudz)661818
26Cush681764
27Iconteebee(ush)691739
28sedtails701714
29Rpooq731643
30Schemekaki751600
31REXXpooq781538
32Tclpooq791518
33SNOBOLclock791518
34Befunge@tttttanaka841428
35Iopooq871379
36Common LISPkaki951263
37Maximapooq(ush)1061132
38Dmacik1071121
39Pascal*yuko*1101090
40wakeclock1181016
41Euphoriaclock128937
42Gouru131916
43C#macik144833

return top