On 08/25/2011 04:11 AM, bearophile wrote:
Timon Geh:

Done: http://pastebin.com/Vx4hXvaT

Theoretically it could use std.bigint, but I have still not found out
how to convert these to string without pain.

To compute Hamming(1_000_000) this converts a BigInt to string:

string bigIntRepr(BigInt i) {
     const(char)[] result;
     i.toString((const(char)[] s) { result = s; }, "d");
     return to!string(result);
}

Bye,
bearophile

Ah, it is the format string that is not standard as well, now I get it.
I'll give it a try tomorrow, thanks!

Reply via email to