Start: Jan, 08, 2018 19:10:00
2017年秋季学期程序设计基础(C语言)期末考试
End: Jan, 08, 2018 21:40:00
Time elapsed:
Time remaining:

Problem_ID: H
Result: Accepted
Time: 7ms
Memory: 1092kB
In contest: 1139

#include<stdio.h>
int main()
{
	int t,n;
	int a,m,k,g,f;
	scanf("%d",&t);
	while(t--)
	{
		scanf("%x%d%d",&a,&m,&k);
		k<<=(32-m);
		g=4294967295>>m;
		a&=g;
		f=a+k;
		printf("%.8x\n",f);
	}
}