GO Solution For UVa 10484 - Divisibility of Factors. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

Given two integers N and D, you will have to find how many of the factors of N ! (factorial N) are divisible by D.

Input The input file contains several lines of input. Each line contains two integers N (0 ≤ N ≤ 100) and D (0 < |D| ≤ 231 − 1). Input is terminated by a line containing two zeroes. Th

...

You can find the full details of the problem Divisibility of Factors at UVa Online Judge

Sample Input

10 2
9 3
0 0

Sample Output

240
128

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985