Problem | gcd |
---|---|
User | MagicHenry |
Submission Time | 2025-06-03 19:59:50 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
gcd.cpp:3:9: error: ‘a’ was not declared in this scope
3 | int gcd(a,b) {
| ^
gcd.cpp:3:11: error: ‘b’ was not declared in this scope
3 | int gcd(a,b) {
| ^
gcd.cpp:3:12: error: expression list treated as compound expression in initializer [-fpermissive]
3 | int gcd(a,b) {
| ^
gcd.cpp: In function ‘int main()’:
gcd.cpp:9:10: error: reference to ‘gcd’ is ambiguous
9 | cout << gcd(min(a,b),max(a,b));
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:84,
from gcd.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)’
132 | gcd(_Mn __m, _Nn __n) noexcept
| ^~~
gcd.cpp:3:5: note: ‘int gcd’
3 | int gcd(a,b) {
| ^~~