logo AlgoBeat OnlineJudge
登录 注册

#215796. [JAG 2024 Summer Camp #2] K-th Nondivisor

内存限制:1024 MiB 时间限制:6000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Process queries. The -th query is as follows:

  • Given integers , , and , find the -th smallest positive integer such that does not divide any of the integers from to (inclusive).

输入格式

The input is given in the following format:

  • All input values are integers.

输出格式

Output lines. On the -th line, output the answer for the -th query.

样例

样例输入 1

3
10 11 5
12345 23456 789
1 200000 200000

样例输出 1

8
23629
400000