Problem reverseandmin
User haroldpyh
Submission Time 2025-12-03 16:53:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

reverseandmin.cpp: In function ‘int f(long long int)’:
reverseandmin.cpp:13:24: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘long long int’ in assignment
13 | stringNum = to_string(num);
| ~~~~~~~~~^~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
reverseandmin.cpp:14:21: error: request for member ‘begin’ in ‘stringNum’, which is of non-class type ‘long long int’
14 | reverse(stringNum.begin(), string.end());
| ^~~~~
reverseandmin.cpp:14:36: error: expected primary-expression before ‘.’ token
14 | reverse(stringNum.begin(), string.end());
| ^
reverseandmin.cpp:15:23: error: no matching function for call to ‘stoi(long long int&)’
15 | num = stoi(stringNum);
| ^
In file included from /usr/inclu