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

different_divisors

Language: Layout:
+ ] Show input
Absolute running time: 0.17 sec, cpu time: 0.06 sec, memory peak: 5 Mb, absolute service time: 0,18 sec 
fork mode |  history
x = 1386  -> to binary =  10101101010

Try divide at  2
1386	=	693	*	2	+	0		remainder as binary: 0
693	=	346	*	2	+	1		remainder as binary: 1
346	=	173	*	2	+	0		remainder as binary: 0
173	=	86	*	2	+	1		remainder as binary: 1
86	=	43	*	2	+	0		remainder as binary: 0
43	=	21	*	2	+	1		remainder as binary: 1
21	=	10	*	2	+	1		remainder as binary: 1
10	=	5	*	2	+	0		remainder as binary: 0
5	=	2	*	2	+	1		remainder as binary: 1
2	=	1	*	2	+	0		remainder as binary: 0
1	=	0	*	2	+	1		remainder as binary: 1

Try divide at  4
1386	=	346	*	4	+	2		remainder as binary: 10
346	=	86	*	4	+	2		remainder as binary: 10
86	=	21	*	4	+	2		remainder as binary: 10
21	=	5	*	4	+	1		remainder as binary: 01
5	=	1	*	4	+	1		remainder as binary: 01
1	=	0	*	4	+	1		remainder as binary: 01

Try divide at  8
1386	=	173	*	8	+	2		remainder as binary: 010
173	=	21	*	8	+	5		remainder as binary: 101
21	=	2	*	8	+	5		remainder as binary: 101
2	=	0	*	8	+	2		remainder as binary: 010

Try divide at  16
1386	=	86	*	16	+	10		remainder as binary: 1010
86	=	5	*	16	+	6		remainder as binary: 0110
5	=	0	*	16	+	5		remainder as binary: 0101

Try divide at  32
1386	=	43	*	32	+	10		remainder as binary: 01010
43	=	1	*	32	+	11		remainder as binary: 01011
1	=	0	*	32	+	1		remainder as binary: 00001

Try divide at  64
1386	=	21	*	64	+	42		remainder as binary: 101010
21	=	0	*	64	+	21		remainder as binary: 010101

Try divide at  128
1386	=	10	*	128	+	106		remainder as binary: 1101010
10	=	0	*	128	+	10		remainder as binary: 0001010

Try divide at  256
1386	=	5	*	256	+	106		remainder as binary: 01101010
5	=	0	*	256	+	5		remainder as binary: 00000101

Try divide at  512
1386	=	2	*	512	+	362		remainder as binary: 101101010
2	=	0	*	512	+	2		remainder as binary: 000000010

Try divide at  1024
1386	=	1	*	1024	+	362		remainder as binary: 0101101010
1	=	0	*	1024	+	1		remainder as binary: 0000000001

Try divide at  2048
1386	=	0	*	2048	+	1386		remainder as binary: 10101101010

Try divide at  4096
1386	=	0	*	4096	+	1386		remainder as binary: 010101101010

    
                
λ
.NET NoSQL database for rapid development