ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1261. Tips

aaa this is easyy problem
Posted by 👑TIMOFEY👑 26 Aug 2022 09:04
I'm tried to solve it many times and this problem dont need strong. There is no need to count a lot, compare numbers, check so that all the money can be divided, all you need is to take all the powers of three and check for each that in sum with n it also gives the sum of the powers of three. That is, t is the sum of degrees, if t+n too, then output the answer immediately!