In this blog, we will look at how you could approach the problem “Christmas Heist” in The Coding Culture’s December Contest “Number Quest”. Contest Page | CodeChef
CodeChef - A Platform for Aspiring Programmers CodeChef was created as a platform to help programmers make it big in…www.codechef.com Approach: According to the Euclidean algorithm, for the given 2 integers A and M where A > M then gcd( A, M ) = gcd( A-M, M ).