Skip to content

Canadian Computing Competition

  • Register for an account here. For school number, enter 056404312
  • You are only allowed to use official language reference during the contest. Assuming you plan to use Python, this can be found here.
  • View practice problems from past contests here

A reminder that you need to match the input/output specifications exactly on the contest, since it is marked by computer. That means you will not include any prompts in your input statements.

Example

See the question here.

Correct Solution

Answer
n = int(input())
c = int(input())
p = int(input())

capacity = c * p

if n > capacity:
    print("no")
else:
    print("yes")

Incorrect Solution

Answer
n = int(input("What is your place in line?"))
c = int(input("How many cars the the train have?"))
p = int(input("How many people fit in a single car?"))

capacity = c * p

if n > capacity:
    print("You will not be on the next train")
else:
    print("You will be on the next train")