Problem lcm
User ATHY
Submission Time 2025-03-08 16:37:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lcm.cpp:4:24: error: ‘ll’ was not declared in this scope
4 | unsigned long long gcd(ll a, ll b) {
| ^~
lcm.cpp:4:30: error: ‘ll’ was not declared in this scope
4 | unsigned long long gcd(ll a, ll b) {
| ^~
lcm.cpp:4:34: error: expression list treated as compound expression in initializer [-fpermissive]
4 | unsigned long long gcd(ll a, ll b) {
| ^
lcm.cpp: In function ‘long long unsigned int lcm(long long unsigned int, long long unsigned int)’:
lcm.cpp:10:22: error: reference to ‘gcd’ is ambiguous
10 | return (a * b) / gcd(a, b);
| ^~~
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:132:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<_Mn, _Nn> std::gcd(_Mn, _Nn