/* Constraintstime limit: 1 secs, memory limit: 32 mbdescriptionfind and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal (base 16) notation and also equals the sum of its digits when represented in duodecimal (Base 12) notation. for example, the number 2991 has the sum of (decimal) Dig Its 2 + 9 + 9 + 1 = 21. since 2991 = 1*1728 + 8*144 + 9*12 + 3, its duodecimal representation is 189312, and these digits also sum up to 21. but in hexadecimal 2991 is baf16, and 11 + 10 + 15 = 36, so 2991 shocould be rejected by your program. the next number (2992), however, has digits that sum to 22 in all three representations (including bb016), so 2992 shocould be on the listed output. (We don't want Decima L numbers with fewer than four digits-excluding leading zeroes-so that 2992 is the first correct answer .) inputthere is no input for this problemoutputyour output is to be 2992 and all larger four-digit numbers that satisfy the requirements (in strictly increasing order ), each on a separate line with no leading or trailing blanks, ending with a new-line character. there are to be no blank lines In the output. the first few lines of the output are shown below. sample inputthere is no input for this problemsample example */# include <iostream> # include <fstream> # include <vector> # include <string> # include <algorithm> # include <cmath> # include <string. h> using namespace STD; int getsum (INT digital, int I) {int sum = 0; while (Digital! = 0) {sum + = digital % I; digital = digital/I;} // end whilereturn sum;} int main () {for (INT I = 2992; I <9999; I ++) {int sum1, sum2, sum3; sum1 = getsum (I, 10); sum2 = getsum (I, 12); sum3 = getsum (I, 16); If (sum1 = sum2 & sum1 = sum3) cout <I <Endl ;}// end}