@@ -0,0 +1,1917 @@
+/*%0A%0AFuel Injection Perfection%0A=========================%0A%0ACommander Lambda has asked for your help to refine the automatic quantum antimatter fuel injection system for her LAMBCHOP %0Adoomsday device. It's a great chance for you to get a closer look at the LAMBCHOP - and maybe sneak in a bit of sabotage %0Awhile you're at it - so you took the job gladly. %0A%0AQuantum antimatter fuel comes in small pellets, which is convenient since the many moving parts of the LAMBCHOP each need %0Ato be fed fuel one pellet at a time. However, minions dump pellets in bulk into the fuel intake. You need to figure out %0Athe most efficient way to sort and shift the pellets down to a single pellet at a time. %0A%0AThe fuel control mechanisms have three operations: %0A%0A1) Add one fuel pellet%0A2) Remove one fuel pellet%0A3) Divide the entire group of fuel pellets by 2 (due to the destructive energy released when a quantum antimatter pellet is %0Acut in half, the safety controls will only allow this to happen if there is an even number of pellets)%0A%0AWrite a function called answer(n) which takes a positive integer as a string and returns the minimum number of operations %0Aneeded to transform the number of pellets to 1. The fuel intake control panel can only display a number up to 309 digits %0Along, so there won't ever be more pellets than you can express in that many digits.%0A%0AFor example:%0Aanswer(4) returns 2: 4 -%3E 2 -%3E 1%0Aanswer(15) returns 5: 15 -%3E 16 -%3E 8 -%3E 4 -%3E 2 -%3E 1%0A%0A%0ALanguages%0A=========%0A%0ATo provide a Python solution, edit solution.py%0ATo provide a Java solution, edit solution.java%0A%0ATest cases%0A==========%0A%0AInputs:%0A    (string) n = %224%22%0AOutput:%0A    (int) 2%0A%0AInputs:%0A    (string) n = %2215%22%0AOutput:%0A    (int) 5%0A%0AUse verify %5Bfile%5D to test your solution and see how it does. When you are finished editing your code, use submit %5Bfile%5D to submit your answer. If your solution passes the test cases, it will be removed from your home folder.%0A%0A*/%0A

Create fuel_injection_perfection.java