7 kyu
Hex Word Sum
304 of 937user3230350
Description:
Description
As hex values can include letters A
through to F
, certain English words can be spelled out, such as CAFE
, BEEF
, or FACADE
.
This vocabulary can be extended by using numbers to represent other letters, such as 5EAF00D
, or DEC0DE5
.
Given a string, your task is to return the decimal sum of all words in the string that can be interpreted as such hex values.
Example
Working with the string "BAG OF BEES"
:
"BAG" = 0, as it is not a valid hex value
"OF" = 0F = 15
"BEES" = BEE5 = 48869
So the result is the sum of these: 48884 (0 + 15 + 48869)
Notes
- Inputs are all uppercase and contain no punctuation
0
can be substituted forO
5
can be substituted forS
Fundamentals
Strings
Similar Kata:
Stats:
Created | Jan 22, 2019 |
Published | Jan 23, 2019 |
Warriors Trained | 2065 |
Total Skips | 32 |
Total Code Submissions | 3547 |
Total Times Completed | 937 |
Python Completions | 537 |
Ruby Completions | 81 |
JavaScript Completions | 304 |
TypeScript Completions | 62 |
Julia Completions | 18 |
Total Stars | 33 |
% of votes with a positive feedback rating | 92% of 251 |
Total "Very Satisfied" Votes | 217 |
Total "Somewhat Satisfied" Votes | 27 |
Total "Not Satisfied" Votes | 7 |
Total Rank Assessments | 10 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |