Given an array of n integers. Find minimum number to be inserted in array, so that sum of all elements of array becomes prime. If sum is already prime, then return 0.
First line consists of T test cases. The T testcases follow. First line of every test case consists of N, denoting number of elements of array. Second line of every test case consists of elements of array.
Single line output, print the required answer.
2 4 6 8 12
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.