Walmart Coding Question – Solved

8 Live
Ruest for Mystic Numbers Problem Statement the land of Numeria, the ancient sages have discovered a magical property in me numbers that they call "Mystic Numbers". These numbers hold special wers that can influence the harmony of the universe. You, as an apprentice to e sages, have been tasked with identifying these MysticNumbers. The sages define a Mystic Number as follows: 1. It must be an even number. 2. When the digits of the number are repeatedly summed until a single- digit number is obtained, this single-digit result must be even. You are given two boundaries, N1 and N2, which represent a range of numbers. your quest is to find all the Mystic Numbers within this range and report them back to the sages. Input Format The input contains two space-separated integers N1 and N2 denoting the two poundaries range of numbers. Output Format Print a list of all Mystic Numbers between N1 and N2. Constraints 1<= N1, N2 ≀ 10^9

Asked in: Walmart

Image of the Question

Question Image

All Testcases Passed βœ”



Passcode Image

Solution


Please login to view the solution


Related Questions

| You are given a board of size M Γ— N where each cell can be either empty ('O') o… |
| Undirected Coloured Graph Shortest Path You are given an undirected weight… |
| Village Voyage A computer game "Village Voyage" has N villages (labeled 1 to… |
| Academic Decathlon Students are being selected for an academic decathlon tea… |
| Sum of Arrays Given two arrays each of length n, arr1 and arr2, in one opera… |
| Count Swaps During Custom Sorting Analyze the efficiency of the following so… |