提交时间:2023-10-04 11:13:28
运行 ID: 104934
#include <iostream> using namespace std; int main (){ int a[501]; a[0]=1; int n,p; cin>>n>>p; for(int i=1;i<=n;i++) a[i]=a[i-1]+i; cout<<a[n]-p+2; }