Boston Numbers Problem

Getting Time limit in multiple testcases

P.S- Please don’t update the code, just tell me what is wrong with my code. Thanks :slight_smile:

@aiman.mumtaz
This goes into infinite help.
And also in the question you also have to the sum of digits of primes as well.
while(n%2==0){
answer+=2;
}
Just a debugging tip : try to run the functions independently to find out what could be wrong.

Wrong answer for 2 testcases

Hello? Please reply!!! Almost 24 hours have passed

in the question, you also have to the sum of digits of primes as well.
Sorry for the late reply. I didn’t got the notification of your reply.