Блог пользователя rahul_1234

Автор rahul_1234, история, 7 лет назад, По-английски

Problem: Write a method that, given a digit 'd' and number of its occurences 'k', returns a range which has that many occurrences of d. More precisely, return a lower and upper bound of this number N.

Example:

input: d=4, k=1

output {4, 13}

Range: 4-14

input: d=4, k=0

output {1, 3} Range: 1-3

Can anybody help me in this?

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