0% found this document useful (0 votes)
4 views2 pages

2025 PO R1 Question Paper

The document outlines the rules and tasks for the Programming Olympiad 2025, including instructions for participants on how to submit their answers and the scoring system for different questions. It features three programming tasks: calculating the area of an unfolded sheet, identifying Armstrong numbers, and deciphering a coded message. Participants are advised on formatting their submissions and the consequences of modifying files post-contest.

Uploaded by

pintomiguel304
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

2025 PO R1 Question Paper

The document outlines the rules and tasks for the Programming Olympiad 2025, including instructions for participants on how to submit their answers and the scoring system for different questions. It features three programming tasks: calculating the area of an unfolded sheet, identifying Armstrong numbers, and deciphering a coded message. Participants are advised on formatting their submissions and the consequences of modifying files post-contest.

Uploaded by

pintomiguel304
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IITPSA NPC

Level 1 West, Gallagher House,


Gallagher Convention Centre,
Leading ICT Professionalism 19 Richards Drive, Midrand, South Africa
and Ethical Digital P O Box 1714, Halfway House
1685, South Africa
Transformation
Tel: +27 87 655 1679 or
+27 11 315 1319
[Link]

Programming Olympiad 2025 : Round 1


Not to be used before 21 July 2025

1. This paper is for ALL participants.


2. All answers must be TYPED or PASTED on your Answer Sheet.
3. Online participants should place their answers in the correct space provided on the competition website (URL) they
received with their username and password.
4. Each correct answer for question 1 earns 7 marks, question 2 earns 8 marks while a correct answer for question 3
earns 10 marks.
5. You have 60 minutes to attempt as many questions as possible.
6. Programs should be readable, concise, and use appropriate variable names.
7. Indicate the question, your name, surname, and the language and version used in a comment statement at the start
of every program, e.g., “Q3 Sam King, Python 2.7”
8. Save your program as Qn Name Surname, e.g., Q3 Sam King
9. You may assume that the user input will satisfy the problem specification and so you do not need to validate the
input.
10. Do not write code to produce only specific answers, as the external judges may use other test cases.
11. After the contest you may be given time to print out your Answer Sheet. Do not make any changes during this time.
12. Make sure you save the programs you have created as well as the Answer Sheet in a place where your teacher can
find them. You should submit your programs if taking part online (see “Instructions for Participants” provided).
13. DO NOT MODIFY ANY FILES AFTER THE END OF THE CONTEST AS THIS WILL LEAD TO YOUR DISQUALIFICATION.

Question 1: Unfolding Sheets Examples

A sheet is a large rectangular piece of cloth. Sheets are Input Output


typically folded in half, multiple times, to make them compact 100 40000
for storage. 200
Task 1
250 62500
Write a program that reads 3 integers: the length of the sheet
250
when folded, the width of sheet when folded, and the number
0
of times the sheet has been folded in half.
70 26600
The program must output the area of the sheet when 95
completely unfolded. 2
The length and width of the folded sheet are given in
centimeters. The output must be in square centimeters.

Directors: Ms. S.B. Goba (President), Ms. P. Pasi (VP), K.W. Matthee (Treasurer),
.Gwanzura, T. Mashegoane, R. Kisten, , J. Singh, K.F. Chipidza,
Prof. L.A. Futcher, Ms. J.M. Overdevest, N.V. Zambezi, M.A. Parry (CEO)
Sponsored by
Reg. No.: 1958/001036/08 VAT Reg. No.: 4760 12 1113 PBO No.: 930010177
Test your program with the following cases: Question 3: Ciphered Scroll
1.a 11 A scroll has been found containing secret messages encoded
15 using a custom cipher. You have determined how the scroll
1 was encrypted and will use the encryption to decipher the
1.b 38 message.
51 The encryption method is as follows:
4
1. Each letter is shifted forward by its position in the
1.c 97 word, using the English alphabet (a-z, wrap around if
203 necessary).
0 2. All letters are in lowercase.
1.d 63 3. Non-alphabetic characters (like spaces, punctuation)
81 are unchanged.
3 4. Positions are 1-based within each word.
Encryption example for the word “dog”:
Question 2: Armstrong number
d (4th letter) + 1 → e
An Armstrong number, also known as a narcissistic number,
o (15th letter) + 2 → q
is a number that is equal to the sum of its digits, each raised
g (7th letter) + 3 → j
to the power of the number of digits in the number. These
numbers are interesting because they exhibit a unique So, dog → eqj
property which makes them increasingly rare the larger the
To decrypt, you must subtract the character's position in the
number gets, and it has been mathematically proven that
word (with wrap-around from 'a' if needed).
there is a finite number of Armstrong numbers.
Input Output
Example:
dcw cat
54748: 5⁵ + 4⁵ + 7⁵ + 4⁵ + 8⁵ = 3125 + 1024 + 16807 igopt xqupi hello world
+ 1024 + 32768 = 54748 ujhvj ju bp vplgtxu jp ujh there is an unicorn in the
Task: gquvjya forrest

Write a program that identifies the 4 Armstrong numbers


between the range of 100 and 500. Note: The four numbers Test your program with the following cases:
must be submitted in ascending numerical order, with 3.a mqyi
Question 2.a (the FIRST) requiring the smallest number and 3.b icstntlab
Question 2.d (the FOURTH) requiring the largest. 3.c hqrh okjly
3.d j gqxri uthexaym

The following are Armstrong numbers that can be used


to test your logic:
2.a 1634
2.b 8208
2.c 9474
2.d 93084

Directors: Ms. S.B. Goba (President), Ms. P. Pasi (VP), K.W. Matthee (Treasurer),
.Gwanzura, T. Mashegoane, R. Kisten, , J. Singh, K.F. Chipidza, Sponsored by
Prof. L.A. Futcher, Ms. J.M. Overdevest, N.V. Zambezi, M.A. Parry (CEO)
Reg. No.: 1958/001036/08 VAT Reg. No.: 4760 12 1113 PBO No.: 930010177

You might also like