Sign in
or
Register
Courses
Textbook
Compiler
Contests
Topics
Courses
Basics of Python
(Python) Subroutines: Procedures and Functions - 2
Module:
(Python) Subroutines: Procedures and Functions - 2
Problem
3
/8
The number of units in the binary notation of a number
Problem
Write a function that calculates, given a number N in decimal notation, the number of ones in the binary representation of this number (0 <= N <= 10
6
)
Examples
#
Input
Output
1
255
8
1000
ms
256 Mb
Rules for program design and list of errors in automatic problem checking
Teacher commentary