Submission

Status:

PPPPPPPPP----PP-PPPP

Subtask/Task Score:

75/100

Score: 75

User: msurirak

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

Language: cpp

Time: 0.005 second

Submitted On: 2026-10-07 12:32:00

#include <iostream>
using namespace std;

int main() {
	int month[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int sum=0,day,k;
	cin>>k>>day;
	for(int i = k;i<8;i++){
		sum+=month[i-1];
		if(i==12){
			i=1;
		}
	}
	sum=(sum+day+11)%7;
	if(sum==0){
		sum=7;
	}
	cout<<sum;
}