I was suprised to see a puzzle given to an elementry school kid. Let me put the puzzle to you and I was planning to solve it manually and was lazy to do the math. Then I got an Idea to solving through Java Program. My cup of Coffee :).
What is the mystery number?
- It is greater then 1 lakh but less then 10 lakhs
- It's an even number
- None of the digits is less then 3
- Sum of the digits in 1s, 10s and 100s place is 12
- Sum of the digits in 1s, 10s and 100s place is 12
I thought Java Streams would be my best bet to solve such riddles and here is the program.
Here is the answer
687354
687534
689354
689534
786354
786534
789354
789534
986354
986534
987354
987534