diff --git a/27.EGE/1 b/27.EGE/1 new file mode 100644 index 0000000..7d115dc --- /dev/null +++ b/27.EGE/1 @@ -0,0 +1,48 @@ +using System; +using System.Diagnostics; +using System.Threading; + +class Program +{ + static void Main(string[] args) + { + + int N = 4; + int num = 0; + int d = 0; + int min = 1001; + int[] b = new int[9]; + int[] a = new int[N]; + for (int i = 0; i < a.Length; i++) + a[i] = Convert.ToInt32(Console.ReadLine()); + for (int i = 0; i < a.Length; i++) + { + while (a[i] > 0) + { + num = a[i]; + a[i] /= 10; + + } + b[num]++; + num = 0; + } + for (int i = 0; i < 9; i++) + if (min > b[i] && b[i] != 0) + min = b[i]; + for (int i = 0; i < 9; i++) + { + if (min == b[i]) + { + Console.WriteLine(i); + break; + + } + + } + Console.ReadKey(); + + + + + } +}