Submission
Status:
PPPPPPPPPPPPPPPPP-P-
Subtask/Task Score:
90/100
Score: 90
User: wleo.lwo
Problemset: ปฏิทินวันแม่
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-13 20:22:42
#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)%7+day-2);
return 0;
}