Submission
Status:
PPPPPPPPP----PP-PPPP
Subtask/Task Score:
75/100
Score: 75
User: YourLocalZ
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-13 11:58:37
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> month = {31,28,31,30,31,30,31,31,30,31,30,31};
vector<int> day = {1,2,3,4,5,6,7};
int x,y,s=0;
cin >> x >> y;
if(x<8)
{
for(auto it=month.begin()+x-1;it!=month.begin()+7;it++) s+=*it;
}
else
{
for(auto it=month.begin()+x-1;it!=month.begin()+7;it--) s+=*it;
}
if((s+11+y)%7==0) cout << 7;
else cout << (s+11+y)%7;
}