아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Double Smoothly Undulating Numbers

시간 제한1초메모리 제한1024 MB

요약
주어진 범위의 수 중에서 지정한 개수의 서로 다른 진법에서 매끄럽게 물결치는 수를 찾는다.
난이도

보통10점 중 4점

유형
수학, 정수론, 완전 탐색, 구현
정답자
아직 제출이 없습니다

문제

Smoothly undulating numbers alternate between a pair of digits (e.g., 1212121). Double smoothly undulating numbers alternate between a pair of digits in one number base and a pair (potentially different) of digits in some other number base. Consider the number 191919 in base 10. This number is 121212 when represented in base 11. So, 191919 (in base 10) is a double smoothly undulating number.

Similarly, there are triple undulating numbers (which are smoothly undulating in three bases) and even quadruple smoothly undulating numbers, like 300 (base 10), which is:

  • 606 (base 7)
  • 454 (base 8)
  • 363 (base 9)
  • 1A1 (base 13)

Your task will be to find double, triple, and quadruple smoothly undulating numbers.

입력

A single line with five integers:

  • The lowest base to examine (2..32)
  • The highest base to examine (2..32)
  • The lowest number in the range of numbers to search (1..10000000)
  • The highest number in the range of numbers to search (1..10000000)
  • The number 2, 3, or 4 for double, triple, or quadruple undulating numbers, respectively

출력

A sort of list of numbers in base 10 that meet the input criteria.

예제1

  1. 예제 1

    입력
    10 11 190000 950000 2
    
    예상 출력
    191919
    383838
    575757
    767676
    959595