Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- electrons = int(input())
- shells = []
- for i in range(1, sys.maxsize):
- shell = 2 * i ** 2
- electrons -= shell
- if electrons < 0:
- shells.append(shell + electrons)
- break
- shells.append(shell)
- print(shells)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement