Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Even though I took this approach, I wouldn't count it as a best practice. It sacrifices some time complexity for readability.
Neat. Best Practice + Clever. I wish to give both to this.
Crikey, that number won't even fit in 128 bits. :O
C# Translation
Yep, BigInt is fine, thank you.
Yes. Everything works perfectly. Thank you =)
Worked with BigInt.
BigInt implemented, coud you retry?
Changed expected return type to BigInt. Could you retry?
Should BigInt be used in js solutions?
While having everything correct up to 57, mine fails at all the next bigger values.
Biggest number for n = 100 is
1425432294246982705017331107505766145041177820n
wich is bigger thanNumber.MAX_SAFE_INTEGER
How big can the values get in the 100'th triangle? Maybe BigInt is required here as you point out.
This comment is hidden because it contains spoiler information about the solution
Can anyone try JS, I think I fixed it?
The second solution and old reference solution had floating point issues. I have added an integer only solution now. But I still get different results than your first solution.
Loading more items...