n-th integer divisible by a or b
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given two integers and . Find the -th positive integer that is divisible by either or .
Input
Three integers and .
Output
Print the -th positive integer divisible by either or . It is known that the answer is no more than .
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 4K
Acceptance rate 31%