Which Base is it Anyway: Difference between revisions

From programming_contest
Jump to navigation Jump to search
imported>Kmk21
Created page with "This problem literally asks you to read input and convert it to base 8 and base 16. Java has methods to do this. (Integer.parseInt()). C++ may as well. If not, you're left to..."
 
(No difference)

Latest revision as of 00:29, 4 November 2017

This problem literally asks you to read input and convert it to base 8 and base 16.

Java has methods to do this. (Integer.parseInt()). C++ may as well. If not, you're left to do it on your own, which involves:

  1. % by new base to get least significant digit
  2. subtract by modded value in step 1
  3. divide by new base.
  4. repeat