Bankers rounding

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

Bankers' rounding

Rounding - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Rounding

Options

exec is denied

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

Sample input:_

0.5
1.5
2.5
3.5
4.5
5.5
6.5
7.5
8.5
9.5

Sample output:

0
2
2
4
4
6
6
8
8
10

Sample input:_

5.95
52.50
53.32
73.31
96.31
60.32
27.83
81.72
63.00
18.12
23.23
65.33
41.35
17.09
44.35
51.74
3.66
56.99
91.72
11.68

Sample output:

6
52
53
73
96
60
28
82
63
18
23
65
41
17
44
52
4
57
92
12

Sample input:_

175.20
186.70
500.68
229.41
647.53
970.57
888.77
814.21
946.66
800.01
425.47
492.43
869.09
583.34
803.11
634.40
816.48
640.46
369.08
710.79
483.81
102.94
805.91
928.77
202.50
633.88
526.22
906.51
548.96
647.39
235.20
314.22
627.21
770.59
964.39
434.56
640.26
709.00
401.34
87.13 
914.44
831.86
178.78
249.34
690.58
985.61
848.15
568.23
757.03
298.19
771.25
572.45
572.69
348.00
503.93
792.98
738.01
710.60
263.66
850.01
81.92 
602.04
3.44  
716.20
971.44
857.68
370.70
142.84
778.33
73.64 
359.07
74.07 
341.96
870.53
956.02
287.93
496.27
140.37
455.85
473.98
444.69
452.13
875.05
298.89
952.06
66.62 
551.73
379.00
277.79
953.50
519.04
726.26
175.58
764.76
725.43
522.44
394.97
666.16
125.16
577.33

Sample output:

175
187
501
229
648
971
889
814
947
800
425
492
869
583
803
634
816
640
369
711
484
103
806
929
202
634
526
907
549
647
235
314
627
771
964
435
640
709
401
87
914
832
179
249
691
986
848
568
757
298
771
572
573
348
504
793
738
711
264
850
82
602
3
716
971
858
371
143
778
74
359
74
342
871
956
288
496
140
456
474
445
452
875
299
952
67
552
379
278
954
519
726
176
765
725
522
395
666
125
577

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1teebee200.06102011/05/02 03:30:320B / 13B / 7B
2leonid200.06022011/05/02 06:56:030B / 13B / 7B
3bk1e270.04952011/05/07 15:24:130B / 9B / 15B
4@tttttanaka230.05612012/03/23 18:39:021B / 10B / 10B

Perl _

RankUserSizeTimeDateStatistics
1tybalt89210.03112011/05/01 23:37:390B / ?B / ?B
2teebee210.03012011/05/02 02:38:200B / 10B / 9B
3twobit210.03552011/05/02 06:54:310B / 10B / 9B
4tails210.03302011/05/02 10:18:410B / 10B / 9B
5ninjalj210.02542011/05/03 17:55:420B / 10B / 9B
6leonid210.02092011/05/07 05:42:170B / 10B / 9B
7Joel220.02462011/05/05 01:47:420B / ?B / ?B

Python _

RankUserSizeTimeDateStatistics
1teebee260.08082011/05/02 03:23:360B / 17B / 8B
2hallvabo260.08142011/05/02 06:05:170B / 17B / 8B
3twobit260.08262011/05/02 06:36:280B / 17B / 8B
4leonid260.08192011/05/02 06:57:140B / 17B / 8B
5evilbungle260.09602011/05/05 07:44:440B / ?B / ?B
6hallvabo (system independent)420.07962011/05/02 06:08:080B / 25B / 15B
7xulapp430.08072011/05/01 21:20:260B / 27B / 14B
8Ioriveur640.08582011/05/05 18:51:010B / 35B / 19B
9hallvabo (using decimal)670.16082011/05/02 06:08:400B / 50B / 12B

PHP _

RankUserSizeTimeDateStatistics
1teebee400.94312011/05/02 04:05:475B / 19B / 16B
2teebee390.12322012/01/05 23:05:475B / 19B / 15B

Scheme _

