标签:
#include<stdio.h> #include<math.h> int main() { int day_Month[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int day_Start, month_Start; int day_End, month_End; int num, n; scanf("%d", &n); for(int i = 0; i < n; i++) { int days = 0; scanf("%d%d%d%d%d", &month_Start, &day_Start, &num, &month_End, &day_End); for(int j = month_Start; j < month_End; j++) { days += day_Month[month_Start - 1]; } days -= day_Start; days += day_End; printf("%d\n", num*(int)pow(2.0, days)); } return 0; }
标签:
原文地址:http://www.cnblogs.com/superkrissV/p/4471080.html