import java.util.*;

class Solution
{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    for (int I = 1; I <= N; ++I) {

      //System.out.println("Scenario " + I + ":");

      // read
      int a = sc.nextInt();
      int k = sc.nextInt();

      ArrayList<Integer> v = new ArrayList<Integer>();
      for (int i = 0; i < a; ++i)
        v.add(sc.nextInt());

      Collections.sort(v);

      // compute possible scores with a single dart
      SortedSet<Integer> scores = new TreeSet<Integer>();
      scores.add(0);
      for (int i = 0; i < a-1; ++i) {
        scores.add(v.get(i));
        scores.add(2*v.get(i));
        scores.add(3*v.get(i));
      }
      scores.add(v.get(a-1));
      scores.add(2*v.get(a-1));

      // throw darts
      boolean[] dp = new boolean[scores.last() * k + 1];
      SortedSet<Integer> allScores = new TreeSet<Integer>(scores);
      for (int i = 1; i < k; ++i) {
        SortedSet<Integer> currentAllScores = new TreeSet<Integer>(allScores);
        for (int s : currentAllScores)
          for (int t : scores)
            if (!dp[s + t]) {
              allScores.add(s + t);
              dp[s+t] = true;
            }
      }
      System.out.println("Scenario #" + I + ":");
      System.out.println(allScores.size());
      System.out.println();
    }
  }
}

