Anonymous user
Solve triangle solitaire puzzle: Difference between revisions
Updated D entry
(→{{header|Ruby}}: change of the termination condition) |
(Updated D entry) |
||
Line 29:
string b2s(in int[] n) pure @safe {
static immutable fmt =
.map!(i => " ".replicate(5 - i) ~ "%d ".replicate(i))
.join(
return fmt.format(n[0], n[1], n[2], n[3], n[4], n[5], n[6],
n[7], n[8], n[9], n[10], n[11], n[12], n[13], n[14]);
|