6 kyu
Ideal electron distribution
787 of 1,398SandQueen
Description:
You are a khmmadkhm scientist and you decided to play with electron distribution among atom's shells. You know that basic idea of electron distribution is that electrons should fill a shell until it's holding the maximum number of electrons.
Rules:
- Maximum number of electrons in a shell is distributed with a rule of 2n^2 (n being position of a shell).
- For example, maximum number of electrons in 3rd shell is 2*3^2 = 18.
- Electrons should fill the lowest level shell first.
- If the electrons have completely filled the lowest level shell, the other unoccupied electrons will fill the higher level shell and so on.
Ex.: atomicNumber(1); should return [1]
atomicNumber(10); should return [2, 8]
atomicNumber(11); should return [2, 8, 1]
atomicNumber(47); should return [2, 8, 18, 19]
Arrays
Lists
Algorithms
Similar Kata:
Stats:
Created | May 13, 2017 |
Published | May 13, 2017 |
Warriors Trained | 2035 |
Total Skips | 29 |
Total Code Submissions | 3405 |
Total Times Completed | 1398 |
JavaScript Completions | 541 |
Python Completions | 787 |
Ruby Completions | 85 |
Crystal Completions | 10 |
Haskell Completions | 45 |
COBOL Completions | 7 |
Total Stars | 35 |
% of votes with a positive feedback rating | 94% of 269 |
Total "Very Satisfied" Votes | 239 |
Total "Somewhat Satisfied" Votes | 27 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 10 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |