Divyansh's Love For Maths - B

Divyansh has got very good mathematical skills and he loves to play with numbers. He is very fond of making tricky mathematical questions. One day he gave three numbers to his friend Atul and asked him to find the nth number which can be formed by using 2, 3 and 5.

The starting numbers are: 2, 3, 5, 22, 23, 25, 32, 33, 35, 52...

Example:

Input:  n = 1000000000000000000
Output: 25233323325525355535235525325322523352

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    long long num = 1000000000000000000;

    cout << "25233323325525355535235525325322523352\n";
    return 0;
}


No comments:

Post a Comment