Moving Average

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

After each "score", calculate the moving average of the 5 most recent scores. Round each result to 1 decimal place.

Options

exec is denied

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

Sample input:_

Score: 73.5
Score: 68.7
Score: 54.2
Score: 57.5
Score: 72.1
Score: 80.0
Score: 79.9
Score: 73.3
Score: 71.6
Score: 71.7
Score: 68.6
Score: 66.3
Score: 62.9
Score: 61.4
Score: 63.8
Score: 64.4
Score: 71.5
Score: 65.0
Score: 62.2
Score: 60.1
Score: 57.7
Score: 56.9
Score: 54.6
Score: 58.0
Score: 50.1
Score: 53.2
Score: 64.3
Score: 92.2
Score: 91.6
Score: 88.8
Score: 42.7
Score: 15.4
Score: 26.6
Score: 31.9
Score: 45.2
Score: 69.0
Score: 83.1
Score: 94.5
Score:  4.7
Score: 36.7
Score: 45.3
Score: 75.8
Score: 32.9
Score: 51.1
Score: 64.6
Score: 57.4
Score: 57.1
Score: 43.3
Score: 49.6
Score: 73.5
Score: 30.1
Score: 26.5
Score: 34.1
Score: 83.7
Score: 63.4
Score: 26.0
Score: 93.7
Score: 86.1
Score: 42.6
Score: 90.2
Score: 48.0
Score:  7.0
Score: 78.0
Score: 12.2
Score: 67.2
Score: 26.6
Score: 75.4
Score: 62.6
Score: 18.1
Score: 12.3
Score: 25.9
Score: 28.4
Score: 23.9
Score: 20.9
Score: 85.9
Score: 85.9
Score: 23.2
Score: 68.8
Score: 97.2
Score: 26.4
Score: 97.5
Score: 65.7
Score:  7.9
Score: 51.2
Score: 38.5
Score: 24.0
Score:  5.0
Score: 68.0
Score: 76.8
Score: 92.0
Score: 56.8
Score: 54.5
Score: 32.2
Score: 49.4
Score: 91.4
Score: 88.2
Score: 11.3
Score: 82.1
Score: 84.1
Score: 22.1
Score: 66.7
Score: 71.1
Score: 82.4
Score:  8.1
Score: 58.3
Score: 67.5
Score: 25.2
Score: 37.6
Score: 92.8
Score: 99.5
Score: 89.7
Score: 21.2
Score: 29.0
Score: 22.2
Score: 62.5
Score: 53.2
Score: 35.1
Score: 29.4
Score: 65.0
Score: 59.7
Score: 88.7
Score: 36.1
Score: 16.2
Score: 23.3
Score:  2.1
Score: 75.3
Score: 58.2
Score: 37.3
Score: 53.1
Score: 87.3
Score: 68.8
Score: 95.6
Score: 80.8
Score: 93.0
Score: 50.6
Score: 41.9
Score: 99.6
Score: 96.7
Score: 86.7
Score: 64.3
Score: 90.5
Score: 65.6
Score: 79.6
Score: 94.9
Score: 72.3
Score: 43.0
Score: 18.8
Score: 92.2
Score: 74.9
Score: 25.1
Score: 64.5
Score:  8.9
Score: 17.5
Score: 16.3
Score: 63.0
Score: 58.0
Score: 36.8
Score: 70.2
Score: 78.7
Score: 29.1
Score: 74.4
Score:  9.4
Score:  3.5
Score: 32.3
Score: 71.6
Score: 32.3
Score: 94.1
Score:  8.3
Score: 88.5
Score: 95.0
Score: 17.4
Score: 84.9
Score: 21.4
Score:  0.3
Score: 68.9
Score: 93.3
Score: 61.6
Score: 30.8
Score:  5.2
Score: 88.7
Score: 95.3
Score: 23.2
Score: 69.4
Score: 52.6
Score: 71.5
Score:  0.9
Score: 70.9
Score:  6.2
Score: 30.4
Score: 44.2
Score: 72.4
Score: 19.6
Score: 97.3
Score: 30.4
Score: 29.2
Score: 89.1
Score: 70.2
Score: 89.0
Score: 40.0
Score: 93.7
Score: 42.5
Score: 28.0
Score: 72.2
Score: 85.8
Score: 39.4
Score: 67.2
Score: 73.6
Score: 30.5
Score: 87.8
Score: 34.4
Score: 55.8
Score:  8.3
Score: 97.2
Score: 24.2
Score: 60.1
Score: 16.5
Score:  6.0
Score: 23.8
Score: 61.9
Score: 69.6
Score: 15.3
Score:  5.4
Score: 42.8
Score: 87.6
Score: 92.0
Score: 33.8
Score: 20.9
Score: 49.9
Score: 16.6
Score: 13.4
Score: 49.9
Score: 66.7
Score: 80.4
Score: 25.1
Score: 62.5
Score: 15.9
Score: 59.2
Score: 70.6
Score: 54.7
Score: 59.5
Score: 60.6
Score: 99.3
Score: 87.4
Score: 20.2
Score: 88.2
Score:  8.7
Score: 55.9
Score: 31.5
Score: 28.9
Score: 28.7
Score: 56.2
Score: 53.5
Score: 29.0
Score: 16.1
Score: 61.5
Score: 99.9
Score: 24.5
Score:  1.1
Score: 12.5
Score: 70.8
Score: 93.6
Score: 90.6
Score: 28.5
Score: 50.2
Score: 25.4
Score: 11.7
Score: 28.3
Score: 53.2
Score: 61.8
Score:  8.8
Score: 44.3
Score: 82.7
Score: 34.4
Score: 48.2
Score: 14.2
Score: 50.3
Score:  8.3
Score: 10.7
Score: 81.0
Score: 17.2
Score: 99.2
Score: 65.9
Score: 50.5
Score: 41.6
Score: 33.1
Score: 79.6
Score: 57.1
Score: 17.6
Score: 82.1
Score: 45.4
Score: 67.2
Score: 61.5
Score: 32.3
Score: 61.9
Score: 51.8
Score: 30.0
Score: 18.5
Score: 57.4
Score: 16.0
Score:  9.9

