19
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
5
public class Program
6
{
7
public static void Main()
8
{
9
var a = new List<int>() { 1, 4, 4, 4, 4, 4 };
10
var b = new List<int>() { 3, 3, 3, 3, 5, 7 };
11
var c = new List<int>() { 2, 2, 2, 6, 6, 6 };
12
13
Func<List<int>, List<int>, double> fight = (ą, ę) => (double)ą.SelectMany(x => ę, (x, y) => x > y).Count(x => x) / 36;
14
15
Console.WriteLine(fight(a, b));
16
Console.WriteLine(fight(b, c));
17
Console.WriteLine(fight(c, a));
18
}
19
}
Cached Result
https://www.technologycrowds.com/favicon.ico