#include <iostream>
using namespace std;
int main(){
int n,a,b,c;
cin>>n;
for(int x=0;x<n;x++){
while(cin>>a>>b>>c){
switch(a){
case 1:
cout<<b+c<<endl;
break;
case 2:
cout<<b-c<<endl;
break;
case 3:
cout<<b*c<<endl;
break;
case 4:
cout<<b/c<<endl;
break;}
}}
return 0;
}
a, b, c 要long long
a, b, c 要long long
ㄍ感謝學長,不吝嗇幫我解惑,我下次會注意這些細節的!