package ru.redguy.tasks;

import com.google.common.collect.Lists;
import javafx.util.Pair;
import ru.redguy.ATask;
import ru.redguy.Task;

import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;

@ATask("135")
public class Task135 extends Task {
    @Override
    public void run() throws IOException {
        List<Integer> been = new ArrayList<>();

        System.out.println(task(task(task(Lists.newArrayList(2)))).stream().filter((num) -> {
            if(been.contains(num))
                return false;
            been.add(num);
            return true;
        }).count());
    }

    public List<Integer> task(List<Integer> list) {
        List<Integer> result = new ArrayList<>();

        for(int num : list) {
            result.add(num+2);
            result.add(num*3);
        }

        return result;
    }
}
