eolymp
bolt
Try our new interface for solving problems
Problems

The game of "Date"

published at 3/2/24, 11:33:37 am

include <bits/stdc++.h>

using namespace std; int main(){ int n,k; cin>>n>>k; int cem=n;

if(k>1){ cem=cem+31;

}

if(k>2){ cem=cem+29;

} if(k>3){ cem=cem+31;

} if(k>4){ cem=cem+30;

}

if(k>5){ cem=cem+31;

} if(k>6){ cem=cem+30;

} if(k>7){ cem=cem+31;

}

if(k>8){ cem=cem+31;

} if(k>9){ cem=cem+30;

} if(k>10){ cem=cem+31;

}

if(k>11){ cem=cem+30;

}

if((366-cem)%2==0){ cout<<1; } else{ cout<<2; }

}

published at 3/2/24, 11:43:41 am

That isn't correct bro.