CPP / LANG / 01
Python and AI for kids
For Grades 5 to 8, before Junior.
Open the syllabusCanada · Canadian Computing Competition · Past papers
Every CCC writer is told to "do past papers", and most do them badly: a quick read, a peek at the solution, and on to the next. The Centre for Education in Mathematics and Computing (CEMC) gives Canadian students an unusually good archive, free, and the same online grader the real contest uses. This guide shows where the past papers live, how the CCC Online Grader judges a submission, the pitfalls its own instructions warn about, a six-step method that makes one past problem worth an evening, and a small checker we wrote so students can test their programs exactly the way a grader does. We never reproduce CEMC's problems here; we point to them.
Teaching live online since 2020 · 10,000+ students · we link to CEMC's papers and never copy them
In short
CCC past papers, with solutions and results, are free on CEMC's past contests page, and the CCC Online Grader lets students submit old problems and get the real verdicts. They pay off when used slowly: attempt, test, compare, re-solve. Modern Age Coders runs this practice live online, batch or one to one, in its CCC Junior and Senior Preparation course.
Prepare with a teacher
Past papers are free; what a teacher adds is the review afterwards. These are the courses where that happens.

CPP / 01
Past papers worked weekly with a teacher, then timed three-hour sittings from January 2027.
Open the syllabus →
CPP / 02
For students who have exhausted the easy past problems and need the algorithms for the hard ones.
Open the syllabus →
CPP / 03
For a student whose past-paper attempts stall on the language, not the problem.
Open the syllabus →Where the papers are
Two CEMC systems hold the past CCC material, and they do different jobs. One is a library to read; the other is a judge to submit to. Every description below is from CEMC's own pages, read on 22 October 2026.
| Where | What CEMC says it holds | Use it for |
|---|---|---|
| Past contests, solutions and results | "Problems, solutions and results from previous years can be found in the table below." The text says "resources from the last 10 years"; the year filter lists 2016 to 2026. | Reading problems, official solutions and results booklets |
| CCC Online Grader | "It also provides access to practice problems and previous contests." CEMC calls it the place "where participants can create a free practice account and access previous contests". | Submitting your own program and getting real verdicts |
| Sample programs document | CEMC's example programs "illustrating input and output", one per language, with each compiler version | Checking how input should be read in your language |
| Practice Contest on the grader | CEMC: "We strongly recommend that every participant attempt the Practice Contest." | One rehearsal of the contest system before February 2027 |
CEMC states the purpose plainly: "These resources can be used by students to review and attempt past contests to gain a better understanding of the contest format and level of difficulty." It describes the archive as free, and its ordering terms add that "Resources are available on the CEMC website at no cost."
Notice the order in that sentence: attempt, then understand. The archive is built to be tried, not just read.
CEMC's terms say its materials are licensed under a Creative Commons Attribution-NonCommercial 4.0 International licence. We teach for a fee, so we treat CEMC's problems as theirs: we link to them, we discuss them in class with the original open on screen, and we write our own problems for anything we publish.
For families this has a useful side effect. A student who practises from CEMC's own archive is reading the real wording, formatting and constraints, not someone's retelling of them.
Sources: CEMC past contests, CEMC CCC page, CEMC terms and conditions and the CCC Online Grader home page, read 22 October 2026. We are not connected with CEMC or the University of Waterloo.
Getting in
The grader account a student practises with is the same one used on contest day, so it is worth setting up early in the school year. The steps follow the grader's registration page and its instructions document.
A student whose school does not take part in the CCC has no school number to register with. The grader's instructions also mention that each school has its own "school account" that teachers can use to submit solutions, so a teacher who supports a student's practice can try problems that way. For how entry to the contest itself works, CEMC's rules on the How contests work page apply.
The verdicts
Every past problem submitted to the grader comes back with one of six verdicts per test. Learning to read them is half of what past-paper practice is for. The verdict names and their examples are quoted from the grader's instructions; the right-hand column is our advice.
| Verdict | The grader's example | What to do next (ours) |
|---|---|---|
| correct | "your output matches the expected output exactly" | Move on, or try the problem again a week later from a blank file |
| wrong answer | "your program gave incorrect output" | Re-read the output section; then test the smallest and largest inputs by hand |
| time-limit exceeded | "your program took too long to find an answer" | Estimate the steps for the largest input; the method, not the code, usually needs to change |
| run-time error | "segmentation fault in your program" | Look for an index past the end of a list, a division by zero, or recursion that runs too deep |
| compilation error | "your program did not compile" | Check the language chosen in the menu, and for Java the class name |
| skipped test | "within one test batch, you have failed one of the tests, and thus the remainder of the tests within that batch have been skipped" | Fix the first failure in the batch; the skipped tests say nothing yet |
The CCC rules say "Feedback is always provided for the sample test cases." A program that fails the sample on the grader but passed it at home is almost always reading input differently from the way the grader supplies it.
The rules also fix the shape of input and output: standard input and standard output only, and "Submitted programs must not read or write to files."
The grader compares output with the expected answer exactly. That one fact explains most of the wrong answers we see from students who are sure their logic is right: an extra word, a missing line, a label in front of the number.
The checker in a later section is built to be just as strict, so those mistakes surface at home, before the grader sees them.
Pitfalls
The grader's instructions end with a short list headed "How to avoid common pitfalls". Each one is a mark lost by someone. The quotes are the instructions' own words; the fixes are ours.
| The instructions say | Our fix |
|---|---|
| Filenames should contain "only alphanumeric, underscore" or dash characters | Name files like j3.py or s2_v2.cpp; no spaces, no accents |
| "Python 2 programs and Python 3 programs are not interchangeable." | Always pick Python 3 in the menu unless you truly wrote Python 2 |
| Java programs must be in a file called Main.java, with public class Main | Start every Java practice file from that line |
| "Use at most one such input object to read from System.in." | One Scanner or one BufferedReader per Java program, created once |
| To get a perfect score, "fast input" is sometimes required | In C++, scanf or a faster cin setup; in Python, read sys.stdin.buffer once |
| Python's recursion depth can be raised with "sys.setrecursionlimit(limit)" | Raise it at the top of any recursive Python solution, or rewrite the recursion as a loop |
The instructions add a warning about live contests that is worth practising for: "the system will generate an automatic logout after approximately 10 minutes of inactivity." The timer keeps running, and the student can log in again and carry on while time remains. In a mock paper at home, a student who thinks for long stretches should expect to log in again, and not be thrown by it.
Method
This is the method our teachers use for every past CCC problem a student attempts. It is ours, and it is slow on purpose: one problem done this way teaches more than five read through.
A solution read too early feels like understanding and fades within days. A solution read after a real struggle answers a question the student has already asked, and it stays.
The re-solve a week later is the real test. If the student can write it again without looking, the idea has moved from CEMC's page into the student's head.
For every past problem: the year and number, the verdicts on each submission, the cause of each failure in one line, and the key idea of the solution in one sentence.
By February 2027, that notebook is a personal list of the mistakes most likely to cost marks on contest day, which is worth more than any list of tips.
A tool of ours
Students test at home by eye, and eyes forgive small differences. A grader does not. We wrote this short Python program for our students: it runs a solution on every test file in a folder and compares the output exactly, reporting verdicts in the grader's own words. It is ours, not CEMC's.
# Our local checker: runs a program on every .in file in a folder and
# compares its output with the matching .out file, exactly, like a grader.
# Usage: python judge.py tests python cold_days.py
import subprocess
import sys
import time
from pathlib import Path
LIMIT = 3.0 # seconds per test, the CCC default
def verdict(cmd, test_in, test_out):
start = time.time()
try:
run = subprocess.run(cmd, stdin=open(test_in), capture_output=True,
text=True, timeout=LIMIT)
except subprocess.TimeoutExpired:
return "time-limit exceeded"
if run.returncode != 0:
return "run-time error"
got = run.stdout.rstrip("\n").split("\n")
want = test_out.read_text().rstrip("\n").split("\n")
if got != want: # strict on purpose: even a trailing space fails
return "wrong answer"
return "correct (%.2f s)" % (time.time() - start)
folder, cmd = Path(sys.argv[1]), sys.argv[2:]
for test_in in sorted(folder.glob("*.in")):
print(test_in.name, verdict(cmd, test_in, test_in.with_suffix(".out")))Put each test in a folder as a pair of files, 01.in with the input and 01.out with the expected output. The checker gives each test three seconds, the CCC's default, and treats any difference, even a trailing space, as a wrong answer.
Our practice problem: Cold Days. Given N daily temperatures in degrees Celsius, print how many of them are below zero. Input: N on the first line, then N whole numbers on one line. Output: one integer. It is deliberately easy, because the point here is the checking, not the problem.
tests/01.in 5 -3 2 0 -11 4 tests/01.out 2
# Our practice problem: Cold Days (not a CEMC problem) n = int(input()) temps = list(map(int, input().split())) print(sum(1 for t in temps if t < 0))
# The same program with a friendly prompt: the grader marks it wrong
n = int(input("How many days? "))
temps = list(map(int, input().split()))
print(sum(1 for t in temps if t < 0))$ python judge.py tests python cold_days.py 01.in correct (0.03 s) 02.in correct (0.03 s) 03.in correct (0.03 s) $ python judge.py tests python cold_days_prompt.py 01.in wrong answer 02.in wrong answer 03.in wrong answer
Both programs count correctly. The second fails every test because the words "How many days? " are printed to standard output in front of the answer. The CCC rules forbid exactly this: output must match the problem's format, with no prompts. Times will differ on your computer.
Copy the sample input and output from the CEMC problem into 01.in and 01.out. Add your own tests from step 4 of the method as 02, 03 and so on. Run the checker after every change.
When everything says correct at home, submit to the grader. If the grader disagrees, you have learnt something specific about the hidden tests, which is the most useful thing a wrong answer can teach.
It does not know CEMC's hidden tests, measure memory, or reproduce the grader's exact speed. A program that is fast here may still time out on the grader's largest inputs.
It is a habit-builder: run, compare exactly, read the verdict. Students who use it stop losing marks to output formatting within a few weeks.
Order of work
With a full paper of five problems for each level in each year, the archive is large: our arithmetic gives up to 55 Junior and 55 Senior problems across the eleven years in the filter (11 x 5). Nobody needs all of them. This order is ours.
| Phase | Which problems | How many | Goal |
|---|---|---|---|
| 1. Across the years | Problem 1 from several recent Junior papers, then problem 2 | About 10 | Fluent input and output; every one correct on the first or second submission |
| 2. Middle of the paper | Junior problems 3 and 4 from recent years | About 10 | Counting, simulation and strings with careful reading |
| 3. The top of Junior | Junior problem 5, subtasks first | About 5 | Taking partial marks with a simple method |
| 4. Senior entry | Senior problems 1 and 2 | About 10 | Sorting, searching and efficient methods |
| 5. Full papers | Two or three whole papers at the chosen level, timed | 2 to 3 papers | Three hours of decisions, from January 2027 |
Doing the same question number across several years first lets a student meet one level of difficulty many times. Once problem 1 is reliably correct, problem 2, and so on. Whole papers come last, when the student can already handle each part.
Keep the two most recent years untouched until the end. They are the closest match to the next contest, and are worth saving for timed practice.
The contest bans outside help, and practice should copy that. The rules spell it out: "All other Internet use is forbidden. This includes email, chat, web search, code forums, and generative AI".
We ask students to practise with only the official language documentation open. A problem solved with a search engine open has not been solved by the student.
Where a student starts
How our teachers see a student's practice change over a season. The stages are ours.
| Stage | What it looks like |
|---|---|
| 1. Reading | Reads problems and solutions; submits rarely |
| 2. Submitting | Submits often, but fixes by trial and error |
| 3. Testing | Tests locally with own cases before each submission |
| 4. Re-solving | Re-solves old problems from memory and keeps a mistakes notebook |
Count submissions, not problems read. A week with three problems submitted and understood beats a week with ten skimmed.
Ask to see the mistakes notebook. Its length is a good sign, not a bad one.
Never open a solution before you have something to compare it with.
When the grader says wrong answer, believe it. Look for the case you did not test.
The catalogue
Taught live online by one regular teacher, as a batch or one to one, wherever in Canada the student lives.
CPP / LANG / 01
For Grades 5 to 8, before Junior.
Open the syllabusCPP / LANG / 02
For schools that teach Java.
Open the syllabusCPP / LANG / 03
For Senior and the CCO.
Open the syllabusCPP / PRAC / 01
Methods for the middle problems.
Open the syllabusCPP / PRAC / 02
For counting and reasoning questions.
Open the syllabusCPP / PRAC / 03
Java with exam discipline.
Open the syllabusCPP / FUR / 01
Beyond school contests.
Open the syllabusCPP / FUR / 02
For ages 18 and up.
Open the syllabusCPP / FUR / 03
Deeper Python, ages 18 and up.
Open the syllabusHow lessons run
Weekdays or weekends, flexible: choose your batch, or for a very personalised plan choose 1-on-1 at your convenience, weekend mornings or weekdays.
Weekdays
Short after-school sessions for one problem at a time.
Weekends
Weekend mornings for full timed papers.
1-on-1
A review of the student's own submissions, line by line.
Original problems opened from CEMC, never copied.
Every solution checked the way the grader checks it.
Each failed test turned into a lesson.
Old problems revisited from a blank file.
Students join from coast to coast.
Fifteen to twenty in a batch, or one student.
Student work
Between contest problems, our students build things. A selection follows; there are more on the student labs page.

