#include <iostream>
using namespace std;
int main(int argc, char** argv) {
int n;
long long int a,b,c,s;
cin>>n;
if(( c <= 2147483647 )&& ( 1 <= a <= 4 ) ){
for(s=0; s<n; s=s+1){
cin>>a>>b>>c;
if(a==1)
cout<<b+c;
else if(a==2)
cout<<b-c;
else if(a==3)
cout<<b*c;
else if(a==4)
cout<<b/c;
}
}
return 0;
}
int main(int argc, char** argv) {
long long int a,b,c,s;
if(( c <= 2147483647 )&& ( 1 <= a <= 4 ) ){
for(s=0; s<n; s=s+1){
cin>>a>>b>>c;
}
return 0;
}
變數初始化的位置不對,幫你留了較關鍵的程式碼讓你方便找錯