#S0009. 日历提醒
日历提醒
1. Description
Create a calendar event reminder. Input current date (YYYY-MM-DD) and multiple events (name+date), output events occurring within the next 7 days (inclusive), sorted chronologically. Output "No events" if none.
2. Input & Output
Input:
- Space-separated values (first is current date, followed by alternating event names and dates)
data = input().split()
current_date = data[0]
events = [(data[i], data[i+1]) for i in range(1, len(data)-1, 2)]
Output:
- Lines formatted as "Event (X days left)" sorted by date
Example
# Input:
2023-12-24 Meeting 2023-12-25 Party 2023-12-31
# Output:
Meeting (1 days left)
Party (7 days left)
# Input:
2023-12-31 Countdown 2023-12-31
# Output:
Countdown (0 days left)