Jarvis and Numbers
Practice
3.6 (29 votes)
Very Easy
Problem
63% Success 3454 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code

After defeating Mandarin in Iron man 3, Jarvis is most of time free and now he has started playing with numbers. Jarvis being an AI (Artificial Intelligence) solves almost all the riddle given by Tony Stark very quickly. This time Tony gave him a problem about base conversion’s but the problem statement given by Tony seems to be confusing and Jarvis asked for Help! Problem Statement – “123 when converted in base 16, it consist of two digits 7 and 11 so the sum of the numbers is 18,(For Given N) Find denominator of average(irreducible form) of sum of all the numbers formed on conversions from base 2 to N-1”.

Can you help Jarvis?

Input:

First line will have the number of test case (t) and then t subsequent lines will contain a number N.

Output:

For every test case, give answer in new line.

Constraints:
\(T < 10\)
\(3 <= N <= 1000\)

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:10
11 votes
Tags:
Very-Easy
Points:10
15 votes
Tags:
Basic MathAlgorithmsMathamaticsMath
Points:10
1 votes
Tags:
Basic MathC++MathObservation