A community for students.
Here's the question you clicked on:
 0 viewing
 2 years 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...)
 2 years 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...)

This Question is Closed

harshit1202
 2 years ago
Best ResponseYou've already chosen the best response.0Now 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

harshit1202
 2 years ago
Best ResponseYou've already chosen the best response.0its important any help or suggestions atleast.
Ask your own question
Sign UpFind more explanations on OpenStudy
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.