A base N number system has N digits. The process of conversion of N based number to decimal and vice versa is very similar to the binary number system process we just saw.
The only thing that changes is that 2 is replaced by N.
So, if the N based number system representation is An An-1 ... A2 A1 A0
, then the corresponding decimal value is
A0 * N^0 + A1 * N^1 + A2 * N^2 + ...
The reverse process is also exactly similar. We keep dividing by N, keeping track of the remainders as we go.
Let us say our number is 357
, and N = 7
.
1 R0
---------
7 | 7 R2
---------
7 | 51 R0
---------
7 | 357
Thus the number converts to 1020
in base 7.
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
Total Moves For Bishop! | 75 |
|
31:10 | |
Distribute in Circle! | 100 |
|
22:06 | |
Prime Sum | 150 |
|
43:15 | |
Sum of pairwise Hamming Distance | 200 |
|
66:52 | |
FizzBuzz | 200 |
|
12:34 | |
Is Rectangle? | 200 |
|
11:31 | |
Step by Step | 200 |
|
52:49 | |
Power Of Two Integers | 250 |
|
39:36 |
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
Excel Column Number | 175 |
|
23:19 | |
Excel Column Title | 175 |
|
41:11 |
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
Palindrome Integer | 200 |
|
17:28 | |
Reverse integer | 200 |
|
28:36 | |
Next Smallest Palindrome! | 400 |
|
63:41 |
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
Greatest Common Divisor | 200 |
|
10:57 | |
Find Nth Fibonacci | 200 |
|
54:44 | |
Divisible by 60 | 200 |
|
28:05 | |
Powerful Divisors | 200 |
|
44:08 | |
Trailing Zeros in Factorial | 250 |
|
18:58 | |
Sorted Permutation Rank | 250 |
|
78:34 | |
Largest Coprime Divisor | 250 |
|
49:35 | |
Sorted Permutation Rank with Repeats | 500 |
|
68:43 |
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
K-th Permutation | 200 |
|
51:38 | |
City Tour | 300 |
|
62:42 | |
Grid Unique Paths | 375 |
|
32:35 |
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
Highest Score | 200 |
|
34:50 |
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
Addition without Summation | 200 |
|
26:07 |
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
Next Similar Number | 200 |
|
55:47 | |
Rearrange Array | 250 |
|
49:03 |
Problem | Score | Companies | Time | Status |
---|---|---|---|---|
Numbers of length N and value less than K | 200 |
|
90:00 |