7 kyu
How many twos?
567 of 1,580Nmistrata
Description:
Write a function that returns the number of '2's in the factorization of a number.
For example,
two_count(24)
should return 3, since the factorization of 24 is 2^3 x 3
two_count(17280)
should return 7, since the factorization of 17280 is 2^7 x 5 x 3^3
The number passed to two_count (twoCount) will always be a positive integer greater than or equal to 1.
Algorithms
Stats:
Created | Feb 1, 2016 |
Published | Feb 1, 2016 |
Warriors Trained | 2715 |
Total Skips | 145 |
Total Code Submissions | 3875 |
Total Times Completed | 1580 |
Python Completions | 567 |
JavaScript Completions | 543 |
Ruby Completions | 179 |
CoffeeScript Completions | 18 |
Haskell Completions | 137 |
C# Completions | 191 |
Clojure Completions | 78 |
Total Stars | 35 |
% of votes with a positive feedback rating | 91% of 229 |
Total "Very Satisfied" Votes | 196 |
Total "Somewhat Satisfied" Votes | 26 |
Total "Not Satisfied" Votes | 7 |
Total Rank Assessments | 20 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |