Submission
Status:
P-PPP-PPPP-PPPPP--P-
Subtask/Task Score:
70/100
Score: 70
User: wleo.lwo
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-13 20:25:13
#include <stdio.h>
#include <string.h>
int main(){
int arr[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int month,day;
scanf("%d",&month);
scanf("%d",&day);
int i=0,sum=0;
while (month-1+i<12){
sum+=arr[month-1+i];
i++;
}
printf("%d",(sum-2)%7+day);
return 0;
}