tle in spoj right shift

http://www.spoj.com/problems/RSHIFT/

#include <iostream>
#include <cstdio>
#define fastio {ios_base::sync_with_stdio(NULL); cin.tie(NULL);}
#define slong signed long long
#define ulong unsigned long long
#define lastElim 0x7FFFFFFFFFFFFFFF
using namespace std;
int main(){
    	int t;
        scanf("%d", &t);
    	while(t--){
        	slong value;
	ulong res;
	scanf("%lld", &value);
	value >>= 1;
	res = (value & lastElim);
	printf("%llu\n",res);
}
return 0;
 }

Your logic is correct, it’s just that the time limit is very strict. Using input via getchar_unlocked() will get you AC. Here is your modified code: link.

Reading as unsigned 64bit int and right shift by 1 bit, gets TLE with fast IO. Is there any workaround to not shift? I suppose it will get AC.

Thanks!
got AC, :slight_smile: