5 kyu
Base64 Numeric Translator
110 of 1,220danielpclark
Description:
Our standard numbering system is base-10, that uses digits 0
through 9
. Binary is base-2, using only 1
s and 0
s. And hexadecimal is base-16, using digits 0
to 9
and A
to F
. A hexadecimal F
has a base-10 value of 15
.
Base-64 has 64 individual characters ("digits") which translate to the base-10 values of 0
to 63
. These are (in ascending order):
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
(so A
is equal to 0
and /
is equal to 63
)
Task
Complete the method that will take a base-64 number (as a string) and output its base-10 value as an integer.
Examples
"/" --> 63
"BA" --> 64
"BB" --> 65
"BC" --> 66
"WIN" --> 90637
Puzzles
Similar Kata:
Stats:
Created | Oct 30, 2015 |
Published | Oct 30, 2015 |
Warriors Trained | 2099 |
Total Skips | 225 |
Total Code Submissions | 3030 |
Total Times Completed | 1220 |
Ruby Completions | 110 |
Python Completions | 590 |
JavaScript Completions | 313 |
CoffeeScript Completions | 12 |
Haskell Completions | 109 |
C Completions | 162 |
Total Stars | 38 |
% of votes with a positive feedback rating | 90% of 202 |
Total "Very Satisfied" Votes | 167 |
Total "Somewhat Satisfied" Votes | 31 |
Total "Not Satisfied" Votes | 4 |