We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b54983 commit 2efb7c3Copy full SHA for 2efb7c3
math/fast_ilog.cpp
@@ -22,8 +22,8 @@ int ilog10(ull x)
22
if (x >= 1000000000000000ull) ans += 16, x /= 10000000000000000ull;
23
if (x >= 10000000ull) ans += 8, x /= 100000000ull;
24
if (x >= 1000ull) ans += 4, x /= 10000ull;
25
- if (x >= 10) ans += 2, x /= 100ull;
26
- if (x >= 1) ans++;
+ if (x >= 10ull) ans += 2, x /= 100ull;
+ if (x >= 1ull) ans++;
27
return ans;
28
}
29
0 commit comments