Submission

Status:

PPPPPPPPP----PP-PPPP

Subtask/Task Score:

75/100

Score: 75

User: mameeewin

Problemset: ปฏิทินวันแม่

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-09 18:48:46

#include <iostream>
#include <vector>
using namespace std;

int main(){
  vector<int> months={31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int m, d, x=0; cin >> m >> d;
  for (int i=0; i<m-1; i++) x+=months[i];
  x+=1;
  cout << (d-1+(224-x))%7+1;
}