Идёт турнир! | В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.
|
|
imesecan | 27.сен.2015 в 20:58:50 | |
0 | -- Test 1 --- 11111110 11111112
--- Pattern --- 1
|
imesecan | 03.янв.2016 в 22:51:15 | |
1 | --- Test 2 --- 10000000 99999999
--- Pattern --- 4379055
|
imesecan | 03.янв.2016 в 22:55:07 | |
2 | When you try to calculate the sum digits of left and right parts for every number you will have time limit. Instead, you can calculate sum of digits of all numbers from 1 until 9999 and store in a lookup array.
Then when you start checking the numbers, you divide the number into two (left and right), lookup their sums from the array.
|
|