14 solutions

  • 0
    @ 2023-11-19 20:35:47
    #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;
    }
    

    Information

    ID
    106
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    6
    Tags
    # Submissions
    513
    Accepted
    165
    Uploaded By