ZOJ Problem Set - 1596
For each three prime numbers p1, p2 and p3, let's define Hamming sequence Hi(p1,
p2, p3), i=1, ... as containing in increasing order all the natural numbers
whose only prime divisors are p1, p2 or p3.
In the single line of input file there are space-separated integers p1 p2 p3 i.
Process to the end of file.
7 13 19 100
Source: Northeastern Europe 2000, Far-Eastern Subregion