#include<stdio.h>
int main () {
long int n,a,b,c;
scanf("%d",&n);
for(int i = 0; i < n; i++) {
scanf("%ld %ld %ld",&a,&b,&c);
switch(a) {
case 1:
printf("%ld\n",b + c);
break;
case 2:
printf("%ld\n",b - c);
break;
case 3:
printf("%ld\n",b * c);
break;
case 4:
printf("%ld\n",b / c);
break;
}
}
return 0;
}
使用long int 記得是%ld