···
include<iostream>
using namespace std;
int main()
{
int days[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
int month_1, day_1, month_2, day_2, num;//定义起始结束时间
cin >> month_1 >> day_1 >> num >> month_2 >> day_2;//输入时间
int sum = 0;//计数
for (int k = month_1; k < month_2; k++)
{
sum += days[k - 1];
}
sum -= day_1;
sum += day_2;
long nNum = num;
for (int k = 0; k < sum; k++)
{
nNum *= 2;
}
cout << nNum << endl;
}
}
···
一次过