This commit is contained in:
Zengtudor 2024-10-08 18:38:04 +08:00
parent 4195226207
commit eb95caa631

View File

@ -14,7 +14,7 @@ static ull fact(const ull n)noexcept{
if(it != fact_map.end())return (*it).second;
ull ret {1};
for(ull i{2};i<=n;i++){
ret=(ret*i)%k;
ret=(ret%k*i%k);
}
fact_map.insert({n,ret});
return ret;