What wrong in this code

it is showing time limit

Algorithm ->
Generate all prime Factors of the number.
Write a function that calculates the sum of digits of a passed number.
Pass each generated Prime Factor to this digits sum function till you can generate prime factors.
At last, equate your sum with the sum of digits of the given number.
4.1 If yes print 1.
4.2 otherwise print 0.
Note -> Make your code a little Efficient otherwise you will get TLE with brute force approach. By making code efficient is either you need to make your prime factor generator efficient or prime checker efficient in order to pass the test cases.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.