RankUserSizeTimeDateStatistics
1dico_leque340.19112011/05/01 15:24:220B / 24B / 10B
2cddddr340.18842011/05/01 18:22:170B / 24B / 10B
3kaki340.13152011/05/01 20:53:360B / 24B / 10B
4youz340.13932011/05/01 22:33:590B / 24B / 10B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima340.23872011/05/01 15:02:200B / 21B / 11B
2youz340.16842011/05/01 22:21:500B / 21B / 11B
3kaki340.16542011/05/01 23:05:100B / 24B / 10B

Arc _

RankUserSizeTimeDateStatistics
1youz226.01762011/05/01 22:33:250B / 17B / 5B

Io _

RankUserSizeTimeDateStatistics
1pooq780.61652011/05/02 21:47:080B / 56B / 18B

JavaScript _

RankUserSizeTimeDateStatistics
1nn410.02702011/05/01 15:30:570B / 25B / 16B
2xulapp410.02382011/05/01 19:46:160B / 22B / 19B

Lua _

RankUserSizeTimeDateStatistics
1twobit450.05862011/05/02 06:40:220B / 28B / 16B
2twobit410.04612012/06/26 05:51:510B / 24B / 16B

Tcl _

RankUserSizeTimeDateStatistics
1teebee400.04482012/08/27 11:00:150B / 26B / 8B

Xtal _

RankUserSizeTimeDateStatistics
1pooq650.22112011/05/02 05:19:550B / 34B / 29B
2teebee470.08742011/12/30 10:58:060B / 24B / 22B

Kite _

RankUserSizeTimeDateStatistics
1teebee750.46892012/07/09 07:27:450B / 47B / 27B

REXX _

RankUserSizeTimeDateStatistics
1pooq390.04362012/04/15 09:52:330B / 21B / 13B

BASIC _

RankUserSizeTimeDateStatistics
1*yuko*330.02432011/05/02 03:28:280B / 22B / 10B

J _

RankUserSizeTimeDateStatistics
1I., S.(J R6 only)210.11822011/05/01 13:07:280B / 9B / 12B
2I., S.(for most Js)330.25802011/05/02 06:58:380B / 13B / 20B
3I., S.(hallvabo (system independent))320.12432011/05/12 07:11:010B / 11B / 21B

A+ _

RankUserSizeTimeDateStatistics
1twobit360.67282011/05/03 01:37:5812B / 17B / 7B
2teebee360.10702011/05/03 05:23:0313B / 17B / 6B

K _

RankUserSizeTimeDateStatistics
1teebee150.02062012/07/02 10:38:370B / 5B / 10B

C _

RankUserSizeTimeDateStatistics
1nn490.01922011/05/03 20:48:450B / 25B / 24B
2inaniwa550.00292011/05/01 23:42:270B / 29B / 25B
3teebee550.00272011/05/02 03:06:500B / 29B / 25B
4ninjalj550.01932011/05/03 18:26:200B / 31B / 23B
5bk1e570.02692011/05/07 15:43:230B / 32B / 24B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai1190.13442011/05/01 15:01:150B / 81B / 27B
2kaki530.15502011/05/10 13:12:530B / 37B / 12B

Haskell _

RankUserSizeTimeDateStatistics
1dico_leque300.02922011/05/01 17:40:360B / 22B / 8B
2kaki300.02702011/05/02 09:08:260B / 22B / 8B

Java _

RankUserSizeTimeDateStatistics
1teebee1230.56652011/06/12 10:08:210B / 85B / 33B

Pascal _

RankUserSizeTimeDateStatistics
1*yuko*820.01872011/05/01 16:29:530B / 60B / 17B

Fortran _

RankUserSizeTimeDateStatistics
1*yuko*580.00322011/05/01 15:26:080B / 35B / 22B
2*yuko*550.03282012/11/18 00:45:090B / 31B / 23B

COBOL _

RankUserSizeTimeDateStatistics
1*yuko*2390.02002011/05/01 22:09:130B / 170B / 34B

Maxima _

