Count of distinct pair sum between two 1 to N value Arrays | Java implementation to find count of distinct pair sum between two 1 to N value Arrays ; Function to find the distinct sums ; Driver code
import java . util . * ; class GFG { static int findDistinctSums ( int N ) { return ( 2 * N - 1 ) ; } public static void main ( String [ ] args ) { int N = 3 ; System . out . print ( findDistinctSums ( N ) ) ; } }