Function to call the function for every query
static void operations ( StringBuilder L , StringBuilder R ) { init ( R ) ; int ans = fun ( 0 , 0 , 0 ) ; L = new StringBuilder ( number_minus_one ( L ) ) ; init ( L ) ; ans -= fun ( 0 , 0 , 0 ) ; if ( ans < 0 ) ans += k ; System . out . println ( ans ) ; }