Problem gcd
User elegantarmour
Submission Time 2024-12-04 14:43:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gcd.cpp:2:7: error: expected nested-name-specifier before ‘namesapce’
2 | using namesapce std;
| ^~~~~~~~~
gcd.cpp: In function ‘long long int gcd(long long int, long long int)’:
gcd.cpp:24:3: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
24 | max = a;
| ^~~
| std::max
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:3468:5: note: ‘std::max’ declared here
3468 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
gcd.cpp:26:9: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
26 | return max;
| ^~~
| std::max
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,