Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

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%L>N%(L+1)>>N%(R1)>N%R.

Here, % is the modulo operator, so A%B is the remainder of A after division by B. For example, 11%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

×

Subscribe to Technical Keeda

Get updates delivered right to your inbox!

Thank you for your subscription

×