Problem 44678. Calculate time taken by light to reach earth surface
Hello, Durga Sadasivuni. Please explain clearly in the Problem Statement what the input (x) represents, and what the output (y) represents. For extra assistance in understanding the problem, you can also provide an example in the Problem Statement. —DIV
Two more issues: (1) You need to decide what value you would like people to use for the speed of light. Depending on the value, you may get non-integer results in the correct output, as per Solution 1559564. If you don't want people to use the exact value, then you must say so [if there is no instruction about the value, then use of the exact value would be implied]. (2) You need to decide what precision you would like the output to be provided in; currently there seem to be rounding errors in your last two test cases [if I understand the problem & your assumptions correctly], as per Solution 1559559. —DIV
Problem Recent Solvers40
Given an unsigned integer x, find the largest y by rearranging the bits in x
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!