Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Preparatory Mock
for
Scholastica Inter-School Olympiad in Informatics 2017 (SIOI)
INSTRUCTIONS
Format:
Preliminary round: Paper-based MCQ Test: 45 minutes MCQ
Semi-Finals: Computer-based Programming Test: 2 hours 5 tasks
Finals: Computer-based Programming Test: 2 hours 1 task
1. If you have a number ABCDEF where each letter A, B, C, D, E, and F represents the digits (0-9) of that
number, how many numbers are there such that ABCDEF is equal to FEDCBA? [1]
(a) 10
(b) 729
(c) 1000
(d) 998001
2. Meena’s parrot Mithu was eating some fruit. He ate one grape on day 1, twice that on day 2, twice
that on day 3, and so on until day 16. How many grapes did he eat in total? [1]
(a) 32767
(b) 32768
(c) 65535
(d) 65536
(a) FOR …
(b) WHILE … DO …
(c) REPEAT … UNTIL …
(d) IF …
(a)
(b)
(c)
(d)
5. What will the following algorithm output? [1]
(a) 1, 1, 1
(b) 1, 1, 2
(c) 1, 2, 3
(d) 1, 1, 2, 3
1 INPUT a
2 INPUT b
3 n ← SQRT(b)
4 FOR i ← 1 TO n
5 square ← i * i
6 IF square <= a OR square <= b
7 THEN
8 OUTPUT square
9 ENDIF
10 ENDFOR