You are on page 1of 59

1

KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
MỤC LỤC
Giới thiệu Kỳ thi Olympic Tin học quốc tế HKICO ...................................................................3

Danh sách các trường tham gia tích cực và đạt thành tích cao tại các kỳ HKICO .................8

Một số hình ảnh tiêu biểu của Kỳ thi Olympic Tin học quốc tế HKICO tại Việt Nam .......9

Đề thi Đáp án

Đề số 1.................................................................................................................................. 10 ..........52
Đề số 2.................................................................................................................................. 15 ..........52
Đề số 3.................................................................................................................................. 21 ..........52
Đề số 4.................................................................................................................................. 28 ..........52
Đề số 5.................................................................................................................................. 33 ..........53
Đề số 6.................................................................................................................................. 38 ..........53
Đề số 7.................................................................................................................................. 44 ..........53

Một số kỳ thi Olympic quốc tế tiêu biểu khác ...........................................................................54

Thông tin liên hệ ..............................................................................................................................58

2
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
GIỚI THIỆU KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO

Kỳ thi Olympic Tin học quốc tế HKICO (HongKong International Computational


Olympiad) được th|nh lập v| tổ chức bởi Trung t}m Gi{o dục Vô địch Olympic Hong Kong
(Olympiad Champion Education Centre from Hong Kong) đăng ký hoạt động tại Bộ Gi{o dục
Hong Kong (EDB Reg No: 598 216) với mục tiêu cung cấp c{c khóa học v| kỳ thi thuộc c{c lĩnh
vực Khoa học - Công nghệ - Kỹ thuật v| To{n học (STEM) tại Hồng Kông.
Kỳ thi Olympic Tin học Quốc tế HKICO 2021 được tổ chức d|nh cho c{c học sinh
yêu thích môn tin học v| lập trình từ lớp 2 tiểu học đến lớp 12 trung học phông thông,
nhằm truyền cảm hứng kh{m ph{ c{c ngôn ngữ lập trình, hướng tới ph{t triển c{c kĩ
năng giải quyết vấn đề v| c{c kh{i niệm Khoa học tin học, trong đó bao gồm khả năng
ph}n loại v| đơn giản hóa c{c công việc phức tạp, thiết kế thuật t o{n, tổng qu{t hóa v|
trừu tượng hóa c{c đối tượng.
Năm học 2021-2022 l| lần thứ ba Kỳ thi được tổ chức tại Việt Nam. Trong lần thứ
hai tham dự, tại Vòng Chung kết quốc gia, ở phần thi viết, c{c thí sinh Việt Nam đã rất
xuất sắc với 82% đạt giải trong đó 1 Cúp Vô địch d|nh cho thí sinh đạt điểm cao nhất
to|n cầu tại mỗi khối lớp, 5 Cúp Á qu}n, 10% Huy chương V|ng, 26% Huy chương Bạc,
26% Huy chương Đồng v| 20% giải Khuyến khích. Đối với phần thi dự {n, 15/16 thí sinh
đạt giải, trong đó 2 Cúp Á qu}n, 2 Cúp giải Bạc, 3 Cúp giải Đồng v| 8 giải Khuyến khích.
Đ c biệt, trong vòng Chung kết quốc tế, đội tuyển Việt Nam đã xuất sắc đạt giải cao bao
gồm 17 giải V|ng, 19 giải Bạc, 19 giải Đồng, 50 giải Khuyến khích, trong đó có 1 Cúp Vô
địch d|nh cho thí sinh cao điểm nhất to|n cầu theo khối thi, 2 Cúp Á qu}n 1 v| 2 Cúp Á
qu}n 2 d|nh cho thí sinh cao điểm thứ hai v| cao điểm thứ ba to|n cầu theo khối thi.

3
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
Thông tin chi tiết về Kỳ thi Olympic Tin học quốc tế HKICO
I. Quy định về độ tuổi, cấu trúc đề thi

1. Về độ tuổi và ngôn ngữ lập trình

Tất cả các học sinh yêu thích lập trình tin học từ lớp 2 cấp Tiểu học tới lớp 12 cấp THPT.
Các thí sinh cùng ngôn ngữ lập trình thi cùng đề. Thí sinh có thể chọn thi ngôn ngữ lập trình
vượt lớp.
STT Lớp Ngôn ngữ lập trình
1 2, 3, 4 SCRATCH
2 5, 6, 7 BLOCKLY
3 8, 9, 10, 11, 12 PYTHON

2. Cấu trúc đề thi phần thi Viết


Vòng loại quốc gia Vòng Chung kết Vòng Chung kết
Vòng thi
quốc gia quốc tế
Dạng đề thi Trắc nghiệm
Số câu hỏi 16 câu 20 câu 24 câu
Làm đúng +2 điểm +4 điểm +3 điểm
Thang
Không làm 0 điểm 0 điểm 0 điểm
điểm
Làm sai -1 điểm -1 điểm -1 điểm
Thời gian làm bài 45 phút 60 phút 90 phút
Tiếng Anh Tiếng Anh
Ngôn ngữ (được sử dụng từ (được sử dụng từ Tiếng Anh
điển giấy) điển giấy)
Lưu ý: Thí sinh từ lớp 1 đến lớp 7 không được sử dụng máy tính cầm tay (Casio,
Vinacal, <). Thí sinh từ lớp 8 trở lên được sử dụng máy tính cầm tay.

3. Phần thi Dự án

Phần thi Dự án là phần thi khuyến khích đối với các thí sinh tham dự kỳ thi Vòng
Chung kết quốc gia HKICO. Thí sinh được phép chọn tham gia ho c không tham gia phần thi
Thực hành. Thí sinh tham gia phần thi Thực hành gửi b|i theo đúng quy định tại mục b) phía
dưới. Trong phần thi này thí sinh sẽ có cơ hội thể hiện những hiểu biết v| ý tưởng lập trình
của mình bằng tiếng Anh.
a) Đối tượng tham dự

Tất cả thí sinh tham dự Vòng Chung kết quốc gia được quyền gửi bài dự thi và xét giải
phần thi Dự án. Thí sinh không phải đóng thêm lệ phí phần thi Dự {n sau khi đã đăng ký
tham dự Vòng Chung kết quốc gia và nộp lệ phí dự thi phần thi Viết.

4
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
b) Quy định phần thi
Quy tắc tham dự Nội dung
Hình thức trình bày Trình bày dự {n dưới dạng Video
Độ dài Video Không vượt quá 5 phút
Hạn nộp bài 24h00 ngày 20/03/2022 (Chủ Nhật)
Ngôn ngữ sử dụng Tiếng Anh
Số video được nộp 1 video
Tải lên YOUTUBE và gửi link về Ban Tổ chức Việt Nam qua
Cách nộp
email: hkico.fe@gmail.com
‚How can everyone meet each other in person under COVID-
Chủ đề
19?‛

b) Thang điểm
Kiến thức lập trình Sáng tạo Kỹ năng thuyết trình
(40%) (30%) (30%)

- Xây dựng khái niệm lập - Đ t vấn đề cuốn hút, gợi - Thể hiện ý tưởng rõ ràng;
trình rõ ràng; được tò mò và có cấu trúc - Sắp xếp tốt trình tự bài
- Cung cấp nội dung chính trình bày hấp dẫn; thuyết trình;
x{c v| đầy đủ từ nhiều góc - Xây dựng thực nghiệm - Trình bày bằng tiếng Anh
nhìn cùng với minh chứng minh chứng thú vị. lưu lo{t.
thực nghiệm rõ ràng.
II. Cơ cấu giải thưởng

1. Giải thưởng của Ban tổ chức quốc tế

Hệ thống giải thưởng v| huy chương được Ban Tổ chức quốc tế trao độc lập dành cho
phần thi viết và phần thi Dự án.

a) Hệ thống giải thưởng cho phần thi viết

Điều kiện xét giải


Huy chương Vòng Chung kết quốc Vòng Chung kết quốc Giải thưởng
gia tế
Thí sinh cao điểm nhất Thí sinh cao điểm nhất Cúp Vô địch, Huy
Giải
mỗi khối thi mỗi khối thi chương v| Giấy
Vô địch
chứng nhận
Thí sinh đạt điểm cao Thí sinh đạt điểm cao Cúp Á quân 1,
Giải
thứ hai mỗi khối thi thứ hai mỗi khối thi Huy chương v|
Á quân 1
Giấy chứng nh}n

5
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
Điều kiện xét giải
Huy chương Vòng Chung kết quốc Vòng Chung kết quốc Giải thưởng
gia tế
Thí sinh đạt điểm cao Thí sinh đạt điểm cao Cúp Á quân 2,
Giải
thứ ba mỗi khối thi thứ ba mỗi khối thi Huy chương v|
Á quân 2
Giấy chứng nh}n
Thí sinh đạt TOP 8% Thí sinh đạt TOP 8% Huy chương v|
Giải Vàng điểm cao nhất mỗi khối điểm cao nhất mỗi khối giấy chứng nhận
thi thi
Thí sinh đạt TOP 16% Thí sinh đạt TOP 16 Huy chương v|
Giải Bạc điểm cao nhất mỗi khối điểm cao nhất mỗi khối Giấy chứng nhận
thi thi
Thí sinh đạt TOP 24% Thí sinh đạt TOP 24% Huy chương v|
Giải Đồng điểm cao nhất mỗi khối điểm cao nhất mỗi khối Giấy chứng nhận
thi thi
Giải Thí sinh đạt mức điểm Thí sinh đạt mức điểm Giấy chứng nhận
Khuyến khích trên điểm s|n của BTC trên điểm s|n của BTC

Lưu ý:
- Vòng loại quốc gia không xếp giải. Khoảng 70% thí sinh có điểm cao nhất của Vòng
loại quốc gia sẽ được phép tham gia Vòng Chung kết quốc gia.
- Ban Tổ chức sắp xếp kết quả giảm dần dựa trên điểm thi v| ng|y sinh. Do đó, c{c thí
sinh bằng điểm có thể nhận hai giải kh{c nhau. Nếu một giải thưởng đã đủ chỉ tiêu, thí sinh
tiếp theo sẽ nhận giải thưởng mức liền kề phía dưới.
- C{c mốc điểm đạt giải có thể thay đổi dựa trên kết quả thi thực tế của tất cả thí sinh.
b) Hệ thống giải thưởng cho phần thi Dự án

Điều kiện xét giải

Huy chương Giải thưởng


Vòng Chung kết quốc gia Vòng Chung kết quốc tế

Thí sinh cao điểm nhất Thí sinh cao điểm nhất Cúp Vô địch v|
Giải Vô địch
mỗi khối thi mỗi khối thi Giấy chứng nhận
Giải Thí sinh đạt điểm cao thứ Thí sinh đạt điểm cao thứ Cúp Á quân 1 và
Á quân 1 hai mỗi khối thi hai mỗi khối thi Giấy chứng nhận

Giải Thí sinh đạt điểm cao thứ Thí sinh đạt điểm cao thứ Cúp Á quân 2 và
Á quân 2 ba mỗi khối thi ba mỗi khối thi Giấy chứng nhận
Thí sinh đạt TOP 8% điểm Thí sinh đạt TOP 8% điểm Cúp Giải V|ng v|
Giải Vàng
cao nhất mỗi khối thi cao nhất mỗi khối thi Giấy chứng nhận

6
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
Điều kiện xét giải

Huy chương Giải thưởng


Vòng Chung kết quốc gia Vòng Chung kết quốc tế

Thí sinh đạt TOP 16% Thí sinh đạt TOP 16% Cúp Giải Bạc v|
Giải Bạc
điểm cao nhất mỗi khối thi điểm cao nhất mỗi khối thi Giấy chứng nhận
Thí sinh đạt TOP 24% Thí sinh đạt TOP 24% Cúp Giải Đồng v|
Giải Đồng điểm cao nhất mỗi khối điểm cao nhất mỗi khối giấy chứng nhận
thi. thi.
Giải Thí sinh đạt mức điểm Thí sinh đạt mức điểm Giấy chứng nhận
Khuyến khích trên điểm s|n của BTC trên điểm s|n của BTC

2. Giải thưởng của Ban Tổ chức Việt Nam


a) Đối với thí sinh:
- Thí sinh cao điểm nhất Vòng Chung kết quốc gia được giải thưởng tiền m t 5.000.000
đồng (năm triệu đồng).
- Với mỗi khối có từ 100 thí sinh tham dự Vòng loại quốc gia, thí sinh cao điểm nhất
mỗi khối thi Vòng Chung kết quốc gia được giải thưởng tiền m t 2.000.000 đồng (hai triệu
đồng);
Với các giải thưởng tiền m t phía trên, nếu có nhiều hơn một thí sinh đạt giải, số tiền
thưởng được chia đều cho c{c thí sinh đạt giải. Mức giải thưởng có thể được mở rộng dựa
theo số lượng thí sinh đăng ký.
- Thí sinh đạt huy chương V|ng vòng Chung kết quốc gia v| đạt giải Vòng Chung kết
quốc tế HKICO 2022 được đ c c{ch miễn Vòng loại quốc gia kỳ thi HKICO năm học 2022-2023
v| c{c t ng thưởng lệ phí khi tham gia c{c kỳ thi trong năm học 2021-2022 trong Thông báo
của c{c kỳ thi.
b) Đối với Trường có học sinh tham dự:
- Trường có từ 100 học sinh tham gia Kỳ thi sẽ được t ng Giấy khen, Kỷ niệm chương
v| quảng b{ logo của trường trên tất cả c{c ấn phẩm truyền thông c{c Kỳ thi của Ban Tổ chức.
- Trường có từ 50 học sinh tham gia Kỳ thi sẽ được t ng Giấy khen, Kỷ niệm chương v|
quảng b{ logo của trường trên tất cả c{c ấn phẩm truyền thông về Kỳ thi.
- Trường có từ 20 học sinh tham gia Kỳ thi sẽ được t ng Giấy khen tham dự tích cực
trong Kỳ thi quốc tế.

7
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
Danh sách các trường tham gia tích cực và đạt thành tích cao tại các kỳ HKICO

1. TH v| THCS FPT Cầu Giấy - H| Nội; 23. EMASI Vạn Phúc - Hồ Chí Minh;
2. TH Vinschool Gardenia - H| Nội; 24. THCS v| THPT M.V.Lômônôxốp - H| Nội;
3. TH & THCS Victoria Thăng Long - H| Nội; 25. TH Đông Ngạc B - H| Nội;
4. TH & THCS Tây Úc - Hồ Chí Minh; 26. THCS Thanh Xuân - H| Nội;
5. PTLC Vinschool Times city - H| Nội; 27. THPT Nguyễn Gia Thiều - H| Nội;
6. TH & THCS Vinschool Thăng Long - H| Nội; 28. THPT Lê Hồng Phong - Quảng Ninh;
7. PTLC Olympia - H| Nội; 29. THPT FPT Cần Thơ - Cần Thơ;
8. TH Vinschool The Harmony - H| Nội; 30. Liên cấp Th|nh phố GD QT - IEC Quảng Ngãi;
9. PTLC Vinschool The Harmony - H| Nội; 31. THCS Nam Từ Liêm - H| Nội;
10. TH Nguyễn Du - H| Nội; 32. THCS Thượng C{t - H| Nội;
11. TH - THCS Pascal - H| Nội; 33. THCS Xu}n Đỉnh - H| Nội;
12. TH Mỹ Đình 1 - H| Nội; 34. TH Nhân Chính - H| Nội;
13. TH Trung Văn - H| Nội; 35. THCS Phú Diễn - H| Nội;
14. TH, THCS,THPT Skyline - Đ| Nẵng; 36. THPT Hiệp Hòa số 1 - Bắc Giang;
15. THCS Trưng Vương - H| Nội; 37. THCS Phương Liệt - H| Nội;
16. THCS Phúc Diễn - H| Nội; 38. TH Thịnh Liệt - H| Nội;
17. TH Tứ Liên - H| Nội; 39. TH Thượng Thanh - H| Nội;
18. THCS Lê Lợi - H| Nội; 40. THCS Phượng C{ch - H| Nội;
19. TH Mai Động - H| Nội; 41. THPT Huỳnh Văn Nghệ - Bình Dương;
20. TH Trần Nhật Duật - H| Nội; 42. THCS Chánh Phú Hòa - Bình Dương;
21. TH Lômônôxốp Mỹ Đình - H| Nội; 43. TH Giáp Bát - H| Nội;
22. TH Issac Newton - H| Nội;

8
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
Một số hình ảnh tiêu biểu của Kỳ thi Olympic Tin học quốc tế HKICO

9
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
ĐỀ SỐ 1
1. Consider the following Python script:
script.py

When you click on the file using a Windows file explorer, the script executes but you are
unable to see the output. How would you fix that?

A.
B. There is no output as the script has an error.

C.
D. There is nothing to output
E. None of the above

2. What is the output of the following code?

A. JamesJamesJamesJamesJamesJames
B. JamesJamesJamesJamesJames
C. JamesJamesJamesJames
D. JamesJamesJames
E. Error: invalid syntax

3. Analyze the given below code

A. You cannot use print(self) as a function name.


B. Program will print ‘Hello’ if we change print(d) to print(self.d)
10
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
C. Program has an error because class A does not have a constructor
D. Syntax Error
E. None of the above

4. What will be the output of the following code?

A. TutorialsPoint
B. Website
C. ('TutorialsPoint' , 'website')
D. It will show an Error.
E. None of the above

5. Given the following function fun1() Please select the correct function calls

A. fun1(name=’Emma’, age=23)
B. fun1(name=’Emma’, 23)
C. fun1(‘Emma’, 23)
D. fun1(Emma, 23)
E. fun1(nam = Emma, age= 23)

6. What is the output of the add() function call

A. 15
B. 8
C. (8,7)
D. 7
E. Syntax Error

7. 4 is 100 in binary and 11 is 1011. What is the output of the following bitwise operators?

A. 15
1
11
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
B. 14
1
C. 11
4
D. 15
2
E. 14
2

8. What is a correct syntax to output "Hello World" in Python?


A. echo("Hello World");
B. p("Hello World")
C. print("Hello World")
D. echo "Hello World"
E. None of the above

Refer to the following code for question 9 to 10

9. Jack executed the code with the python interpreter. What is the output?
A. There are some errors in the code so the output goes to error stream
B. Salary: 8000
C. Salary: 12000
D. Salary:
E. None of the above

10. If Jack wants to print ‚Salary: 12000 Salary: 8000‛ what will he do?
A. Add one more command line ‚print("Salary:", salary)‛ directly after ‚printSalary()‛
B. Add one more command line ‚print("Salary:", salary)‛ directly before ‚printSalary()‛
C. Add the command line ‚print("Salary:", salary)‛ to any position
D. Add the command line ‚printSalary()‛ to any position
E. None of the above

12
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
11. What is the output of the following code?

A. py
B. pyn
C. ynab
D. yn
E. pyna

12. What is the value of ‚Hello‛.upper().capitalize()?


A. ‚Hello‛
B. ‚hello‛
C. ‚HELLO‛
D. Runtime Error
E. None of the above

13. What is the statement evaluates the same to the statement below?

A. print ( 2*27*4)
B. print ( 2*3*4)
C. print ( 2*3**4)
D. print ( 2*3*3*4)
E. None of the above

14. Which method can be used to replace parts of a string?


A. replaceString() B. replace() C. repl() D. switch() E. replaceStr()

15. What is the value of res after executing this code

A. 15 B. 10 C. 5 D. (5, 10) E. Syntax Error

16. Which of the following is False?


A.
B.
C. [5] == [5]
D.
E.
13
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
17. What is the output of the following addition (+) operator

A. [10, 20, 30, 40]


[10, 20, 30, 40]
B. [10, 20]
[10, 20, 30, 40]
C. [10, 20, 30, 40]
[10, 20]
D. [40, 30, 20, 10]
[40, 30, 20, 10]
E. None of the above

18. Which of the following operators has the highest precedence?


A. not B. & C. * D. + E. -

19. What is the output of the expression print(-18 // 4)?


A. -4
B. 4
C. -5
D. 5
E. None of the above

20. What is the value of the var after the for loop completes its execution

A. 20 B. 21 C. 10 D. 30 E. None of the above

14
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
ĐỀ SỐ 2

1. Which of the following statements is true?


A. Python is an interpreted language.
B. Python is a high-level programming language.
C. Python is an object-oriented language.
D. All of the above.
E. None of the above

2. What is output of:

A. foo\bar
baz
B. foo\\barnbaz
C. foo\bar\nbaz
D. foo\\bar\nbaz
E. None of the above

3. In the Python statement x = a + 5 - b:


 a and b are ________
 a + 5 - b is ________
A. operators, a statement
B. operands, an expression
C. operands, an equation
D. terms, a group
E. operators, an expression

4. Suppose s is assigned as follows:

All of the following expressions produce the same result except one. Which one?
A. s[::5]
B. s[0] + s[-1]
C. s[::-1][::-5]
D. s[::-1][-1] + s[len(s)-1]
E. s[::-5]

15
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
5. What is the output of the following code?

A. 4
B. 1
2
4
C. 1
2
3
4
D. 1
E. It doesn’t generate any output.

6. What is the output of the following code?

A. 0 0
B. 1 1
C. 2 2
D. x y
E. None None

7. What is the output of the following program?

A. 1 B. 7 C. 10 D. 24 E. Syntax Error

16
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
8. Which of the following operators has the lowest precedence?
A. **
B. +
C. and
D. %
E. not

9. What is the output of the following code?

A. The program gives an error because there is no constructor for class Test.
B. Signature for the print method is incorrect, so an error is thrown.
C. Python class
D. The above code will execute correctly on changing print(s) to print(self.s).
E. The program executed with errors

10. What will be the output of the following code?

A. counter is 101 , number of times is 0


B. counter is 100, number of times is 0
C. counter is 100, number of times is 100
D. counter is 101, number of times is 101
E. counter is 0, number of times is 0

17
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
11. What gets printed?

A. 4
B. 3
C. 2
D. 1
E. 7

12. Which numbers are printed?

A. 2, 4, 6
B. 0, 1, 2, 4, 5, 6
C. 0, 1, 4, 5
D. 0, 1, 4, 5, 6, 7, 8, 9
E. 1, 2, 4, 5, 6

13. Consider the following code,

What is the output?


A. 1
B. 2
C. 3
D. 4
E. 5

18
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
14. What will be the output of the following Python code snippet if x = 1?

A. 4
B. 2
C. 1
D. 8
E. 10

15. What is the output of the code below:

A. 3
B. 4
C. 5
D. 1
E. 2

16. Which of the following expressions results in an error?


A. int(1011)
B. int(‘1011’,23)
C. int(1011,2)
D. int(‘1011’)
E. None of the above

17. What is the output of the following Python code?

A. (123, 'techbeamers', 123, 'techbeamers')


B. (123, 'techbeamers') * 2
C. (123, 123)
D. ('techbeamers', 'techbeamers')
E. None of the above

18. Which of the following function checks that all characters of a string are in upper case?
A. join(seq)
B. en(string)
C. isupper()
D. ljust(width[, fillchar])
E. None of the above

19
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
19. What is the output of the following code:

A. 1
B. 2
C. 6
D. 10
E. An exception is thrown

20. What is the output of the following program?

A. a = 10
B. a = 20
C. a = 30
D. a = 10 a = 30
E. None of the above

20
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
ĐỀ SỐ 3
1. Which of the following is correct?
A. Comments are for programmers for better understanding of the program.
B. Python Interpreter ignores comment.
C. You can write multi-line comments in Python using triple quotes, either ''' or """.
D. All of the above
E. None of the above

2. Consider you import a module (hello) into a Python script (script.py) that you are
working on. Simultaneously you realize that the module is missing a statement, so you
update the module. To make sure your current script imports these new changes in your
Python session, what do you need to do?
A. Import importlib and use reload to import the new changes into the module.

B. The Python interpretor will detect the updates in the module.

C. Import importlib and use reload to import the new changes into the module.

D. Do nothing
E. None of the above

3. Consider the following code:

After these are executed, what is the value of y?


A. 0
B. 1
C. True
D. False
E. None of the above

21
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
4. What is the output of the print() function call?

A. True
B. False
C. foo
D. bar
E. Syntax Error

5. Which one of the following if statements will not execute successfully?


A.

B.

C.

D.

E.

22
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
6. What is the output of the following code?

A. 0 0
B. 1 1
C. 2 2
D. 4 4
E. 4 6

7. What gets printed as the output of the below code?

A. 1
B. 2
C. 3
D. 4
E. None of the above

8. Which one of the following comments is syntactically incorrect?


A.

23
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
B.

C.

D.

E.

9. What will be the output of the following code?

A. The program has an error because class Test does not have a constructor.
B. The above code produces an error because the definition of print(s) does not include.
C. It executes successfully but prints nothing.
D. The program has an error because of the constructor call is made without an
argument.
E. None of the above

24
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
10. What is the output of the following code?

A. 0 0
B. 1 2
C. 1 0
D. 0 2
E. 2 1

11. What gets printed?

A. Foo
B. foo foo
C. foo 2
D. 2
E. An exception is thrown

12. Consider the following code,

What is the output?


A. 7
B. 6
C. 4
D. 2
E. 1
25
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
13. What will be the value of x in the following Python expression?

A. 8 B. 4 C. 2 D. 1 E. None of the above

14. To find the decimal value of 1111, that is 15, we can use the function:
A. int(1111,10)
B. int(‘1111’,10)
C. int(1111,2)
D. int(‘1111’,2)
E. None of the above

15. What is the output after executing this code?

A. 21 B. 28 C. 7 D. 10 E. 12

16. What does the below code intended to do?

A. defines an empty class.


B. defines a method, which passes its parameters through.
C. defines a function, which does nothing.
D. defines a set and initializes it.
E. None of the above

17. What is the output of the following code:

A. 1 B. 2 C. 6 D. 10 E. An exception is thrown

26
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
18. What gets printed assuming the user enters 'foo' at the prompt?

A. f
B. foo
C. Not a number
D. An exception is thrown
E. None of the above

19. What is the output from this print() function called?

A. 3 1 1
B. 3 1 0
C. 3 2 1
D. 3 1 2
E. None of the above

20. What is the output of the following code?

A. Python
B. line
C. Java
D. Java
Python
E. None of the above

27
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
ĐỀ SỐ 4

1. What is the purpose of in the following codes?

A. It is a programming convention as main() is also presented in other languages like


C/C++ or Java
B. Prevent main() from being executed when imported as module
C. The code would not execute without this definition
D. It is meaningless
E. None of the above

2. What is the value of the following?

A. 72
B. 72, 101, 108, 108, 111
C. 108
D. 111
E. None of the above

3. What is the output of the program?

A. 0 B. 244 C. 422 D. 10 E. None of the above

4. Which of the following options could be filled in line 4 of the following code (as
indicated with comments) to print the key and value of the dictionary line-by-line?

28
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
A.
B.
C.
D. All of the above
E. None of the above

5. Following is a definition of a recursive function, what is the value of ?

A. The recursive function never terminates


B. -1
C. 5
D. 0
E. None of the above

6. What is the output of the following program?

A. 5
B. 0
C. None
D. <__main__.C object at 0x7ff2ac534190>
E. None of the above

7. What is the value of ?


A. 1.5
B. 0
C. ‚12.03-4.5‛
D. Runtime Error
E. None of the above

8. Which of the following is a valid module import statement?


A. from * import sys
B. import sys from io
C. import sys as sys
D. import * from sys
E. None of the above
29
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
Refer to the following code for question 9 to 11

9. Tommy executed the code with the python interpreter, but there is no output, why?
A. There are some errors in the code so the output goes to error stream
B. The program is still waiting for user input
C. main() is not invoked
D. No module is imported yet
E. None of the above

10. After fixing the problem as indicated in question 9, the code runs into error after printing
‚I have your number!‛, which line would the interpreter be telling?
A. Line 2
B. Line 3
C. Line 4
D. Line 5
E. Line 7

11. What is the error?


A. str cannot be used as a variable name
B. Input is invalid
C. Input cannot be converted to int
D. str is not callable
E. None of the above

12. What is the value of ?


A. ‚Hey‛
B. ‚hey‛
C. ‚HEY‛
D. Runtime Error
E. None of the above

13. Consider the following code,

Is ?

30
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
A. True
B. False
C. Undetermined
D. Runtime Error
E. None of the above

14. Which of the following is not a built-in function?


A. ord()
B. hasattr()
C. callable()
D. nullable()
E. None of the above

15. What is the value of arr after executing this code?

A. 0
B. [1, 2, 3]
C. [1, 3, 5]
D. [1, 0, 5]
E. None of the above

16. Which of the following is False?

A.
B.
C.
D.
E. None of the above

17. Given the code:

Which of the following(s) is/are true?

31
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
A.
B.
C.
D. All of the above
E. None of the above

18. What is the output of the program?

A. 7
B. [1, 2, 3]
C. [1, 2, 3, None, None, None, 7]
D. [1, 2, 3, 7]
E. None of the above

19. What is the value of the following?

A. [0, 1, 4, 9, 16]
B. [4, 1, 0]
C. [16, 9, 4]
D. [16, 9, 4, 1, 0]
E. None of the above

20. What is the expected output of the program?

A. None
B. a
C. C
D. 2
E. None of the above

32
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
ĐỀ SỐ 5

Đề thi vòng loại quốc gia năm học 2019 – 2020

1. What is output of –
33 == 33.0
A. True
B. False
C. 33
D. Error
E. None of the above

2. What is output for −


b = *11,13,15,17,19,21+
ptint(b*::2+)
A. *19, 21+
B. *11, 15+
C. *11, 15, 19+
D. *13, 17, 21+
E. *13, 17, 19, 21+

3. Analyze the given below code?

A. Recursive Function 24.


B. Recursive Function
C. Function runs infinitely and causes a StackOverflowError.
D. Syntax Error.
E. None of the above

4. What is the output of the following code?

A.6
B. 33
C.123
D.1+2+3
E. Error. Mixing operators between numbers and strings are not supported
33
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
5. What is the output of the following displayPerson() function called?

A. Emma
25
B. name
age
C. 25
D. TypeError
E. None of the above

6. What is the output of the following function called?

A. 5
B. 15
C. (15, 5)
D. 10
E. Syntax Error

7. What is the output of print(2%6)?


A. 0.33
B. 2
C. 6
D. Value Error
E. None of the above

8. How do you insert COMMENTS in Python code?


A. /*This is a comment*/
B. //This is a comment
C. #This is a comment
D. ‘This is a comment
E. None of the above
34
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
9. What is the output of the following code?

A. 20
B. 24
C. 30
D. 40
E. The program executed with errors

10. Jack executed the code with the python interpreter:

What is the output?


A. *‘Jon’, ‘Kelly’, ‘Jessa’, ‘Scott’+
B. *‘Jon’, ‘Kelly’, ‘Scott’, ‘Jessa’+
C. *‘Jon’, ‘Scott’, ‘Kelly’, ‘Jessa’+
D. *‘Scott’ ,‘Jon’, ‘Kelly’, ‘Jessa’+
E. The program executed with errors

11. What is the output of the following code?

A. jam
B. dno
C. dnoBsemaj
D. maj
E. james

12. What is the value of ‚Hello‛.lower().capitalize() ?


A. ‚Hello‛
B. ‚hello‛
C. ‚HELLO‛
D. Runtime Error
E. None of the above

35
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
13. Consider the following code,

What is the output?


A. True
B. False
C. 50
D. 100
E. None of the above

14. Which method can be used to remove any whitespace from both the beginning and the
end of a string?
A. ptrim() B. trim() C. len() D. strip() E. None of the above

15. What is the output of the add() function called?

A. 8 B. 15 C. (8, 7) D. Syntax Error E. None of the above

16. Which of the following is False?

A.
B.
C.
D. All of the above
E. None of the above

17. Choose the correct function declaration of fun1() so that we can execute the following
function call successfully?

A. def fun1(*data)
B. def fun1(**kwargs)
C. def fun1(args*)
D. No, it is not possible in Python
E. None of the above

36
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
18. What is the output of the following code?
print(bool(0), bool(3.14159), bool(-3), bool(1.0+1j))
A. True True False True
B. False True True True
C. True True False True
D. False True False True
E. None of the above

19. What is the output of the following assignment operator?

A. 10
B. 12
C. 1
D. 2
E. Syntax Error

20. Given the nested if-else above, what will x become after the above statement is executed?

A. 0
B. 4
C. 2
D. 3
E. None of the above

37
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
ĐỀ SỐ 6

Đề thi vòng chung kết quốc gia năm học 2020 – 2021

1. Which of the following is a valid list?


A. [ 3 = 5, 4 = 0, 6 = 10 ]
B. [ 3:5, 4:0, 6:10 ]
C. [[0][0:4]]
D. [ "A", "B", len=6 ]
E. None of the above

2. Which of the following statements equals to False?


A. False and False | True
B. True && not False || False
C. True || False and not True
D. False or True and True
E. None of the above

3. Which of the following features does not exist as of Python 3.7?


A. f-string
B. breakpoint()
C. dataclass
D. walrus operator :=
E. None of the above

4. Which of the following is not a Python built-in types?


A. int
B. double
C. complex
D. list
E. All of the above

5. What is the output of the following program?

class A: pass
def main():
print(callable(main) == callable(A))
main()

A. True
B. False
C. None
D. Runtime Error
E. None of the above

38
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
6. What is the value of the expression -20 // -7 % 3?
A. -1
B. -2
C. 0
D. 1
E. 2

7. What is the output of the following program?

def func(a = [], b = 2):


a.extend(range(b))
return len(a)

def main():
print(func(b = func()))

main()

A. 1
B. 2
C. 3
D. 4
E. None of the above (including runtime error)

8. Suppose there exists a file "a.py" in the working directory. Which of the following
expressions evaluates to True in Windows (after importing the correct modules)?

import os
import pathlib

A. os.stat("a.py").st_ctime == pathlib.Path("a.py").stat().st_birthtime
B. pathlib.Path("a.py").stat().st_birthtime == os.path.getctime("a.py")
C. os.path.getbirthtime("a.py") == pathlib("a.py").stat().st_birthtime
D. os.stat("a.py").st_ctime == os.path.getctime("a.py")
E. None of the above

9. Which of the following expressions evaluates to True?


A. double(3.213322459373) == 3.213322459373
B. float(3.2210593) == 3.2210593
C. int(3.221) == 3.221
D. All of the above
E. None of the above

39
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
10. What is the output of the following code?
class A:
__a = 0

@property
def a(self): return eval(self.__a)

@a.setter
def a(self, value): self.__a = value

a = A()
b=2
c=3
a.a = "b + c"
b=5
print(a.a)
A. 2
B. 3
C. 5
D. 8
E. None of the above

11. What is the value of the following expression?

list(dict.fromkeys([3,2,2,1,1,2]))

A. { 3: 2, 2: 1, 1: 2 }
B. [3, 2, 2, 1, 1, 2]
C. [3, 2, 1]
D. [(3, 2), (2, 1), (1, 2)]
E. None of the above

12. What is the output of the following code?

a = 100,000,000
print(str(a)[1])

A. 0
B. 1
C. None
D. (
E. None of the above

40
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
13. What is the output of the following code after user input "10" (without the quotes)?

a = input()
b = a + 20
print(b[1])

A. 0
B. 1020
C. None
D. 30
E. None of the above

14. What is the value of the following expression?

len([range(5)][-2:])

A. 1
B. 5
C. 0
D. -2
E. None of the above

15. What is the output of the following code?


class A:
def __enter__(self):
print(end="OK")
def __exit__(self, a, b, c):
print(end="HI")

with A():
print(end="BYE")
A. OKHIBYE
B. HIOKBYE
C. OKBYEHI
D. HIBYEOK
E. None of the above

16. What is the output of the following code?

for i in range(13):
if i // -3 == -1:
break
print(i // -3)
else:
print("HI")

41
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
A. 0
B.
C 1
. 0
-1
-1
-1
-2
-2
-2
-3
-3
-3
-4
-4
-4
HI
D. HI
E. None of the above

17. What is the output of the following program?


import functools
a = [1, 2, 3, 4, 5]
print(functools.reduce(lambda x, y: x * y // 2, a))
A. 0
B. 5
C. 7.5
D. [1, 2, 3, 4, 5]
E. None of the above

18. What is the value of the following expression?

list(filter(lambda x: x % 3, range(10)))[:-2][-2]

A. 3
B. 4
C. [0, 1, 4, 5, 7, 8]
D. [4, 5]
E. None of the above

19. What is the output of the following program?


a = list(range(5), range(2))
a.reverse()
print(a[0][0])

42
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
A. range(0, 5)
B. range(0, 2)
C. 1
D. 4
E. None of the above

20. What is the output of the following program?


a=4
def func(a = 6):
print(end=str(a))
a=2
a=3
func(a = 1)
print(end=str(a))
A. 61
B. 42
C. 13
D. 11
E. None of the above

43
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
ĐỀ SỐ 7

Đề thi vòng chung kết quốc gia năm học 2019 – 2020

1. What is the purpose of in code like?

A. Aesthetic consideration
B. The code would not executed without this definition
C. Prevent main() from being executed when imported as module
D. It is a programming convention as main() also presented in other languages like
C/C++ or Java
E. None of the above

2. Why can be executed without error but cannot?


A. Invalid type, number 2 is not a string
B. Argument ‚output‛ for function print() only accepts list
C. end = ‚2‛ is omitted by print() function
D. All of the above
E. None of the above

3. Does the following code have errors during execution? If so, what is it?

A. No, the code doesn’t have errors


B. Yes, unidentified syntax (semicolon)
C. Yes, integer cannot add with float
D. Yes, expression a + b does not have a left hand side operator
E. None of the above

44
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
4. What is the expected output of the following code?

A.
B.
C.
D.
E. None of the above

5. What is the expected output of the following code?

A. abcd
B. dbce
C. edcb
D. dcea
E. None of the above

6. What is the value of ?


A. 0
B. 10
C. 170
D. 495
E. None of the above

45
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
7. The following code produces runtime error,

What is the cause the interpreter would show?


A. Argument type for func() is indeterminate
B. Return type for func() is indeterminate
C. Unsupported operand types for ‘+’
D. main() arguments is not supported
E. None of the above

8. What could be filled in place of line 4 in the following code (indicated with comments) so
that the expected output is ?

A.
B.
C.
D.
E. None of the above

46
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
Refer to the following code for question 9 to 11:

There could be different implementations of fib method:

I.

II.

III.

IV.

47
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
9. Which implementation is fastest?
A. I
B. II
C. III
D. V
E. They have the same performance

10. Which implementation(s) consumes most memory during execution?


A. I & II
B. I
C. II & III
D. IV
E. No memory is needed at all

11. Implementation I doesn’t use for-loop, implementation II doesn’t use if, implementation
III doesn’t invoke itself, implementation IV invoke itself once in each iteration. Which of
the following is a correct statement?
A. Implementation without for-loop is always the fastest
B. Implementation with less memory usage is always the fastest
C. Shorter the implementation, faster the execution
D. Recursion is always the fastest
E. None of the above

12. What is the expected output of the following code?

A.
B.
C.
D.
E.

48
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
Refer to the following code for question 13 to 15:

13. Which of the following is a correct statement describing the relationship of class A, B and
C?
A. Class A inherits class B and C and invoking initializer of parent class B
B. Class B and C inherits class A and both class implicitly invoke initializer of class A
C. Class C is a subclass of class B and both are subclass of class A
D. The code is not correct and would produce syntax error
E. None of the above

14. What is the expected output of the code?


A.

B.

C.

D. The code has runtime error


E. None of the above

49
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
15. What is ‚c‛ in line 8 is? And ‚self.c‛ in line 10?
A. Empty variable, integral variable
B. Class variable, instance variable
C. Member variable, constructor variable
D. The code is not correct syntax-wise
E. None of the above

16. What is the expected output of the following code?

A.
B.
C.
D.
E. None of the above

Refer to the following code for question 17 to 18:

17. Expression in line 8 evaluates to? If False, what is the reason they are
not equal?
A. True
B. False, new list instances are created (and returned) each time func is invoked
C. False, variable i is modified between two func call so the values in the list are not the
same
D. The code would result in runtime error
E. None of the above

50
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
18. What is the value of b in line 11?

A.
B.
C.
D.
E. None of the above

19. Given the code:

Which of the following is equivalent to the expression ?

A.
B.
C.
D. All of the above
E. None of the above

20.
Given the code: And its output:

What is the value of the expression ? If False, what is the appropriate reason?
A. True
B. False, list a is consumed but b is not, because list a is not explicit
C. False, every instance of list does not equal (evaluate to True) in case of ‘==’ operator
D. False, values of elements are not equal in list a and b, they appear to be the same
when printed out
E. None of the above

51
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
ĐÁP ÁN THAM KHẢO
ĐỀ SỐ 1
Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n
1 C 6 C 11 D 16 E
2 A 7 A 12 C 17 A
3 B 8 C 13 A 18 C
4 B 9 C 14 B 19 C
5 A 10 A 15 A 20 B

ĐỀ SỐ 2
Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n
1 D 6 B 11 A 16 C
2 D 7 C 12 C 17 A
3 B 8 C 13 D 18 C
4 E 9 D 14 A 19 D
5 B 10 B 15 A 20 B

ĐỀ SỐ 3
Câu Đ{p {n Câu Đ{p án Câu Đ{p {n Câu Đ{p {n
1 D 6 E 11 E 16 C
2 A 7 C 12 B 17 C
3 C 8 D 13 A 18 B
4 A 9 D 14 D 19 D
5 E 10 B 15 A 20 C

ĐỀ SỐ 4
Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n
1 B 6 C 11 D 16 C
2 C 7 D 12 A 17 E
3 D 8 C 13 A 18 D
4 C 9 C 14 D 19 B
5 D 10 E 15 D 20 D

52
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
ĐỀ SỐ 5
Đề thi vòng loại quốc gia năm học 2020 – 2021

Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n


1 A 6 B 11 D 16 E
2 C 7 B 12 A 17 A
3 C 8 C 13 C 18 B
4 E 9 C 14 D 19 E
5 D 10 E 15 C 20 D

ĐỀ SỐ 6
Đề thi vòng chung kết quốc gia năm học 2020 – 2021

Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n


1 C 6 E 11 C 16 A
2 A 7 D 12 B 17 B
3 D 8 D 13 E 18 B
4 B 9 B 14 A 19 E
5 A 10 D 15 C 20 C

ĐỀ SỐ 7
Đề thi vòng chung kết quốc gia năm học 2019 – 2020

Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n Câu Đ{p {n


1 C 6 B 11 B 16 B
2 E 7 C 12 C 17 A
3 E 8 C 13 E 18 C
4 B 9 B 14 E 19 D
5 D 10 C 15 E 20 D

53
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
MỘT SỐ CÁC KỲ THI OLYMPIC QUỐC TẾ TIÊU BIỂU KHÁC

Đón đầu xu thế hội nhập và hợp tác quốc tế trong lĩnh vực giáo dục và đ|o tạo, tiếp
cận cuộc cách mạng công nghiệp 4.0, đến nay Công ty Cổ phần Giáo dục FERMAT đã chứng
tỏ được năng lực làm việc với các tổ chức giáo dục có uy tín trên thế giới v| được tin tưởng ủy
quyền triển khai, tổ chức và phối hợp tổ chức cùng c{c đơn vị giáo dục Việt Nam nhiều kỳ thi
Olympic về Toán, Tin, Khoa học và tiếng Anh.
Các kỳ thi tổ chức tại nhiều hội đồng thi trên khắp cả nước, với đông đảo học sinh từ
mẫu gi{o cho đến lớp 12 tại h|ng trăm trường học tham dự.

Lễ khai mạc Vòng Chung kết quốc gia HKIMO Đoàn học sinh check-in tại Vòng loại quốc
2021 tại trường THCS Lê Lợi, Hà Đông, Hà Nội gia HIPPO 2021

Đoàn trường TH Hạ Long, Quảng Ninh tham gia Vòng Chug kết quốc tế TIMO 2021

54
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
1. Các Kỳ thi Olympic Toán quốc tế

2. Các Kỳ thi Olympic Tiếng Anh và Ngôn ngữ quốc tế

3. Các Kỳ thi Olympic Khoa học, Tin học, Nghệ Thuật

55
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
4. Một số hình ảnh, khoảnh khắc đẹp qua các mùa thi
a. Hình ảnh thí sinh tham gia dự thi

56
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
b. Hình ảnh Huy chương, Giấy chứng nhận

57
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
THÔNG TIN LIÊN HỆ

Để biết thêm thông tin cập nhật về các kỳ thi Olympic, quý lãnh đạo, quý thầy cô, quý
phụ huynh và các em học sinh vui lòng truy cập c{c địa chỉ dưới đ}y:
- Fanpage: Tổng hợp các Kỳ thi Olympic Quốc tế - Olympic Việt Nam -
https://www.facebook.com/Olympic.FERMAT/
- Website: http://olympic.fermat.edu.vn/
------------------------
Ban Tổ chức các Kỳ thi Olympic
Công ty Cổ phần Giáo dục FERMAT
1. Địa chỉ: Số 6A1, Tiểu khu Ngọc Kh{nh, Ba Đình, H| Nội.
2. Qua email: Olympic.FERMAT@gmail.com
3. Qua số điện thoại hỗ trợ: 0917 830455 - 024 66572055

58
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055
59
KỲ THI OLYMPIC TIN HỌC QUỐC TẾ HKICO (HongKong International Computational Olympiad)
FERMAT Education: Số 6A1 tiểu khu Ngọc Khánh, Ba Đình, Hà Nội – 0917830455 / 02466572055

You might also like