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.
i hate any thing realted to prime numbers
Enabled in this fork
Enabled in this fork
Description should be language agnostic. Here is a suggestion for a fix (reworded).
I also made the description language-agnostic using
KaTeX
in my Lua translation but feel free to use the following or another one if you prefer.preview
Task
Write a function that returns the power of
2
in the prime factorization of a positive integer (>= 1
).Examples
copy-paste
# Task
Write a function that returns the power of `2` in the prime factorization of a positive integer (`>= 1`).
# Examples
```
24 should return 3 -> 24 = 23 * 3
17280 should return 7 -> 17280 = 27 * 3**3 * 5
```
Lua translation !
made description language-agnostic + used
KaTeX
Haskell translation
The proper name for 'relatively prime numbers' is 'coprime numbers', so you can change the title if you want ;)
This kata is not about primes but about "relatively prime". Where do you read anything about 1 considered a prime in this kata? Description only talks about factors and divisors.
One cannot be called a prime number, since a prime has 2 divisors, and one is 1. The number 1 is not classified as either simple or composite
Here 1 is considered a prime number
Superceded by latest fork
Approved
Lua translation!
Node 18 for JS
Loading more items...