CCC '98 S2 - Cross Number Puzzle

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 256M

Problem type

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.

Input Specification

There is no input.

Output Specification

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.


Comments


  • 2
    gavin_chen  commented on June 6, 2022, 12:48 a.m.

    the numbers look big but the answers might shock you...


  • 7
    JeremyYang  commented on April 25, 2021, 9:03 p.m.

    *the numbers are separated by spaces


  • -42
    cheese123  commented on Aug. 31, 2017, 5:48 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


    • 6
      WEAVER  commented on June 6, 2022, 8:47 p.m.

      bro why is this downvoted