Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
722 B
2
Indexable
Never
#include <iostream>
#include <SFML/Graphics.hpp>
using namespace std;
using namespace sf;
int main() {
	/*
	int a;
	cin >> a;
	int i = 0;
	int s = 2;
	while (s <= a){
		if (s == a){
			cout << 0;
			return 0;
		}
		s *= 2;
	}
	while (1){
		if ((a & 1) == 1){
			a -= 1;
			while (i > 0){
				a = a << 1;
				i--;
			}
			cout << a;
			return 0;
		}
		a = a >> 1;
		i++;
	}
	*/
	/*
	int a;
	cin >> a;
	a = a | 128;
	cout << a;
	return 0;
	*/
	/*
	int a;
	cin >> a;
	a = a xor 128;
	cout << a;
	return 0;
	*/
	uint8_t a, k, i;
	cin >> a >> k;
	i = k;
	while (k > 0)
	{
		a = a << 1;
		k--;
	}
	while (i > 0)
	{
		a = a >> 1;
		i--;
	}
	cout << int(a);
	return 0;
}
Leave a Comment