Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 4d1ba304c8bb5704eb00012d

Linear congruential generator

http://en.wikipedia.org/wiki/Linear_congruential_generator

Start file
a = 25
b = 7
m = 48
x0 = 0
x1 = (a * x0 + b) % m
x2 = (a * x1 + b) % m
...

|
v

End file
a = 25
b = 7
m = 48
x0 = 0
x1 = (a * x0 + b) % m
x2 = (a * x1 + b) % m
...

|
v

0
7
38
45
28
35
18
25
8
15
46
5
36
43
26
33
16
23
6
13
44
3
34
41
24
31
14
21
4
11
42
1
32
39
22
29
12
19
2
9
40
47
30
37
20
27
10
17
0

View Diff

11a12,60
> 0
> 7
> 38
> 45
> 28
> 35
> 18
> 25
> 8
> 15
> 46
> 5
> 36
> 43
> 26
> 33
> 16
> 23
> 6
> 13
> 44
> 3
> 34
> 41
> 24
> 31
> 14
> 21
> 4
> 11
> 42
> 1
> 32
> 39
> 22
> 29
> 12
> 19
> 2
> 9
> 40
> 47
> 30
> 37
> 20
> 27
> 10
> 17
> 0

Solutions by @h_east:

Unlock 1 remaining solutions by signing in and submitting your own entry
Created by: @kana1

52 active golfers, 137 entries

Solutions by @h_east:
39
#41 - h_east (トロッコ6個) / @h_east

01/17/2011 at 03:27PM