#include<iostream>
using namespace std;
int main(){
int month[]={31,28,31,30,31,30,31,31,30,31,30,31};
int y,d;
cin>>y>>d;
if(y%400==0||(y%4==0&&y%100!=0))
month[1]=29;
int count=1;
for(int i=0;d-month[i]>0;i++){
d=d-month[i];
count++;
}
cout<<count<<endl<<d<<endl;
}
CCF201509-02
最新推荐文章于 2020-04-26 15:43:00 发布