1 solutions

  • 0
    @ 2025-11-5 15:02:04

    C++ :

    #include<iostream>
    using namespace std;
    int main()
    {
      int a,b,c,d,e=0;
      for (a=1;a<=9;++a)
      for (b=1;b<=20;++b)
      for (c=1;c<=42;++c)
      for (d=1;d<=83;++d)
      if ((10*a+5*b+2*c+d==100)&&(a+b+c+d==40))
      e++;
      cout<<e<<endl;
      return 0;
    }
    
    • 1

    Information

    ID
    16349
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By