#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int a, b, c;
while(cin >> a >> b >> c){
if(a == 1){
cout << b + c << endl;
}else if(a == 2){
cout << b - c << endl;
}else if(a == 3){
cout << b * c << endl;
}else{
if(b < c){
cout << 0 << endl;
}else{
cout << b/c << endl;
}
}
}
}
請注意題目範圍
1 <= b , c <= 2147483647
翻譯一下就是 b*c
會超過 int 的範圍,請換成 long
或 long long