Sample output:

Score: 73.5 Average: 73.5
Score: 68.7 Average: 71.1
Score: 54.2 Average: 65.5
Score: 57.5 Average: 63.5
Score: 72.1 Average: 65.2
Score: 80.0 Average: 66.5
Score: 79.9 Average: 68.7
Score: 73.3 Average: 72.6
Score: 71.6 Average: 75.4
Score: 71.7 Average: 75.3
Score: 68.6 Average: 73.0
Score: 66.3 Average: 70.3
Score: 62.9 Average: 68.2
Score: 61.4 Average: 66.2
Score: 63.8 Average: 64.6
Score: 64.4 Average: 63.8
Score: 71.5 Average: 64.8
Score: 65.0 Average: 65.2
Score: 62.2 Average: 65.4
Score: 60.1 Average: 64.6
Score: 57.7 Average: 63.3
Score: 56.9 Average: 60.4
Score: 54.6 Average: 58.3
Score: 58.0 Average: 57.5
Score: 50.1 Average: 55.5
Score: 53.2 Average: 54.6
Score: 64.3 Average: 56.0
Score: 92.2 Average: 63.6
Score: 91.6 Average: 70.3
Score: 88.8 Average: 78.0
Score: 42.7 Average: 75.9
Score: 15.4 Average: 66.1
Score: 26.6 Average: 53.0
Score: 31.9 Average: 41.1
Score: 45.2 Average: 32.4
Score: 69.0 Average: 37.6
Score: 83.1 Average: 51.2
Score: 94.5 Average: 64.7
Score:  4.7 Average: 59.3
Score: 36.7 Average: 57.6
Score: 45.3 Average: 52.9
Score: 75.8 Average: 51.4
Score: 32.9 Average: 39.1
Score: 51.1 Average: 48.4
Score: 64.6 Average: 53.9
Score: 57.4 Average: 56.4
Score: 57.1 Average: 52.6
Score: 43.3 Average: 54.7
Score: 49.6 Average: 54.4
Score: 73.5 Average: 56.2
Score: 30.1 Average: 50.7
Score: 26.5 Average: 44.6
Score: 34.1 Average: 42.8
Score: 83.7 Average: 49.6
Score: 63.4 Average: 47.6
Score: 26.0 Average: 46.7
Score: 93.7 Average: 60.2
Score: 86.1 Average: 70.6
Score: 42.6 Average: 62.4
Score: 90.2 Average: 67.7
Score: 48.0 Average: 72.1
Score:  7.0 Average: 54.8
Score: 78.0 Average: 53.2
Score: 12.2 Average: 47.1
Score: 67.2 Average: 42.5
Score: 26.6 Average: 38.2
Score: 75.4 Average: 51.9
Score: 62.6 Average: 48.8
Score: 18.1 Average: 50.0
Score: 12.3 Average: 39.0
Score: 25.9 Average: 38.9
Score: 28.4 Average: 29.5
Score: 23.9 Average: 21.7
Score: 20.9 Average: 22.3
Score: 85.9 Average: 37.0
Score: 85.9 Average: 49.0
Score: 23.2 Average: 48.0
Score: 68.8 Average: 56.9
Score: 97.2 Average: 72.2
Score: 26.4 Average: 60.3
Score: 97.5 Average: 62.6
Score: 65.7 Average: 71.1
Score:  7.9 Average: 58.9
Score: 51.2 Average: 49.7
Score: 38.5 Average: 52.2
Score: 24.0 Average: 37.5
Score:  5.0 Average: 25.3
Score: 68.0 Average: 37.3
Score: 76.8 Average: 42.5
Score: 92.0 Average: 53.2
Score: 56.8 Average: 59.7
Score: 54.5 Average: 69.6
Score: 32.2 Average: 62.5
Score: 49.4 Average: 57.0
Score: 91.4 Average: 56.9
Score: 88.2 Average: 63.1
Score: 11.3 Average: 54.5
Score: 82.1 Average: 64.5
Score: 84.1 Average: 71.4
Score: 22.1 Average: 57.6
Score: 66.7 Average: 53.3
Score: 71.1 Average: 65.2
Score: 82.4 Average: 65.3
Score:  8.1 Average: 50.1
Score: 58.3 Average: 57.3
Score: 67.5 Average: 57.5
Score: 25.2 Average: 48.3
Score: 37.6 Average: 39.3
Score: 92.8 Average: 56.3
Score: 99.5 Average: 64.5
Score: 89.7 Average: 69.0
Score: 21.2 Average: 68.2
Score: 29.0 Average: 66.4
Score: 22.2 Average: 52.3
Score: 62.5 Average: 44.9
Score: 53.2 Average: 37.6
Score: 35.1 Average: 40.4
Score: 29.4 Average: 40.5
Score: 65.0 Average: 49.0
Score: 59.7 Average: 48.5
Score: 88.7 Average: 55.6
Score: 36.1 Average: 55.8
Score: 16.2 Average: 53.1
Score: 23.3 Average: 44.8
Score:  2.1 Average: 33.3
Score: 75.3 Average: 30.6
Score: 58.2 Average: 35.0
Score: 37.3 Average: 39.2
Score: 53.1 Average: 45.2
Score: 87.3 Average: 62.2
Score: 68.8 Average: 60.9
Score: 95.6 Average: 68.4
Score: 80.8 Average: 77.1
Score: 93.0 Average: 85.1
Score: 50.6 Average: 77.8
Score: 41.9 Average: 72.4
Score: 99.6 Average: 73.2
Score: 96.7 Average: 76.4
Score: 86.7 Average: 75.1
Score: 64.3 Average: 77.8
Score: 90.5 Average: 87.6
Score: 65.6 Average: 80.8
Score: 79.6 Average: 77.3
Score: 94.9 Average: 79.0
Score: 72.3 Average: 80.6
Score: 43.0 Average: 71.1
Score: 18.8 Average: 61.7
Score: 92.2 Average: 64.2
Score: 74.9 Average: 60.2
Score: 25.1 Average: 50.8
Score: 64.5 Average: 55.1
Score:  8.9 Average: 53.1
Score: 17.5 Average: 38.2
Score: 16.3 Average: 26.5
Score: 63.0 Average: 34.0
Score: 58.0 Average: 32.7
Score: 36.8 Average: 38.3
Score: 70.2 Average: 48.9
Score: 78.7 Average: 61.3
Score: 29.1 Average: 54.6
Score: 74.4 Average: 57.8
Score:  9.4 Average: 52.4
Score:  3.5 Average: 39.0
Score: 32.3 Average: 29.7
Score: 71.6 Average: 38.2
Score: 32.3 Average: 29.8
Score: 94.1 Average: 46.8
Score:  8.3 Average: 47.7
Score: 88.5 Average: 59.0
Score: 95.0 Average: 63.6
Score: 17.4 Average: 60.7
Score: 84.9 Average: 58.8
Score: 21.4 Average: 61.4
Score:  0.3 Average: 43.8
Score: 68.9 Average: 38.6
Score: 93.3 Average: 53.8
Score: 61.6 Average: 49.1
Score: 30.8 Average: 51.0
Score:  5.2 Average: 52.0
Score: 88.7 Average: 55.9
Score: 95.3 Average: 56.3
Score: 23.2 Average: 48.6
Score: 69.4 Average: 56.4
Score: 52.6 Average: 65.8
Score: 71.5 Average: 62.4
Score:  0.9 Average: 43.5
Score: 70.9 Average: 53.1
Score:  6.2 Average: 40.4
Score: 30.4 Average: 36.0
Score: 44.2 Average: 30.5
Score: 72.4 Average: 44.8
Score: 19.6 Average: 34.6
Score: 97.3 Average: 52.8
Score: 30.4 Average: 52.8
Score: 29.2 Average: 49.8
Score: 89.1 Average: 53.1
Score: 70.2 Average: 63.2
Score: 89.0 Average: 61.6
Score: 40.0 Average: 63.5
Score: 93.7 Average: 76.4
Score: 42.5 Average: 67.1
Score: 28.0 Average: 58.6
Score: 72.2 Average: 55.3
Score: 85.8 Average: 64.4
Score: 39.4 Average: 53.6
Score: 67.2 Average: 58.5
Score: 73.6 Average: 67.6
Score: 30.5 Average: 59.3
Score: 87.8 Average: 59.7
Score: 34.4 Average: 58.7
Score: 55.8 Average: 56.4
Score:  8.3 Average: 43.4
Score: 97.2 Average: 56.7
Score: 24.2 Average: 44.0
Score: 60.1 Average: 49.1
Score: 16.5 Average: 41.3
Score:  6.0 Average: 40.8
Score: 23.8 Average: 26.1
Score: 61.9 Average: 33.7
Score: 69.6 Average: 35.6
Score: 15.3 Average: 35.3
Score:  5.4 Average: 35.2
Score: 42.8 Average: 39.0
Score: 87.6 Average: 44.1
Score: 92.0 Average: 48.6
Score: 33.8 Average: 52.3
Score: 20.9 Average: 55.4
Score: 49.9 Average: 56.8
Score: 16.6 Average: 42.6
Score: 13.4 Average: 26.9
Score: 49.9 Average: 30.1
Score: 66.7 Average: 39.3
Score: 80.4 Average: 45.4
Score: 25.1 Average: 47.1
Score: 62.5 Average: 56.9
Score: 15.9 Average: 50.1
Score: 59.2 Average: 48.6
Score: 70.6 Average: 46.7
Score: 54.7 Average: 52.6
Score: 59.5 Average: 52.0
Score: 60.6 Average: 60.9
Score: 99.3 Average: 68.9
Score: 87.4 Average: 72.3
Score: 20.2 Average: 65.4
Score: 88.2 Average: 71.1
Score:  8.7 Average: 60.8
Score: 55.9 Average: 52.1
Score: 31.5 Average: 40.9
Score: 28.9 Average: 42.6
Score: 28.7 Average: 30.7
Score: 56.2 Average: 40.2
Score: 53.5 Average: 39.8
Score: 29.0 Average: 39.3
Score: 16.1 Average: 36.7
Score: 61.5 Average: 43.3
Score: 99.9 Average: 52.0
Score: 24.5 Average: 46.2
Score:  1.1 Average: 40.6
Score: 12.5 Average: 39.9
Score: 70.8 Average: 41.8
Score: 93.6 Average: 40.5
Score: 90.6 Average: 53.7
Score: 28.5 Average: 59.2
Score: 50.2 Average: 66.7
Score: 25.4 Average: 57.7
Score: 11.7 Average: 41.3
Score: 28.3 Average: 28.8
Score: 53.2 Average: 33.8
Score: 61.8 Average: 36.1
Score:  8.8 Average: 32.8
Score: 44.3 Average: 39.3
Score: 82.7 Average: 50.2
Score: 34.4 Average: 46.4
Score: 48.2 Average: 43.7
Score: 14.2 Average: 44.8
Score: 50.3 Average: 46.0
Score:  8.3 Average: 31.1
Score: 10.7 Average: 26.3
Score: 81.0 Average: 32.9
Score: 17.2 Average: 33.5
Score: 99.2 Average: 43.3
Score: 65.9 Average: 54.8
Score: 50.5 Average: 62.8
Score: 41.6 Average: 54.9
Score: 33.1 Average: 58.1
Score: 79.6 Average: 54.1
Score: 57.1 Average: 52.4
Score: 17.6 Average: 45.8
Score: 82.1 Average: 53.9
Score: 45.4 Average: 56.4
Score: 67.2 Average: 53.9
Score: 61.5 Average: 54.8
Score: 32.3 Average: 57.7
Score: 61.9 Average: 53.7
Score: 51.8 Average: 54.9
Score: 30.0 Average: 47.5
Score: 18.5 Average: 38.9
Score: 57.4 Average: 43.9
Score: 16.0 Average: 34.7
Score:  9.9 Average: 26.4

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1clock820.03412012/10/19 07:07:000B / 38B / 39B
2mgrosso1210.01942012/10/12 18:35:381B / 63B / 52B

