Preparing NOJ

Same Remainder

1000ms 65536K

Description:

Given A and B. Find the smallest X that X is greater than 1 and A modulo X equals to B modulo X.

Input:

Two positive integers A and B (A,B <= 10000).

Output:

One integer X.

Sample Input:

17 26

Sample Output:

3

Info

NOIOPEN

Provider NOIOPEN

Origin 简单英文题

Code NOIOPJENGLISH13

Tags

Submitted 0

Passed 0

AC Rate 0%

Date 08/15/2021 18:56:21

Related

Nothing Yet