Grains

avatar

export const square = (num) => {

if(num<=0 || num > 64) throw new Error('square must be between 1 and 64');

return 2n**BigInt(num-1);

};

export const total = () => {

let result = 0n;

for(let i=0; i<64; i++){

result += 2n\*\*BigInt(i);

}

return result;

};



0
0
0.000
2 comments
avatar

Thank you for your witness vote!
Have a !BEER on me!
To Opt-Out of my witness beer program just comment STOP below

0
0
0.000