Java 代码
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int days = cin.nextInt();
System.out.println( days / 365 + " ano(s)");
System.out.println(days % 365 / 30 + " mes(es)");
System.out.println(days % 365 % 30 + " dia(s)");
}
}