Submission

Status:

P-P----P------------

Subtask/Task Score:

15/100

Score: 15

User: Prap

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

Language: cpp

Time: 0.003 second

Submitted On: 2026-03-25 12:48:12

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
using namespace std;
int main() {
	int D,M;
	cin>>D>>M;
	int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
	int count = 0;
	for (int i = D-1; i<7; i++) {
		count = count + month[i];
	}
	count = count + 12;
	cout<<(count%7+2)%7;
}