Non brute force algorithm for Birthday Chocolate
You basically always need to use brute force here. There is no other way. However, you can do it a bit more efficiently.

You're redoing the whole summation in every step of the loop. You don't need to. You can compute the total with one subtraction and one addition in each step of the loop. Like this:

static int birthday(List&lt;int&gt; s, int d, int m) {
    int n = 0;
    int t = s.Take(m).Sum();
    for(int i = 1; i &lt; s.Count - m; i++) {
        if (t == d) n++;
        t = t - s[i - 1] + s[i + m];
    }
    return n;
}


I hope this makes sense, I never write C#. I got here because of your 'javascript' tag. The code might not work correctly, it is untested, but I hope you understand the intention.

However, I do think there's a bug in your code. You loop over the whole list, all the way to the end, where you cannot take m squares anymore. The sum() there might result in unexpected matches.