1 import java.util.Scanner; 2 3 public class Solution 4 { 5 public static void main(String[] args) 6 { 7 Scanner input = new Scanner(System.in); 8 9 System.out.print("Enter the number of minutes: "); 10 long minutes = input.nextLong(); 11 12 input.close(); 13 14 long hours = minutes / 60; 15 long days = hours / 24; 16 long years = days / 365; 17 long day = days % 365; 18 19 System.out.println(minutes + " minutes is apporximately " + years + " years and " + day + " days"); 20 } 21 }
时间: 2024-10-06 10:36:29