Hello everyone,
I was trying to solve 43C - Lucky Tickets , I couldn't come up with a correct solution in the time limit so I read the editorial , the writer stated " We all know that the remainder of a number when divided by 3 is equal to the remainder of sum of its digits when divided by three.", apparently that was a key fact for solving the problem but I lacked this certain knowledge.The way he wrote it gave me an impression that it is an elementary piece of information that I should surely know. I tried searching it, I didn't come up with anything about this fact or a proof. Am I supposed to deduce a fact like this during solving the problem or is it a well-known fact and I lack enough knowledge ? It will be great if you could direct me to a source where I could learn useful similar facts which could be a key for solving coming problems.
Thank you ,