Hello and welcome to the challenge!
Write a code which receives a string with digits and counts all odd numbers included in its substrings.
Example
-
solve('3583') = 7
, because we have 7 odd substrings:3
,5
,3
,35
,83
,583
and3583
Input
- string consisting of digits
Output
- amount of odd substrings of the given string
Constraints
0 < length of the given string < 1000
You can solve this programming contest in Java, JavaScript, Python, C++ and many more languages. If you want, you can also take part in other Challenges. Below you can find some of them:
Did you like this challenge and would like to try your hand at some interesting big programming competitions? Check what’s all over the news in tech world in May 2019 in our article with upcoming IT Conferences, Hackathons and Online Challenges in May 2019.
Have fun and good luck! :)