Sunday, March 13, 2016

CodeFights distSameLetter

CodeFights TicTacToe

    Just checking the quantities of Xs and Os is enough. The number of Xs must be either equal to the number of Ox or there there can be only 1 more Xs than Os, all other combinations are invalid.


Source Code

CodeFights Zeroes

Only 5 * 2 can end the number with an additional zero, there are definitely more 2 divisors in that entire multiplication than 5 , so we need to calculate how many times we can divide that number on 5 without a reminder.



        Source Code