作业介绍
日期:
#include<iostream>
using namespace std;
int main()
{
int year, day, sum=0;
int arr[13] = {0,31,0,31,30,31,30,31,31,30,31,30,31};
cin >> year >> day;
if(year%4==0&&year%100!=0 || year%400==0&&year%3200!=0){
arr[2] = 29;
}
else{
arr[2] = 28;
}
for(int i=1; i<=12; i++){
sum += arr[i];
if(sum >= day){
cout << i << " " << arr[i]-(sum-day);
break;
}
}
return 0;
}
- 状态
- 已结束
- 题目
- 5
- 开始时间
- 2023-11-25 0:00
- 截止时间
- 2023-12-3 23:59
- 可延期
- 24 小时