Problem
Tulis program dengan fungsi rekursif untuk mengira jumlah bit dalam nombor asli.
Input
Baris pertama mengandungi nombor asli N ( N<=10
9 ).
Cetakan
Cetak jumlah bit.
Contoh
| # |
Input |
Output |
| 1 |
16 |
1 |
| 2 |
7 |
3 |
jadual>
Запрещенные операторы: for; while; until; __builtin_popcount