<commit_before>package euler;

import com.googlecode.totallylazy.Predicate;
import com.googlecode.totallylazy.Sequences;

import static com.googlecode.totallylazy.comparators.Comparators.ascending;
import static com.googlecode.totallylazy.numbers.Integers.range;
import static com.googlecode.totallylazy.numbers.Numbers.sum;

/*
 * This is an example solution.
 */
public class Problem32 {

    /*
        possible imperative solution:

        public static String solve() {
            int sum = 0;
            for (int i = 1; i < 10000; i++) {
                if (hasPandigitalProduct(i))
                    sum += i;
            }
            return Integer.toString(sum);
        }


        private static boolean hasPandigitalProduct(int n) {
            for (int i = 1; i <= n; i++) {
                if (n % i == 0 && isPandigital("" + n + i + n/i))
                    return true;<commit_msg>Add link to problem 32<commit_after>package euler;

import com.googlecode.totallylazy.Predicate;
import com.googlecode.totallylazy.Sequences;

import static com.googlecode.totallylazy.comparators.Comparators.ascending;
import static com.googlecode.totallylazy.numbers.Integers.range;
import static com.googlecode.totallylazy.numbers.Numbers.sum;

/*
 * This is an example solution. (https://projecteuler.net/problem=32)
 */
public class Problem32 {

    /*
        possible imperative solution:

        public static String solve() {
            int sum = 0;
            for (int i = 1; i < 10000; i++) {
                if (hasPandigitalProduct(i))
                    sum += i;
            }
            return Integer.toString(sum);
        }


        private static boolean hasPandigitalProduct(int n) {
            for (int i = 1; i <= n; i++) {
                if (n % i == 0 && isPandigital("" + n + i + n/i))
                    return true;
{'fraction_non_alphanumeric': 0.1078167115902965, 'fraction_numerical': 0.014016172506738544, 'mean_word_length': 2.1036789297658864, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '5696979', 'n_tokens_mistral': 590, 'n_tokens_neox': 540, 'n_words': 140}