Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
can anyone provide java /c/c++ code for following problem
John is very good at mathematics and cryptography. But he has a very bad memory. He maintains positive integers as passwords.However,instead of writing them directly he encrypts them and writes the encrypted password on his desk. He has 25 as a password for some account. He observed 25 when represented in base 15 has two digits.The first is 1(most significant) and the second is 10(least significant). Hence the sum of digits of 25 when represented in base 15 is 11.
(continued in comment...)
 one year ago
 one year ago
can anyone provide java /c/c++ code for following problem John is very good at mathematics and cryptography. But he has a very bad memory. He maintains positive integers as passwords.However,instead of writing them directly he encrypts them and writes the encrypted password on his desk. He has 25 as a password for some account. He observed 25 when represented in base 15 has two digits.The first is 1(most significant) and the second is 10(least significant). Hence the sum of digits of 25 when represented in base 15 is 11. (continued in comment...)
 one year ago
 one year ago

This Question is Closed

harshit1202Best ResponseYou've already chosen the best response.0
Now he is interested to find the average of sum of digits of the positive integer password P when represented in all bases from 2 to P1. Thus he calculates an irreducible fraction, which is written in base 10. He has done all the required computations in base 10. He then writes the encrypted password on his desk. Input: First line contains one integer n, the no of test cases. From the next line starts the test cases.Each test case contains one line. the line contains an integer password P. 3<=p<=1000. Output: Output must contain encrypted password i.e. required average value in a/b form, where a is the numerator and b is the denominator. Sample test(s): Input: 2 6 3 Output: 9/4
 one year ago

harshit1202Best ResponseYou've already chosen the best response.0
its important any help or suggestions atleast.
 one year ago
See more questions >>>
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.