You are viewing a single comment's thread. Return to all comments →
public static void countApplesAndOranges(int s, int t, int a, int b, List<int> apples, List<int> oranges) { var applesInside = apples.Where(ap => (ap + a) >= s && (ap + a) <= t).Count(); var orangesInside = oranges.Where(or => (or + b) >= s && (or + b) <= t).Count(); Console.WriteLine(applesInside); Console.WriteLine(orangesInside); }
Seems like cookies are disabled on this browser, please enable them to open this website
Apple and Orange
You are viewing a single comment's thread. Return to all comments →