It should saythe denominator is a power of 3 i.e. $b=3^k, k>0$.

(The other possible correction, $>$ to $\ge$, doesn't match up with the test cases).the denominator is a power of 3 other than 1, i.e. $b=3^k, k>0$.

As your posts will be visible to the general public you

are requested to be thoughtful in not posting anything

that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

See also the topics:

Don't post any spoilers

Comments, questions and clarifications about PE problems.

There's an error in the problem statement. It currently says

It should saythe denominator is a power of 3 i.e. $b=3^k, k>0$.

(The other possible correction, $>$ to $\ge$, doesn't match up with the test cases).the denominator is a power of 3 other than 1, i.e. $b=3^k, k>0$.