Problem lonelybeavers
User shawn
Submission Time 2024-11-27 15:50:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lonelybeavers.cpp: In function ‘int32_t main()’:
lonelybeavers.cpp:13:17: error: no match for ‘operator==’ (operand types are ‘std::basic_ostream<char>::__ostream_type’ {aka ‘std::basic_ostream<char>’} and ‘int’)
13 | cout << n % 2 == 0 ? n/2 : n/2 + 1;
| ~~~~~~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
lonelybeavers.cpp:13:17: note: candidate: ‘operator==(int, int)’ <built-in>
13 | cout << n % 2 == 0 ? n/2 : n/2 + 1;
| ~~~~~~~~~~~~~~^~~~
lonelybeavers.cpp:13:17: note: no known conversion for argument 1 from ‘std::basic_ostream<char>::__ostream_type’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from lonelybeavers