Perl _

RankUserSizeTimeDateStatistics
1teebee750.01362012/10/14 01:10:180B / 28B / 43B
2macik780.01292012/10/18 22:52:350B / ?B / ?B
3teebee(macik)730.02192012/10/25 04:06:540B / 31B / 38B

Python _

RankUserSizeTimeDateStatistics
1hallvabo880.03912012/10/13 00:36:280B / 44B / 41B
2clock880.02422012/10/13 05:23:110B / 48B / 36B
3twobit880.03542012/10/15 08:28:390B / 48B / 36B
4Hendrik950.02102012/10/25 03:40:290B / 52B / 39B

PHP _

RankUserSizeTimeDateStatistics
1teebee1010.04402012/10/20 02:17:460B / 52B / 46B
2clock1010.04512012/10/20 08:13:150B / 51B / 47B

Io _

RankUserSizeTimeDateStatistics
1pooq1510.12562012/10/20 08:13:320B / 101B / 44B

JavaScript _

RankUserSizeTimeDateStatistics
1clock1040.03872012/10/19 11:08:080B / 62B / 42B

Lua _

RankUserSizeTimeDateStatistics
1desty1290.01262013/03/02 04:19:340B / 75B / 50B

Xtal _

RankUserSizeTimeDateStatistics
1teebee1330.02252012/10/21 07:47:370B / 65B / 65B
2pooq1570.01922012/10/20 17:03:410B / 86B / 68B

