시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB141906961.062%

문제

Write a program to print:

  1. The perfect numbers between $1\,000$ and $9\,999$ inclusive. A perfect number is a positive integer which is equal to the sum of its proper divisors. A proper divisor is any divisor less than the number itself. For example, $6$ is a perfect number since $1 + 2 + 3 = 6$.
  2. All integers between $100$ and $999$ inclusive which are equal to the sum of the cubes of their digits.

입력

There is no input.

출력

All the perfect numbers between $1\,000$ and $9\,999$ inclusive on one line, followed by all integers between $100$ and $999$ inclusive which are equal to the sum of the cubes of their digits on one line.

채점 및 기타 정보

  • 예제는 채점하지 않는다.