give integer array num return number arithmetic subsequence numsA sequence number call arithmetic consist element difference consecutive element sameFor example 1 3 5 7 9 7 7 7 7 3 1 5 9 arithmetic sequencesfor example 1 1 2 5 7 arithmetic sequenceA subsequence array sequence form remove element possibly arrayfor example 2510 subsequence 121241510the test case generate answer fit 32bit integer Example 1input num 246810output 7explanation all arithmetic subsequence slice are24646868102468468102468102610Example 2input num 77777output 16explanation any subsequence array arithmetic Constraints1 numslength 1000231 numsi 231 1