Problems with solving tasks (please help)
Hello, I can't solve two problems. Can somebody help me? Here is what the first one looks like: Peter loves muffins. He decides to buy some for himself and decides to choose from three different muffins. Help Peter buy as much muffins as he can with the money he's got. Input: on the first line are the prices of the three muffins. On the second line is the number of muffins of each type. On the third line is the money Peter has. ex. Input: 5 3 8 2 6 4 23 Output: 7 The second one looks like this: Three cars ride on the same road and cover the same distance. They start and finish at different times. Find the shortest and the longest time to cover the distance. Input: on the first line is the starting time and the arrival time of the first car. On the second line is the starting time and the arrival time of the second car. On the third line is the starting time of the third car (in hour and minutes). Output: On the first line is the shortest time in hours and minutest. On the second line is the longest time which took to cover the distance (the time format should be hh : mm). ex. Input: 23 30 1 30 2 5 5 15 15 5 20 53 Output: 2:00 5:48