Something went wrong. Try again.
Code for the Advent of Code event
aoc advent-of-code
Something went wrong. Try again.
447 B · 23 lines
Ruby
at rust
123456789101112131415161718192021222324# frozen_string_literal: true
module AoC # Math helper stuff module Math class << self # @param x [Numeric] # @param y [Numeric] # @return [Numeric] def cantor2(x, y) (((x + y) * (x + y + 1)) / 2) + y end
# @param x [Numeric] # @param y [Numeric] # @param z [Numeric] # @return [Numeric] def cantor3(x, y, z) cantor(cantor(x, y), z) end end endend