C++ 代码
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int n,y,m,d;
scanf("%d",&n);
y=n/365;
m=n%365/30;
d=n%365%30;
printf("%d ano(s)\n",y);
printf("%d mes(es)\n",m);
printf("%d dia(s)\n",d);
return 0;
}