Pagini recente » Cod sursa (job #2987198) | Cod sursa (job #1147008) | Cod sursa (job #1985183) | Cod sursa (job #3247318) | Cod sursa (job #60151)
Cod sursa(job #60151)
#include<fstream>
#include<math.h>
using namespace std;
int n,a,b,c,x,y,z,p;
long l;
int main()
{
ifstream fin("puteri.in");
ofstream fout("puteri.out");
int i,j;
fin>>n;
for(i = 1; i <= n; i++)
{
fin>>a>>b>>c;
x+=a;
y+=b;
z+=c;
}
if(x%y == 0)
p++;
if(y%x == 0)
p++;
if(x%z == 0)
p++;
if(z%x == 0)
p++;
if(y%z == 0)
p++;
if(z%y == 0)
p++;
fout<<p+1;
fin.close();
fout.close();
return 0;
}