A9757. Maximum Value
编程题
普及/提高-
知识点
题目描述
You are given a sequence $a$ consisting of $n$ integers. Find the maximum possible value of  (integer remainder of $a_{i}$ divided by $a_{j}$ ), where $1<=i,j<=n$ and $a_{i}>=a_{j}$ .
输入格式
You are given a sequence $a$ consisting of $n$ integers. Find the maximum possible value of  (integer remainder of $a_{i}$ divided by $a_{j}$ ), where $1<=i,j<=n$ and $a_{i}>=a_{j}$ .
输出格式
Print the answer to the problem.
输入输出样例
输入 #1
3 3 4 5
输出 #1
2