C++代码
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
int ano=n/365;
int mes=n%365/30;
int dia=n%365%30;
cout<<ano<<" "<<"ano(s)"<<endl;
cout<<mes<<" "<<"mes(es)"<<endl;
cout<<dia<<" "<<"dia(s)"<<endl;
return 0;
}
/*
in:
400
out:
1 ano(s)
1 mes(es)
5 dia(s)
*/