HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50587 - Modular Conversion

Guest
• Review clarifications (3)

Volume problems

• 50914 - Buy 3, Pay 2
• 50555 - Frequency of Letters
• 50558 - Biggest Barn
• 50563 - Long Modulus
• 50565 - Binary numbers
• 50567 - Input Data Normalization
• 50569 - 12th Grade Elective Subjects
• 50585 - Inner Product
• 50587 - Modular Conversion
• 50592 - Matrix Multiplication
• 50594 - Transformations
• 50653 - Long Divide
• 50767 - Censor
• 50768 - Where is Waldorf?
• 50792 - The student with the highest...
• 51182 - Count and Sum 2
• 51193 - The max element of k-th co...

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

Modular Conversion

Shqip
Get two numbers n and m, and then calculate where n represents a number in base ten and m represents the base to convert.
Write a program that converts the given number n into base m and shows the result. For example:
(17)10 = (122)3

(17)10 = (10001)2

Input specification
There will be two numbers in the input file where 0 ≤ n < 100000 and 2 ≤ m < 10
Output specification
Calculate and show the result followed by an endline. The output number will not have more than 20 digits in it.

Input 1 Input 2
17 3 17 2
Output 1 Output 2
122
10001

Для отправки решений необходимо выполнить вход.

www.contester.ru