Skip to content
CCC Python Course

Clock and calendar arithmetic, modulo and periodicity

Stage
3
Module
M3.8
Lessons
1

In this module

  • Use modulo to work with periodic data like hours, days, and weeks.
  • Solve time-addition problems by adding and using modulo.
  • Recognize periodicity in data and apply modulo to reduce it.
  • Use modulo to handle wrap-around (circular) sequences.

Before this module

Lessons

  1. 1Clock and calendar arithmetic (modulo and periodicity)

Practice

Try these on the judges. Each link opens the problem on WMOJ or DMOJ.

  1. 2024 S1
    Hat Circle (opens on WMOJ in a new tab) WMOJ

    Compare values at paired positions around a circular arrangement, wrapping the index with modulo.

  2. 2017 J4
    Favourite Times (opens on DMOJ in a new tab) DMOJ

    Count occurrences of a periodic event across a long span, using cycles and a remainder.

    Why DMOJ: A periodicity problem matching this lesson's cycle-and-remainder pattern.