The program is to find a mathematical series, where we need to accept the value of n and m. n is the base number and m is the number of times till which the series run.
Input : 2 + 22 + 222 + 2222 + 22222 Output : 24690 Input : 12 + 1212 + 121212 Output : 122436
We first convert the numbers into string format and concatenate them regularly. Later, we convert them back to integer and add them upto mth term. as shown in the following program.
- Program to Calculate e^x by Recursion
- What is the maximum possible value of an integer in Python ?
- Longest subsequence of a number having same left and right rotation
- Least common element in given two Arithmetic sequences
- 3 Different ways to print Fibonacci series in Java
- How to store a very large number of more than 100 digits in C++
- Check if a large number is divisible by a number which is a power of 2
- Represent K as sum of N-bonacci numbers
- Find all numbers up to N which are both Pentagonal and Hexagonal
- Smallest number whose square has N digits
- Practical Numbers
- Junction Numbers
- Tcefrep Numbers
- Katadrome number
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : nidhi_biet