This is a video editorial for a May Long Challenge problem. We use the Chinese remainder theorem to find the modulo of all combinations of sandwiches.
Jatin Yadav explains how to solve the mentioned question.
Problem Statement:
https://www.codechef.com/MAY17/proble...
Code:
https://www.codechef.com/viewsolution...
Links:
Chinese Remainder Theorem:
https://crypto.stanford.edu/pbc/notes...
Number Theory:
http://www.geeksforgeeks.org/multipli...
Legendre's Formula: https://en.wikipedia.org/wiki/Legendr...