Start: Jun, 27, 2019 08:30:00
2019年度暑期短学期第二天
End: Jun, 27, 2019 11:30:00
Time elapsed:
Time remaining:

Problem_ID: I
Result: Accepted
Time: 6ms
Memory: 1288kB
Author: 2018212212128
In contest: 1275

#include<stdio.h>
#include<math.h>
int main()
{
	int T;
	long long x,y,z,m,sum;
	scanf("%d",&T);
	while(T--)
	{
		scanf("%llx",&x);
		scanf("%lld %lld",&y,&z);
		m=x%(int)pow(2,32-y);
		sum=m+z*(int)pow(2,32-y);
		printf("%08x\n",sum);
	}
	return 0;
}