Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <stdio.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));
    p = std::tgamma (x/d);
    
    total = j*k/n;
   
    cout <<total % 1000003 << endl;
  }
  
  
}

using namespace std;

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


Compiler output:
a.cc:33:5: error: redefinition of 'int main()'
   33 | int main() {
      |     ^~~~
a.cc:8:5: note: 'int main()' previously defined here
    8 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:46:21: error: no matching function for call to 'tgamma(int, int&)'
   46 |     k = std::tgamma (x/(d+n),a);
      |         ~~~~~~~~~~~~^~~~~~~~~~~
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:47:21: error: no matching function for call to 'tgamma(int, int&)'
   47 |     p = std::tgamma (x/d,b);
      |         ~~~~~~~~~~~~^~~~~~~
/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