Problem gcd
User ShaquilleOatmeal34
Submission Time 2025-02-19 16:34:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gcd.cpp: In function ‘long long int fun(long long int, long long int)’:
gcd.cpp:9:22: error: class template argument deduction failed:
9 | return function(b,a%b);}
| ^
gcd.cpp:9:22: error: no matching function for call to ‘function(long long int&, long long int)’
In file included from /usr/include/c++/9/functional:59,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from gcd.cpp:1:
/usr/include/c++/9/bits/std_function.h:644:5: note: candidate: ‘template<class _Res, class ... _ArgTypes> std::function(_Res (*)(_ArgTypes ...))-> std::function<_Res(_ArgTypes ...)>’
644 | function(_Res(*)(_ArgTypes...)) -> function<_Res(_ArgTypes...)>;
| ^~~~~~~~
/usr/include/c++/9/bits/std_function.h:644:5: note: template argume