Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

количество 1 и 0 в последовательности чисел до n

Language: Layout:
- ] Show input
Absolute running time: 0.09 sec, cpu time: 0.06 sec, memory peak: 6 Mb, absolute service time: 0,1 sec 
edit mode |  history  | discussion
Hello, world!
Введите число:
i= 0 s1= 1 s0= 0
i= 1 s1= 1 s0= 1
i= 0 s1= 2 s0= 1
i= 1 s1= 3 s0= 1
i= 0 s1= 4 s0= 1
i= 2 s1= 4 s0= 2
i= 1 s1= 4 s0= 3
i= 0 s1= 5 s0= 3
i= 2 s1= 6 s0= 3
i= 1 s1= 6 s0= 4
i= 0 s1= 7 s0= 4
i= 3 s1= 7 s0= 5
i= 1 s1= 8 s0= 5
i= 0 s1= 9 s0= 5
i= 3 s1= 10 s0= 5
i= 1 s1= 11 s0= 5
i= 0 s1= 12 s0= 5
i= 4 s1= 12 s0= 6
i= 2 s1= 12 s0= 7
i= 1 s1= 12 s0= 8
i= 0 s1= 13 s0= 8
i= 4 s1= 14 s0= 8
i= 2 s1= 14 s0= 9
i= 1 s1= 14 s0= 10
i= 0 s1= 15 s0= 10
i= 5 s1= 15 s0= 11
i= 2 s1= 16 s0= 11
i= 1 s1= 16 s0= 12
i= 0 s1= 17 s0= 12

s1= 17 s0= 12