#include<iostream> using namespace std; #define n 2021 #define c n-a-b int main(){ long long ans=0; for(int a=1;a<=n-4;a++){ for(int b=1;b<=n-a-3;b++){ ans+=(c-1)*(c-2)/2; } } cout<<ans; return 0; }
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 追梦算法网 universal account