GO Solution For UVa 10375 - Choose and divide. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

The binomial coefficient C(m,n) is defined as

C(m,n) = m!

(m− n)! n!

Given four natural numbers p, q, r, and s, compute the the result of dividing C(p, q) by C(r, s).

Input Input consists of a sequence of lines. Each line contains four non-negative integer numbers giving values for p, q, r, and

...

You can find the full details of the problem Choose and divide at UVa Online Judge

Sample Input

10 5 14 9
93 45 84 59
145 95 143 92
995 487 996 488
2000 1000 1999 999
9998 4999 9996 4998

Sample Output

0.12587
505606.46055
1.28223
0.48996
2.00000
3.99960

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

Solution originally posted at: Github by @codingsince1985