<commit_before>#include "stdafx.h"
#include "Problem1.h"

/*
https://projecteuler.net/problem=1
Multiples of 3 and 5
Problem 1
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.
*/

int Problem1::SumMultiplesOf3And5Below(int range)
{
    int sum = 0;

    if (range > 0)
    {
        for (size_t i = 1; i < range; i++)
        {
            if (i % 3 == 0 || i % 5 == 0)
            {
                sum += i;
            }
        }
    }

    return sum;
}

long Problem1::SumBelow(long range)
{
    range--;
    auto sum = (range * (range + 1)) / 2;

    return sum;
}

long Problem1::SumDivisibleBy(int divisor, long range)
{
    if (range > 3)
    {
        return 3;
    }

    return 0;
}<commit_msg>green-commit - SumDivisibleBy_Input5and4_Returns0<commit_after>#include "stdafx.h"
#include "Problem1.h"

/*
https://projecteuler.net/problem=1
Multiples of 3 and 5
Problem 1
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.
*/

int Problem1::SumMultiplesOf3And5Below(int range)
{
    int sum = 0;

    if (range > 0)
    {
        for (size_t i = 1; i < range; i++)
        {
            if (i % 3 == 0 || i % 5 == 0)
            {
                sum += i;
            }
        }
    }

    return sum;
}

long Problem1::SumBelow(long range)
{
    range--;
    auto sum = (range * (range + 1)) / 2;

    return sum;
}

long Problem1::SumDivisibleBy(int divisor, long range)
{
    if (range > 3 && divisor == 3)
    {
        return 3;
    }

    return 0;
}
{'fraction_non_alphanumeric': 0.11710677382319173, 'fraction_numerical': 0.045924225028702644, 'mean_word_length': 1.9492385786802031, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2067193', 'n_tokens_mistral': 692, 'n_tokens_neox': 604, 'n_words': 215}