blob: 9f879e89388c9fa25358db560ca4998f6926451e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
const print = std.debug.print;
const std = @import("std");
const tokenize = std.mem.tokenize;
pub fn main() void {
var count: usize = 0;
defer print("{}\n", .{ count });
var input = tokenize(@embedFile("input"), "\n");
while (input.next()) |line| {
var output = tokenize(line[61..], " ");
while (output.next()) |digit|
switch (digit.len) {
2, 3, 4, 7 => count += 1,
else => {},
};
}
}
|