Question: with the language NODEJS need help Programming challenge, screenshot your work and output. Description A positive integer is a palindrome if its decimal representation (without

with the language NODEJS need help Programming challenge, screenshot your work and output.

Description

A positive integer is a palindrome if its decimal representation (without leading zeros, is a palindromic string (a string that reads the same forwards and backwards). For example, the number 5, 77, 363, 4884, 11111, 12121 and 349943 are palindromes

A range of integers is interesting if it contains an even number of palindromes. The range [L, R], with L <= R, is defined as the sequence of integers from L to R (inclusive): (L, L+1, L+2,.., R-1, R). L and R are the ranges first and last numbers.

The range [L1,R1] is subrange of [L,R] if L <= L1 <= R1 <= R. Your job is to determine how many interesting subrane of [L,R] there are

Input

Your program should read lines of text from standard input. Each line will contain two positive integers, L and R (in that Order), separated by space.

Output

For each line of input, print out the number of interesting subranges of [L,R]

Code given:

process.stdin.resume();

process.stdin.setEncoding('utf8');

var stdin = ' ';

process.stdin.on('data', function (chunk) {

stdin += chunk;

}).on('end', function() {

var lines = stdin.trim().split(' ');

for(var i=0; i

process.stdout.write(lines[i]);

}

});

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!