mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
core: contest: detail fix
This commit is contained in:
1 parent
7e8a90a6b2
commit
a988445597
10 files changed
+10
-31
No files matched your search
@@ -8,7 +8,6 @@ export function buildProjection(fields: string[]): Record<string, 1> {
|
||||
|
||||
export const log2 = (val: bigint | number) => {
|
||||
if (typeof val === 'bigint') {
|
||||
// @ts-ignore
|
||||
for (let i = 0n; ; i++) if (!(val >> i)) return +i.toString() - 1;
|
||||
} else {
|
||||
for (let i = 0; ; i++) if (!(val >> i)) return i - 1;
|
||||
|
||||
Reference in new issue
Block a user