Untitled

Anonymous
c_cpp
11/04/2023 5:25 PM
248 B
20
Indexable
#include <iostream>
int main() {
	long long a, b;
	std::cin >> a >> b;
	if (b > (a + a % 2) / 2) {
		std::cout << (b - ((a + a % 2)/ 2)) * 2;
	}else std::cout << b  * 2  - 1;
}	
Editor is loading...