Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Minimum Integer
You are given qq queries in the following form:
Given three integers lili, riri and didi, find minimum positive integer xixi such that it is divisible
by didi and it does not belong to the segment [li,ri][li,ri].
For each query print one integer: the answer to this query.