Mathematics, 24.11.2021 04:10 yasarhan2
Babylonians use regular numbers to keep time. A regular number in math is defined to be a number that is a factor of some power of 60 (60, 3600, etc). Equivalently we can say that a regular number is one whose ONLY prime divisors are 2, 3 and 5. The first 10 regular numbers are: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12. Your task is to compute the n-th regular number. Hint as a possible algorithm:
1. Use a priority queue.
2. The regular numbers are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, ...
Note that other than 1, each number in the sequence can be generated by some previous number in the sequence by multiplying that previous number by a 2, 3, or 5. So you start with offering a 1 to the priority queue, then you poll the priority queue. Now with this 1 retrieved (which is the 1st regular number), you generate a few regular numbers and offer them back to the priority queue. Repeat the process and retrieve the numbers. The n-th number retrieved is the answer. Grading metric: some effort 2 points significant effort 5 points Each solved case is additional 1 point (there are 5 test cases). Write to the console the answer of these 5 test cases 1. the 10th regular number 2. the 50th regular number 3. the 100th regular number 4. the 200th regular number 5. the 300th regular number.
Answers: 3
Mathematics, 21.06.2019 14:50
If g(x) = x+1/ x-2 and h (x) =4 - x , what is the value of ( g*h) (-3)?
Answers: 1
Mathematics, 21.06.2019 18:00
Ageologist had two rocks on a scale that weighed 4.6 kilograms together.rock a was 0.5 of the total weight.how much did rock a weigh?
Answers: 1
Mathematics, 21.06.2019 19:00
What are the solutions of the equation? 6x^2 + 11x + 4 = 0 a. 4/3, 1/2 b. -4/3, -1/2 c. 4/3, -1/2 d. -4/3, 1/2
Answers: 2
Mathematics, 21.06.2019 22:30
The median for the given set of six ordered data values is 29.5 9 12 25 __ 41 48 what is the missing value?
Answers: 1
Babylonians use regular numbers to keep time. A regular number in math is defined to be a number tha...
Mathematics, 21.08.2019 14:30
Social Studies, 21.08.2019 14:30
English, 21.08.2019 14:30
Mathematics, 21.08.2019 14:30
History, 21.08.2019 14:30
English, 21.08.2019 14:30
Mathematics, 21.08.2019 14:30
Physics, 21.08.2019 14:30
Mathematics, 21.08.2019 14:30