#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N=1e5+1e4;
ll n;
ll s[N];
signed main()
{
cin>>n;
for(ll i=1;i<=n;i++)
{
ll ans;
cin>>s[1]>>s[2]>>s[3];
sort(s+1,s+4);//虽然只有三个数,没必要sort
ll a=s[1],b=s[2],c=s[3];//很稚嫩,但直观
if(a==0&&b==0)ans=0;//情况1
else if(a==0&&b==c)ans=1;//情况2
else if(a==0&&b!=c)ans=2;//情况3
else if(a+b==c)ans=2;//情况4
else if(a==b||b==c)ans=2;//情况5
else ans=3;//剩余情况
//枚举所有情况
cout<<ans<<"\n";
}
return 0;
}
ppnb
666
666