Question: Show me the steps to solve Mr . Thomas is a very well - known mathematician, He went to an education fair where he noticed

Show me the steps to solve Mr. Thomas is a very well-known mathematician, He went to an education fair where he noticed a lot of brilliant students. So, by seeing their talent, he has given them a problem to solve The problem was: num P+P++ PN where P, is an integer and will be in the format of XYZ where X should be considered as base and Y is considered as power and 2 represents the number of digits to be considered as power For example, given an equation in the form of num =3011+1122 to solve the equation, it should be calculated in the form of num =3011=31, where 1 and 2 marked as red will be ignored Can you help students with a program to solve the given problem. Input Format: The first line of input contains the integer N, the total number of operands in the equation Each of the following N lines contains the integer P, from the equation. Output Format: The first and only line of output must contain the value of num from the given equation, Constraints: i.N (1<= N <=1000) ii. P (10<= P_{i}<=9999 i =1,..N) iii. num (num <=10^9) Sample Input 1: 13011 Sample Output 1: 30 Explanations1: The number of operands in the equation, N: 1 P_{1}3011

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 Programming Questions!