#abc341d. D - Only one of two
D - Only one of two
Score: points
问题描述
给定三个正整数 、 和 ,其中 和 是不同的。 输出第 小的仅能被 或 中恰好一个整除的正整数。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given three positive integers , , and . Here, and are different. Print the -th smallest positive integer divisible by exactly one of and .
Constraints
- , , and are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the -th smallest positive integer divisible by exactly one of and .
Sample Input 1
2 3 5
Sample Output 1
9
The positive integers divisible by exactly one of and are in ascending order. Note that is not included because it is divisible by both and . The fifth smallest positive integer that satisfies the condition is , so we print .
Sample Input 2
1 2 3
Sample Output 2
5
The numbers that satisfy the condition are in ascending order.
Sample Input 3
100000000 99999999 10000000000
Sample Output 3
500000002500000000
update @ 2024/3/10 01:34:48