Dinesman's multiple-dwelling problem: Difference between revisions

→‎{{header|D}}: fix overflow issue
(→‎{{header|D}}: fix overflow issue)
Line 131:
<lang d>import std.stdio, std.exception, std.range, std.algorithm, std.math;
 
pure Tulong fact(T)(Tuint n) {
Tulong result = 1;
for (Tuint i = 2; i <= n; i++)
result *= i;
return result;
Line 140:
struct LazyPermutation {
private uint[] seq;
private size_tulong tot;
private size_t num;
 
Anonymous user