7 kyu
Find the Middle of the Product
560 of 1,052dsasser
Description:
Given a string of characters, create a function returning the middle number in the product of each digit in the string.
Example: 's7d8jd9' -> 7, 8, 9 -> 7*8*9=504, thus 0 should be returned as an integer.
Not all strings will contain digits and not all inputs will be string. In those cases, return -1.
If the product has an even number of digits, return the middle two digits
Example: 1563 -> 56
NOTE: Remove leading zeros if product is even and the first digit of the two is a zero. Example 2016 -> 1
Fundamentals
Strings
Similar Kata:
Stats:
Created | Apr 4, 2018 |
Published | Apr 5, 2018 |
Warriors Trained | 2394 |
Total Skips | 72 |
Total Code Submissions | 16025 |
Total Times Completed | 1052 |
JavaScript Completions | 437 |
PHP Completions | 88 |
Python Completions | 560 |
Total Stars | 40 |
% of votes with a positive feedback rating | 81% of 282 |
Total "Very Satisfied" Votes | 204 |
Total "Somewhat Satisfied" Votes | 48 |
Total "Not Satisfied" Votes | 30 |
Total Rank Assessments | 53 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 1 kyu |
Lowest Assessed Rank | 8 kyu |