Untitled
unknown
c_cpp
2 years ago
246 B
4
Indexable
#include <iostream>
using namespace std;
int main()
{
int N, b, c;
cin >> N;
if (N < 0 || N > 127)
{
cout << "NO";
return 0;
}
b = N % 2;
c = (N << 1) | b;
cout << c;
return 0;
}Editor is loading...
Leave a Comment