UVa 10879

From Algorithmist
Jump to navigation Jump to search

10879 - Code Refactoring[edit]

Summary[edit]

To find 2 distinct pairs of factors of a number.

Explanation[edit]

Very simple. Find 2 pairs of factors of the number so that all of them are distinct. Any solution is accepted.

Input[edit]

3
120
210
10000000

Output[edit]

Case #1: 120 = 12 * 10 = 6 * 20
Case #2: 210 = 7 * 30 = 70 * 3
Case #3: 10000000 = 10 * 1000000 = 100 * 100000