Boston number error

it give correct answer for all test case expect 2 and 3. Please let me know where is my mistake.

my code link= https://ide.codingblocks.com/s/244727

@divesh2000
you have to take the sum of the digits of prime factors as well.

1 Like

I have already take sum of digits of prime factor
you can also check in my code .
Please check the code

@divesh2000
i have fixed your code, but the problem was still the same as i mentioned in my previous comment.
" you have to take the (sum of the digits) of prime factors as well."
that is
for(auto k=factor.begin();k!=factor.end();k++)
{
total+=summ(*k);
}

1 Like

Thanks a lot .Now,I get it where I done mistake.