This problem was used in the following GFU competitions:
GFU 2024 D3 Q10
You have found a few secret recipes that you want to use but Mr. Gordon has very specific requirements for any recipes coming into the kitchen. There can be no shenanigans. The recipes you found are written backwards. You decide to write a program to straighten everything out so Mr. Gordon will allow the recipes into the kitchen.
The first input will be a single integer n that indicates the number of data sets that follow. Each data set is a single ingredient for the recipe. The ingredient will start with a floating-point number, representing a qty, followed by a unit of measure and ingredient name.
For each ingredient, output a line that shows the quantity, unit of measure, and ingredient name reversed so that it is readable and is in all lower case.
Example Input:
3
1.0 puc Klim
2.5 pst Yesreh Etalocohc
12.0 seceip Inim Swollamhsram
Example Output:
1.0 cup milk
2.5 tsp hersey chocolate
12.0 pieces mini marshmallows
This is a pretty simple program... no real tips/tricks.Â
If you want to be fancy in python use slices