Company: intuit_24oct
Difficulty: medium
Lactation Periods Problem Description We have a set of dates of lactation for a group of animals and need to find the average lactation period (i.e., the period between two lactations) as described below: Input: The first line of input contains an integer representing the number of Animal_IDs. The second line of input contains numerical strings, representing the Animal_IDs. The third line of input contains the number of lactation dates. The fourth line of input contains the lactation dates. The date is in the format YYYY-MM-DD. One date corresponds to an animal's lactation. Output: A table showing the Animal_ID and its average lactation period, formatted as Animal_ID Average_Lactation_Period . Examples Example 1: Input: 7 218873439 218873439 218873439 218873439 218783439 218783439 218783439 7 2013-10-25 2013-11-17 2013-12-27 2014-01-20 2014-01-19 2014-02-28 2014-04-10 Output: 218783439 40.5 218873439 29.0 Constraints Dates are in YYYY-MM-DD format. For a single Animal_ID, at least two