提交时间:2023-10-07 13:44:59

运行 ID: 105632

#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; }