There is a contest! | В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.
|
|
imesecan | Oct.01.2015 at 10:49:59 AM | |
0 | -- Test 1 --- 17 8
--- Pattern --- 21
|
imesecan | Oct.01.2015 at 11:15:55 AM | |
1 | After 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.
|
imesecan | Oct.01.2015 at 11:16:06 AM | |
2 | You 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.
|
|