mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-27 22:00:31 +01:00
Attempt at part two, OOM
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
variable "half" {
|
||||
variable "part" {
|
||||
type = number
|
||||
}
|
||||
|
||||
output "full" {
|
||||
value = tonumber("${var.half}${var.half}")
|
||||
variable "repetitions" {
|
||||
type = number
|
||||
}
|
||||
|
||||
locals {
|
||||
repeated = [for _ in range(var.repetitions) : tostring(var.part)]
|
||||
}
|
||||
|
||||
output "full" {
|
||||
value = join("", local.repeated)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user