#include "aoc.h" #include namespace aoc2015 { int get_number(const char* p) { int d{0}; while(*p >= '0' && *p <= '9') { d = d * 10 + *p - '0'; p++; } return d; } std::pair day24(line_view file) { int total{0}; per_line(file,[&total](line_view lv){ total += get_number(lv.line); return true; }); int sub = total / 3; return {total, 0}; } }