DEMO04
minutes = int(input("Enter the number of minutes: "))
years = minutes // 525600
days = (minutes % 525600) // 1440
print(f"{minutes} minutes is approximately {years} years and {days} days")
验证
Enter the amount of water in kilograms: 1000
Enter the initial temperature: 3.5
Enter the final temperature: 10.5
The energy needed is 1625484000.0
DEMO05
minutes = int(input("Enter the number of minutes: "))
years = minutes // 525600
days = (minutes % 525600) // 1440
print(f"{minutes} minutes is approximately {years} years and {days} days")
验证
Enter the number of minutes: 52000
52000 minutes is approximately 0 years and 6 days