@@ -0,0 +1,1155 @@
+package ru.sbulygin.start;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A%0A/**%0A * Created by anonymus on 15.05.17.%0A */%0Apublic class ExchengeCoins %7B%0A%0A    private void exch(int%5B%5D coins, List%3CInteger%3E usedCoins, int sum, int level) %7B%0A        if (level %3E= coins.length) %7B%0A            return;%0A        %7D%0A        while (sum %3E getSumm(usedCoins)) %7B%0A            exch(coins, new ArrayList%3C%3E(usedCoins), sum, level + 1);%0A            usedCoins.add(coins%5Blevel%5D);%0A            if (sum == getSumm(usedCoins)) %7B%0A                for (Integer index : usedCoins) %7B%0A                    System.out.print(index + %22 %22);%0A                %7D%0A                System.out.println();%0A%0A                break;%0A            %7D%0A        %7D%0A    %7D%0A%0A    private static int getSumm(List%3CInteger%3E all)%0A    %7B%0A        int summ = 0;%0A        for(int i = 0; i %3C all.size(); i++)%0A            summ += all.get(i);%0A        return summ;%0A    %7D%0A%0A    public void process(int%5B%5D coins, int sum) %7B%0A        exch(coins,  new ArrayList%3C%3E(), sum, 0);%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        ExchengeCoins coins = new ExchengeCoins();%0A        coins.process(new int%5B%5D%7B5, 1, 10%7D, 20);%0A%0A    %7D%0A%0A%0A%7D%0A

Add ADDITIONAL TASK