AI and ML
An AI nutrition coach that reads what you eat and works you toward a target.

AI and ML
A chatbot that answers mathematics and programming questions, built and deployed by a student.

AI and ML
An assistant that helps a young person recognise unsafe situations online.

Web app
A weather forecasting site with live conditions for any location.
Fees
CEMC's past papers are free, and stay free in our classes. What we charge is a monthly fee for live teaching and review, with no contract, so a family can stop whenever the season ends.
Free first class
Free
no card required
Group batch
$100 USD
a month, eight live classes
One to one
$150 USD
a month, eight live classes
What families say
Reviews parents left on Google, unchanged.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
Questions from Canadian families
On CEMC's past contests, solutions and results page, which is free. Its year filter runs from 2016 to 2026. Past problems can also be opened and submitted on the CCC Online Grader.
Yes. CEMC publishes solutions alongside past problems and results in its archive. We suggest reading a solution only after at least twenty-five minutes of real effort, then re-solving the problem a week later.
Yes. The CCC Online Grader offers previous contests and practice problems, and gives the same verdicts as on contest day: correct, wrong answer, time-limit exceeded, run-time error, compilation error, or a skipped test.
Yes. The grader's registration page asks for the school's CEMC school number, which the math or computer science teacher has, and the teacher then authenticates the student. The school's password is never needed.
Each level has five problems a year. With the archive's filter covering 2016 to 2026, our count is up to 55 Junior and 55 Senior problems. Ten well-understood problems are worth more than fifty skimmed.
Problem 1 from several recent years, then problem 2. Doing the same question number across years builds reliability before a student faces full papers.
Most often the output is not exactly what the problem asks for, such as an input prompt or an extra word. Next most common are the wrong Python version in the menu, or input read in a different way from the grader's.
We advise against it, because the CCC rules forbid generative AI and web search during the contest, and practice should match the real conditions. Outside the contest, ChatGPT also needs a parent's permission for anyone under 18.
No. CEMC licenses its materials for non-commercial use, so we open CEMC's problems from its own site in class and write our own problems for anything we publish.
Weekdays or weekends, flexible: choose your batch, or for a very personalised plan choose 1-on-1 at your convenience, weekend mornings or weekdays. The time is set in Eastern time and given to you in your province's time.
Elsewhere on this site
More for Canadian students working through past contest problems.
Our CCC coaching, Junior and Senior.
The 2027 Junior paper, with original problems.
All our pages for families in Canada.
What to do after a wrong-answer verdict.
Reading an official solution properly.
A common first run-time surprise.
Start here
Bring a past CCC problem your child got stuck on, or let us choose one. The teacher works through the six-step method with the student live, and you see exactly how a past paper should be used.
Prefer to read first? How we teach shows a class in full, and the course list holds the syllabi.
WhatsApp us · +91 91233 66161 · connect@modernagecoders.com
Lessons happen over live video with teachers based in India; there is no centre to visit in Canada. WhatsApp is the quickest way to reach us.
A priority demo is a full class of about 45 to 60 minutes. After the class the mentor sends a written skill report and a personal learning roadmap on WhatsApp. If you enrol, the demo fee is adjusted against your first month's fee. Share your demo Order ID with us on WhatsApp and we take it off.
Book a priority demo