RankUserSizeTimeDateStatistics
1pooq480.40792011/05/01 16:36:030B / 27B / 20B

Octave _

RankUserSizeTimeDateStatistics
1teebee271.25972011/05/02 05:10:420B / 14B / 13B
2inaniwa271.24452011/05/02 10:27:050B / 14B / 13B

REBOL _

RankUserSizeTimeDateStatistics
1teebee450.09502012/07/18 07:42:460B / 33B / 8B

Asymptote _

RankUserSizeTimeDateStatistics
1pooq552.75392011/05/02 20:40:550B / 29B / 25B
2teebee390.30392011/12/15 00:04:020B / 24B / 13B
3teebee(pooq)480.41822011/12/14 15:35:430B / 27B / 20B

AWK _

RankUserSizeTimeDateStatistics
1teebee180.00292011/05/02 02:40:110B / 9B / 9B
2twobit180.05892011/05/02 20:28:360B / 9B / 9B
3ninjalj180.03562011/05/03 17:58:180B / 9B / 9B

sed _

RankUserSizeTimeDateStatistics
1narb1040.02602011/05/04 19:58:000B / 63B / 41B
2I., S.1080.00452011/05/03 21:32:360B / 52B / 45B

dc _

RankUserSizeTimeDateStatistics
1tails290.02212011/05/05 04:55:060B / 17B / 12B
2tails270.07142012/04/15 14:30:140B / 15B / 12B

xgawk _

RankUserSizeTimeDateStatistics
1teebee180.02882011/05/02 04:09:070B / 9B / 9B
2twobit180.01602011/05/03 07:45:430B / 9B / 9B
3ninjalj180.13242011/05/03 17:58:280B / 9B / 9B

R _

RankUserSizeTimeDateStatistics
1pooq321.60192011/05/01 17:59:260B / 20B / 12B
2pooq310.45712012/10/25 07:45:340B / 21B / 10B

FlogScript _

RankUserSizeTimeDateStatistics
1milieu130.31942011/05/10 10:13:330B / ?B / ?B

Burlesque _

RankUserSizeTimeDateStatistics
1mroman70.03872013/05/01 05:22:500B / 4B / 3B

goruby _

RankUserSizeTimeDateStatistics
1teebee130.16522011/05/02 03:43:380B / 6B / 7B
2leonid130.17792011/05/02 06:58:050B / 6B / 7B

Groovy _

RankUserSizeTimeDateStatistics
1nn538.52852011/05/01 17:38:130B / 41B / 11B

Scala _

RankUserSizeTimeDateStatistics
1teebee4519.12382011/05/02 05:40:490B / 36B / 9B
2murky-satyr4418.89662011/05/30 05:25:210B / 36B / 8B

Logo _

RankUserSizeTimeDateStatistics
1teebee410.04822011/05/02 03:17:530B / 27B / 9B
2teebee350.02182011/06/18 23:03:310B / 25B / 5B

Language Ranking_

RankLangUserSizeScore
1Burlesquemroman710000
2gorubyteebee135384
3FlogScriptmilieu135384
4Kteebee154666
5AWKteebee183888
6xgawkteebee183888
7Rubyteebee203500
8JI., S.(J R6 only)213333
9Perltybalt89213333
10Arcyouz223181
11Pythonteebee262692
12Octaveteebee272592
13dctails272592
14Haskelldico_leque302333
15Rpooq312258
16BASIC*yuko*332121
17Common LISPkozima342058
18Schemedico_leque342058
19Logoteebee352000
20A+twobit361944
21Asymptoteteebee391794
22PHPteebee391794
23REXXpooq391794
24Tclteebee401750
25JavaScriptnn411707
26Luatwobit411707
27Scalamurky-satyr441590
28REBOLteebee451555
29Xtalteebee471489
30Maximapooq481458
31Cnn491428
32Groovynn531320
33OCamlkaki531320
34Fortran*yuko*551272
35Kiteteebee75933
36Iopooq78897
37Pascal*yuko*82853
38sednarb104673
39Javateebee123569
40COBOL*yuko*239292

return top