Prázdny
Prázdny

Task 1 was revealed 14.10.2024 at 18:00 CET

Login required

*

Perfect numbers

One day, while Jerry Cimrman was walking through a secluded bookstore in the heart of Europe, he came across an old, dusty book. The cover said: "Euclid: The Secrets of Perfect Numbers." Jerry, always curious, opened the book and began to read.

 

After a few pages, Cimrman thought: “Perfect numbers? That sounds like something I could use in my inventions!” He decided to study the book in depth. In the evening, when he returned to his modest apartment, he began to experiment. After several hours of hard thinking and counting, he managed to discover a new perfect number.

 

He was so excited that he decided to write a letter to Euclid. “Dear Mr. Euclid,” Cimrman began, “let me inform you that I have discovered a new perfect number. I am sure you would be proud of me!” He carefully sealed the letter and sent it to ancient Greece. A few weeks later he got a reply. It was a blank page with only one word: "Bravo!"

 

And so Jerry Cimrman became not only a famous inventor, but also a mathematician known for his discovery of the perfect number. Although no one ever saw his letter or the reply, Cimrman believed that his discovery had changed the world of mathematics forever.

 

And since then, whenever someone mentioned perfect numbers, Jerry just smiled and said, "That's my job!" Using perfect numbers, Cimrman also designed a complex astronomical clock for the capital city. But he had bad luck. Five minutes before he finished, another inventor completed a similar clock, so the capital city has an astronomical clock, which visitors to the city can still admire today, but it is not the one invented by Jerry Cimrman.

 

 

 

 

Task Description

“The task is to create a program that finds the first 5 perfect numbers in the range of 2 to 100,000,000. A perfect number is a number that is the sum of all its divisors except itself. (For example, 6 is a perfect number because 1 + 2 + 3 = 6. Similarly, 28 is a perfect number because 1 + 2 + 4 + 7 + 14 = 28.”)

 

 

 

 

Your task

Into the field with the answer enter:

  • the result – each perfect number should be on a new line
  • the country, which the story refers to
  • at the end paste the source code of your program.

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Answer

6

28

496

8128

33550336

 

Czechia, the Czech republic

 

Points for

   

Correct answer

Country

Source Code

Round 1

1

1

1

Round 2

2

1

1

Round 3

3

1

1

Round 4

4

1

1

Round 5

5

1

1

Bonus points for

               

 

 

Quick and correct answer

 

Round 1

5

4

3

2

1

       

Round 2

                 

Round 3

7

6

5

4

3

2

1

   

Round 4

8

7

6

5

4

3

2

1

 

Round 5

9

8

7

6

5

4

3

2

1