# Decreasing Srrnmieeda October Cook off challenge Solution | Easy Explain Decreasing Srrmieeda

## Decreasing Srrnmieeda October Cook off challenge Solution | Easy Explain Decreasing Srrmieeda-

Easy Explanation of Decreasing Srrnmieeda October Cook-off challenge Solution  With Code.Here Is Problem Statement.

## Problem Statement-

You are given two integers $L$ and $R$. Find the smallest non-negative integer $N$ such that

$N\phantom{\rule{thinmathspace}{0ex}}\mathrm{%}\phantom{\rule{thinmathspace}{0ex}}L>N\phantom{\rule{thinmathspace}{0ex}}\mathrm{%}\phantom{\rule{thinmathspace}{0ex}}\left(L+1\right)>\dots >N\phantom{\rule{thinmathspace}{0ex}}\mathrm{%}\phantom{\rule{thinmathspace}{0ex}}\left(R-1\right)>N\phantom{\rule{thinmathspace}{0ex}}\mathrm{%}\phantom{\rule{thinmathspace}{0ex}}R\phantom{\rule{thinmathspace}{0ex}}.$

Here, $\mathrm{%}$ is the modulo operator, so $A\phantom{\rule{thinmathspace}{0ex}}\mathrm{%}\phantom{\rule{thinmathspace}{0ex}}B$ is the remainder of $A$ after division by $B$. For example, $11\phantom{\rule{thinmathspace}{0ex}}\mathrm{%}\phantom{\rule{thinmathspace}{0ex}}3=2$.

### Input

• The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
• The first and only line of each test case contains two space-separated integers $L$ and $R$.

### Output

For each test case, print a single line containing one integer ― the smallest possible

This post first appeared on Technical Keeda, please read the originial post: here

# Share the post

Decreasing Srrnmieeda October Cook off challenge Solution | Easy Explain Decreasing Srrmieeda

×