Skip to Content

Documentation

Guides and reference for CP Lang 0.3 (beta).

CP Lang is in beta. Every example on this site carries a badge set by the compiler: runs means it runs today, checks means the checker accepts it but it doesn't run yet, and 0.3 spec means it is written to the spec and the compiler doesn't accept it yet.

let n: 1..=2e5 = read()
domain V = 1..=n
let a: [V]Int = read()
print(a.sum())