比赛 2026郑轻校赛 评测结果 AAAAAAAAAAAAAAAAAAAA
题目名称 巴啦啦能量 最终得分 100
用户昵称 dream 运行时间 0.050 s
代码语言 C++ 内存使用 3.68 MiB
提交时间 2026-04-07 18:25:27
显示代码纯文本
#include<bits/stdc++.h>
using namespace std;
long long a,b;
int main(){
	freopen("energy.in","r",stdin);
	freopen("energy.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin>>a>>b;
	if(a&1) a++;
	if(b&1) b--;
	cout<<(a+b)*((b+1)-a+1)/2/2;
	return 0;
}