NEED JAVA CODE FOR THIS PUZZLE
Judgement Day
Skynet has figured out a way to take over the world. It will keep producing robots and molecular assemblers until it has converted all matter for its own purpose. Robots work to produce more robots and molecular assemblers. Molecular assemblers convert matter into programmable matter to be used to produce more robots and molecular assemblers.
Initial Info On day 0, Skynet started with 3 robots, 1 molecular assembler and 0 units of programmable matter.
On day i (i>0), robots produced can be calculated as the sum of the robots produced on the previous day and thrice the units of programmable matter produced on the previous day.
On day i, number of molecular assemblers produced can be calculated as the sum of robots produced on the previous day and twice the units of programmable matter produced on the previous day.
On day i, the units of programmable matter produced can be calculated as five times the number of molecular assemblers produced on the previous day.
How many robots, molecular assemblers and units of programmable matter will be produced on the Judgement Day (day n)?
Input/Output Specifications
Input format: Two integers x and y (1<=x,y<=10^6) such that the judgement day falls on day n = x*y.
Output format: Since the number of robots, molecular assemblers and units of programmable matter grows very rapidly, we want you to output them modulo 1000000007.
The output should be a string having the following format: R#M#P, where - R is the number of robots produced on judgement day modulo 1000000007 - M is the number of molecular assemblers produced on judgement day modulo 1000000007 - P is the number of units of programmable matter produced on judgement day modulo 1000000007
Need Java Code For above Problem