Computer Science, asked by cse18bcs2212, 9 months ago

Given N three-digit numbers, your task is to find bit score of all N numbers and then print the number of pairs possible based on these calculated bit score. 1. Rule for calculating bit score from three digit number: From the 3-digit number, · extract largest digit and multiply by 11 then · extract smallest digit multiply by 7 then · add both the result for getting bit pairs. Note: - Bit score should be of 2-digits, if above results in a 3-digit bit score, simply ignore most significant digit. Consider following examples: Say, number is 286 Largest digit is 8 and smallest digit is 2 So, 8*11+2*7 =102 so ignore most significant bit , So bit score = 02. Say, Number is 123 Largest digit is 3 and smallest digit is 1 So, 3*11+7*1=40, so bit score is 40. 2. Rules for making pairs from above calculated bit scores Condition for making pairs are · Both bit scores should be in either odd position or even position to be eligible to form a pair. · Pairs can be only made if most significant digit are same and at most two pair can be made for a given significant digit.

Answers

Answered by Anonymous
0

Answer:

ONLINE EDITOR (4 Digit Pairs – Problem Description Given N three-digit numbers, your task is to find bit score of all N numbers and then print the number of pairs possible based on these calculated bit score. 1. Rule for calculating bit score from three digit number: From the 3-digit number, extract largest digit and multiply by 11 then extract smallest digit multiply by 7 then add both the result for getting bit pairs. Note: -Bit score should be of 2 digits, if above results in a 3-digit bit score, simply ignore most significant digit. Consider following examples: Say, number is 286 Largest digit is 8 and smallest digit is 2 Largest digit is 3 and smallest digit is 1 So, 311+7*1-40, so bit score is 40. 2. Rules for making pairs from above calculated bit scores Condition for making pairs are Both bit scores should be in either odd position or even position to be eligible to form a pair Pairs can be only made if most significant digit are same and at most two pair can be made for a given significant digit.

Similar questions