Function to print the arrays
static void print ( long a [ ] , long b [ ] ) { int minProd = 0 ; for ( int i = 0 ; i < a . length ; ++ i ) { System . out . print ( a [ i ] + " ▁ " ) ; } System . out . println ( ) ; for ( int i = 0 ; i < b . length ; ++ i ) { System . out . print ( b [ i ] + " ▁ " ) ; minProd += a [ i ] * b [ i ] ; } System . out . println ( ) ; System . out . println ( minProd ) ; }