fix types

This commit is contained in:
Adam Jeniski 2025-12-13 18:50:31 -10:00
parent ed5a433df3
commit eb0dbc61b7

View File

@ -13,7 +13,7 @@ struct Data {
using std::cout, std::endl, std::vector, std::ifstream;
int64_t part_1(const vector<Data> &);
unsigned long long part_2(const vector<Data> &);
int64_t part_2(const vector<Data> &);
int main() {
ifstream file{"input/2025-2.txt"};
@ -61,8 +61,8 @@ int64_t solve_n(int64_t n) {
return 0;
}
unsigned long long part_2(const vector<Data> &v) {
unsigned long long ans{0};
int64_t part_2(const vector<Data> &v) {
int64_t ans{0};
for (auto d : v) {
for (auto n{d.min}; n <= d.max; ++n) {
ans += solve_n(n);
@ -70,7 +70,7 @@ unsigned long long part_2(const vector<Data> &v) {
}
// todo: dead code, delete me
unsigned long long foobar = std::accumulate(v.begin(), v.end(), 0, [&ans](unsigned long long acc, Data d) {
int64_t foobar = std::accumulate(v.begin(), v.end(), 0, [&ans](int64_t acc, Data d) {
for (auto n{d.min}; n <= d.max; ++n) {
acc += solve_n(n);
}