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 for O
  • 5 can be substituted for S
Fundamentals
Strings

Stats:

CreatedJan 22, 2019
PublishedJan 23, 2019
Warriors Trained2065
Total Skips32
Total Code Submissions3547
Total Times Completed937
Python Completions537
Ruby Completions81
JavaScript Completions304
TypeScript Completions62
Julia Completions18
Total Stars33
% of votes with a positive feedback rating92% of 251
Total "Very Satisfied" Votes217
Total "Somewhat Satisfied" Votes27
Total "Not Satisfied" Votes7
Total Rank Assessments10
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • user3230350 Avatar
  • ZozoFouchtra Avatar
  • suic Avatar
  • anter69 Avatar
  • stellartux Avatar
  • ejini战神 Avatar
Ad