BASIC _

RankUserSizeTimeDateStatistics
1pooq1210.02582012/10/19 10:37:280B / 71B / 42B

J _

RankUserSizeTimeDateStatistics
1I., S.710.04562012/10/11 06:27:330B / 22B / 47B

K _

RankUserSizeTimeDateStatistics
1twobit590.01772012/10/21 21:39:230B / 20B / 38B

C _

RankUserSizeTimeDateStatistics
1nu1110.01112012/10/13 11:43:060B / 59B / 51B
2ush1210.01252012/10/11 17:52:130B / 67B / 52B

C# _

RankUserSizeTimeDateStatistics
1Hendrik2100.07062012/10/19 06:38:590B / 136B / 63B
2macik2160.08352012/10/21 22:23:580B / ?B / ?B

Maxima _

RankUserSizeTimeDateStatistics
1pooq1440.29912012/10/19 14:01:300B / 78B / 61B

AWK _

RankUserSizeTimeDateStatistics
1nn600.01132012/11/14 23:02:450B / 27B / 31B

GolfScript _

RankUserSizeTimeDateStatistics
1tails510.18682012/10/20 15:16:530B / 12B / 37B
2clock540.35362012/10/22 04:05:060B / 16B / 36B
3macik580.13922012/10/20 01:12:100B / ?B / ?B

Burlesque _

RankUserSizeTimeDateStatistics
1clock750.09032012/10/19 03:35:270B / 32B / 41B

Groovy _

RankUserSizeTimeDateStatistics
1clock1021.22472012/10/19 07:34:200B / 60B / 36B

Language Ranking_

RankLangUserSizeScore
1GolfScripttails5110000
2Ktwobit598644
3AWKnn608500
4JI., S.717183
5Perlteebee(macik)736986
6Burlesqueclock756800
7Rubyclock826219
8Pythonhallvabo885795
9PHPteebee1015049
10Groovyclock1025000
11JavaScriptclock1044903
12Cnu1114594
13BASICpooq1214214
14Luadesty1293953
15Xtalteebee1333834
16Maximapooq1443541
17Iopooq1513377
18C#Hendrik2102428

return top