Блог пользователя Cat.Noir

Автор Cat.Noir, история, 3 месяца назад, По-английски

You're given $$$a$$$, $$$b$$$. the Lucky Number is the sum of first 3 digits and last 3 digits of $$$a^{b}$$$ $$$(a \leq 2 \times 10^{9})$$$ $$$(b \leq 10^{7})$$$,

It is guaranteed that $$$a^{b}$$$ contains at least $$$6$$$ digits.

Example if $$$a = 6$$$ and $$$b = 7$$$.
$$$a^{b} = 279936$$$ Lucky Number is $$$279 + 936 = 1215$$$

input : $$$a = 24, b = 13$$$ Output : $$$1700$$$
input : $$$a = 153456, b = 3$$$ Output : $$$1177$$$

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится