Mod in an Array
CodeChefOpen on judge ↗
You have an array A of size N containing only positive numbers. You have to output the maximum possible value of A[i]%A[j] where 1. Input The first line of each test case contains a single integer N denoting the size of the array. The next N lines contains integers A1, A2, ..., AN denoting the numbers Output Output a single integer answering what is asked in the problem. Subtask 1 (20 poi
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start