Minimal steps down to 1: Difference between revisions

Content added Content deleted
(Added Go)
m (→‎{{header|Go}}: A bit tidier output.)
Line 135:
verb, verb2, plural := "are", "have", "s"
if nums == 1 {
verb, verb2, plural = "is", "has", " "
}
fmt.Printf(" There %s %d number%s in the range 1-%d ", verb, nums, plural, lim)
Line 178:
9: 2 steps: /3 -> 3, /3 -> 1
10: 3 steps: /2 -> 5, -2 -> 3, /3 -> 1
There is 1 number in the range 1-2000 that has maximum 'minimal steps' of 17:
[1699]
There is 1 number in the range 1-20000 that has maximum 'minimal steps' of 24:
[19681]
There is 1 number in the range 1-50000 that has maximum 'minimal steps' of 26:
[45925]
</pre>