ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Форумы > Обсуждение задач > тема:


Задача "50587 - Shnderrimi i numrit ne nje sistem me baze tjeter"

Идёт турнир!

В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.

imesecan01.окт.2015 в 10:49:59
0-- Test 1 ---
17 8

--- Pattern ---
21

imesecan01.окт.2015 в 11:15:55
1After calculating the remainders you can directly add this remainder to the beginning of resulting number:
You can use multiplier as the powers of 10, The first number is to be multiplied with. Let's say that the first modulus operation gives 2 and res is initially 0 and the number is 17
res = res + 1 * rem; ==> res= 2

then for the second remainder
res = res + 10 * rem; ==> res= 2 + 2* 10 ==> 22

then on the third step
res = res + 100 * rem; ==> 22 + 1 * 100 ==> 122

so on.

imesecan01.окт.2015 в 11:16:06
2You don't have to specify in you solutions the limits, for example don't write: if (number >=0 && number <100000) . It is given in the question just to clarify you for the limits of the numbers. And try using long long int.


www.contester.ru