Submission
Status:
[P-SS][PPPPPPPPPPP]
Score: 70
User: Nathlol2
Problemset: ดูวีทูปเบอร์
Language: c
Time: 0.001 second
Submitted On: 2024-09-25 13:07:41
#include <stdio.h>
int main(){
int x, y;
int a, b;
scanf("%d %d %d %d", &x, &y, &a, &b);
int cnt = 0;
int day[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
for(int i = x;i<day[y - 1];i++){
cnt = cnt + 3;
}
for(int i = y + 1;i<=b - 1;i++){
if(day[i - 1] == 31){
cnt = cnt + 93;
}else if(day[i - 1] == 30){
cnt = cnt + 90;
}else {
cnt = cnt + 84;
}
}
for(int i = 1;i<=a;i++){
cnt = cnt + 3;
}
cnt = cnt + 3;
printf("%d", cnt);
}