#include<bits/stdc++.h> using namespace std; int D,M; int y,m,d; int main(){ cin>>M>>D; cin>>y>>m>>d; if(d+1>D){ m++; d=1; }else{ d++; } if(m>M){ y++; m=m-M; } cout<<y<<" "<<m<<" "<<d; }

0 comments

No comments so far...