day11_part1.carbon 466 B

1234567891011121314151617181920
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. // https://adventofcode.com/2024/day/11
  5. import Core library "io";
  6. import library "day11_common";
  7. import library "io_utils";
  8. fn Run() {
  9. var n: i64;
  10. var total: i32 = 0;
  11. while (ReadInt(ref n)) {
  12. total += Count(n, 25);
  13. SkipSpaces();
  14. }
  15. Core.Print(total);
  16. }