KöMaL - Középiskolai Matematikai és Fizikai Lapok
Sign In
Sign Up
 Magyar
Information
Contest
Journal
Articles
Contest Rules
Entry Form
Problems
Results
Previous years

 

Exercises and problems in Informatics
February 2004

Please read The Conditions of the Problem Solving Competition.

I. 70. Write an efficient program (i70.pas,...) that lists every integer between M and N (1\(\displaystyle \le\)M \(\displaystyle \le\)N \(\displaystyle \le\)10 000 000) whose number of divisors is a product of two primes.

(10 points)

I. 71. Prepare a program (i71.pas,...) that reads the side lengths of a rectangle and the side length of an equilateral triangle, then tiles the rectangle (from its bottom left corner) with rows of red triangles of the given size, and fills the remaining area inside with green.

The example shows a rectangle with height 300, width 480, and triangles with side length of 100.

(10 points)

I. 72. Lucky numbers between the integers 1,2, ..., N can be found in the following way. To begin, strike out every second number, so we have 1, 3, 5, 7, 9, ... . The first number greater than 1 on this list is 3, so strike out every third number: we are left with 1, 3, 7, 9, 13, 15, 19, 21,... . Similarly, the first number on this list greater than 3 is 7, so strike out every seventh number resulting 1, 3, 7, 9, 13, 15, 21, ..., and so on. Having completed this sieve the remaining numbers are the lucky ones.

Prepare a sheet (i72.xls) so that writing the numbers 1, 2, 3, ..., N (2\(\displaystyle \le\)N \(\displaystyle \le\)100) into its first row, it displays the evolution of lucky numbers in the subsequent rows. Your solution should also work for any strictly monotone increasing sequence in the first row instead of 1, 2, 3, ..., N.

(10 points)

123456789101112131415161718192021
13579111315171921          
137913151921             
1379131521              
1379131521              
1379131521              
1379131521              
1379131521              


Send your solutions to the following e-mail address:

Deadline: 13 March 2004

Our web pages are supported by:   Ericsson   Cognex   Emberi Erőforrás Támogatáskezelő   Emberi Erőforrások Minisztériuma   Nemzeti Tehetség Program    
MTA Energiatudományi Kutatóközpont   MTA Wigner Fizikai Kutatóközpont     Nemzeti
Kulturális Alap   ELTE   Morgan Stanley