1463A Dungeon solution in cpp
by ujjal roy
#include<bits/stdc++.h>
using namespace std;
main()
{
int t,a,b,c,r,co;
cin>>t;
while(t--)
{
cin>>a>>b>>c;
r=a+b+c;
co=r/9;
if(r%9==0&&a>=co&&b>=co&&c>=co) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
return 0;
}
0 Comments