Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;

int main() {
   int i;
  
  cin >> i;
  for(int s=0;s<i;s++){
    int x,d,n;
  int total;
    int j;
    double k,p;
   cin >> x >> d >> n;
    
    j = std::pow(d,n);
    k = std::tgamma (x/(d+n),0);
    p = std::tgamma (x/d,0);
    
    total = j*k/n;
   
    cout <<total % 1000003 << endl;
  }
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: no matching function for call to 'tgamma(int, int)'
   17 |     k = std::tgamma (x/(d+n),0);
      |         ~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
                 from a.cc:1:
/usr/include/c++/14/cmath:2753:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::tgamma(_Tp)'
 2753 |     tgamma(_Tp __x)
      |     ^~~~~~
/usr/include/c++/14/cmath:2753:5: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:271:1: note: candidate: 'double tgamma(double)'
  271 | __MATHCALL (tgamma,, (_Mdouble_));
      | ^~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:271:1: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/cmath:2741:3: note: candidate: 'constexpr float std::tgamma(float)'
 2741 |   tgamma(float __x)
      |   ^~~~~~
/usr/include/c++/14/cmath:2741:3: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/cmath:2745:3: note: candidate: 'constexpr long double std::tgamma(long double)'
 2745 |   tgamma(long double __x)
      |   ^~~~~~
/usr/include/c++/14/cmath:2745:3: note:   candidate expects 1 argument, 2 provided
a.cc:18:21: error: no matching function for call to 'tgamma(int, int)'
   18 |     p = std::tgamma (x/d,0);
      |         ~~~~~~~~~~~~^~~~~~~
/usr/include/c++/14/cmath:2753:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::tgamma(_Tp)'
 2753 |     tgamma(_Tp __x)
      |     ^~~~~~
/usr/include/c++/14/cmath:2753:5: note:   candidate expects 1 argument, 2 provided
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:271:1: note: candidate: 'double tgamma(double)'
  271 | __MATHCALL (tgamma,, (_Mdouble_));
      | ^~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:271:1: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/cmath:2741:3: note: candidate: 'constexpr float std::tgamma(float)'
 2741 |   tgamma(float __x)
      |   ^~~~~~
/usr/include/c++/14/cmath:2741:3: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/cmath:2745:3: note: candidate: 'constexpr long double std::tgamma(long double)'
 2745 |   tgamma(long double __x)
      |   ^~~~~~
/usr/include/c++/14/cmath:2745:3: note:   candidate expects 1 argument, 2 provided