7 kyu

Hex Word Sum

543 of 946user3230350

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 Trained2073
Total Skips32
Total Code Submissions3582
Total Times Completed946
Python Completions543
Ruby Completions81
JavaScript Completions306
TypeScript Completions63
Julia Completions18
Total Stars33
% of votes with a positive feedback rating92% of 253
Total "Very Satisfied" Votes219
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