提交时间:2023-10-05 09:13:29

运行 ID: 105051

#include<bits/stdc++.h> using namespace std; int main(){ int n,m; scanf("%d %d",&n,&m); int sum =0; sum += m*2; for(int i = m+1;i <= n;i++){ sum+=i; } printf("%d",sum); return 0; }