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: 6ms
Memory: 1288kB
In contest: 1139

#include<stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
int main(){
	int T,m,k,n,b,c;
	unsigned int a;
	char str1[100],str2[100];
	scanf("%d",&T);
	while (T--)
	{
		scanf("%x",&a);
		scanf("%d",&m);
		scanf("%d",&k);
		m=32-m;
		n=pow(2.0,m)-1;
		a=a<<(32-m);
		a=a>>(32-m);
		b=k<<m;
		a=a+b;
		printf("%08x\n",a);
	}
	return 0;
}