#include <iostream> using namespace std; int main() { int year,num; int months[]={0,31,28,31,30,31,30,31,31,30,31,30,31}; while(cin>>year>>num){ months[2]=28; if((year%400==0)||(year%4==0&&year%100!=0)) months[2]=29; for(int i =1;i<=12;i++){ if(months[i]>=num){ cout<<year<<"-"<<(i<=9?"0"+to_string(i):to_string(i))<<"-"<<(num<=9?"0"+to_string(num):to_string(num))<<endl; break; }else{ num-=months[i]; } } } } // 64 位输出请用 printf("%lld")
qd