#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main() {
int year, month, day, sum = 0;
int a[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
printf("请输入年、月、日,格式为:年,月,日\n");
scanf("%d,%d,%d", &year, &month, &day);
if ((year % 4 == 0) || (year % 400 == 0) && (year % 100 != 0)) {
a[1] = 29;
}
for (int i = 0; i < month - 1; i++) {
sum = sum + a[i];
}
sum = sum + day;
printf("%d\n", sum);
return 0;
}