a036.
我也愛偶數
--
板橋高中教學題
| From: [192.168.70.82] |
發表日期
:
2023-08-22 12:49
#include<iostream>
using namespace std;
int main(){
int Num1,Num2,TotalNum=0,Total=0;
while(cin>>Num1>>Num2)
{
TotalNum=((Num2-(Num2%2))-(Num1+(Num1%2)))/2+1;
}
Total=((Num2-(Num2%2))+(Num1+(Num1%2)))*TotalNum/2;
cout<<Total;
}