liguoguo 2024-01-23 10:26:07 2024-01-23 10:59:40
#include<bits/stdc++.h> using namespace std; int main(){ int s,k,cnt=0; cin>>k>>s; for(int i=0;i<=k;i++){ for(int j=0;j<=k;j++){ for(int l=0;l<=k;l++){ if(i+j+l==s)cnt++; } } } cout<<cnt; }