Problem lcm
User Shreyas123456789
Submission Time 2026-04-29 16:24:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lcm.cpp: In function ‘int main()’:
lcm.cpp:6:20: error: no matching function for call to ‘lcm(int&, int&, int&)’
6 | cout<<lcm(a,b,c);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:84,
from lcm.cpp:1:
/usr/include/c++/9/numeric:146:5: note: candidate: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::lcm(_Mn, _Nn)’
146 | lcm(_Mn __m, _Nn __n) noexcept
| ^~~
/usr/include/c++/9/numeric:146:5: note: template argument deduction/substitution failed:
lcm.cpp:6:20: note: candidate expects 2 arguments, 3 provided
6 | cout<<lcm(a,b,c);
| ^