Problem gcd
User Dannyboy
Submission Time 2023-11-08 12:53:30
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gcd.cpp: In function ‘int main()’:
gcd.cpp:7:10: error: expected ‘)’ before ‘mod’
7 | __gcd(a mod b);
| ~ ^~~~
| )
gcd.cpp:7:16: error: no matching function for call to ‘__gcd(int&)’
7 | __gcd(a mod b);
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from gcd.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:1238:5: note: candidate: ‘template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)’
1238 | __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
| ^~~~~
/usr/include/c++/9/bits/stl_algo.h:1238:5: note: template argument deduction/substitution failed:
gcd.cpp:7:16: note: candidate expects 2 arguments, 1 provided
7 | __gcd(a mod b);
| ^
gcd.cpp:8:12: error: ‘c’