Number of non | Java solution to count solutions of a + b + c = n ; Returns count of solutions of a + b + c = n ; Driver code
import java . io . * ; class GFG { static int countIntegralSolutions ( int n ) { return ( ( n + 1 ) * ( n + 2 ) ) / 2 ; } public static void main ( String [ ] args ) { int n = 3 ; System . out . println ( countIntegralSolutions ( n ) ) ; } }