我想大概是範圍太小吧
試試看
#include <stdio.h>
int main()
{
int time = 0, a,x;
long long int b, c;
while(scanf("%d", &time) != EOF)
{
for(x = 0 ; x < time ; x++)
{
scanf("%d %lld %lld", &a, &b, &c);
if(a == 1)
printf("%lld\n", b+c);
if(a == 2)
printf("%lld\n", b-c);
if(a == 3)
printf("%lld\n", b*c);
if(a == 4)
printf("%lld\n", b/c);
}
}
return 0;
}