using System; using System.Collections.Generic; using System.Linq; class Program { static string InputPattern = "InputX"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("245 420"); //2 } else if (InputPattern == "Input2") { WillReturn.Add("417 417"); //0 } else if (InputPattern == "Input3") { WillReturn.Add("290 300"); //1 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static long[] GetSplitArr(string pStr) { return (pStr == "" ? new string[0] : pStr.Split(' ')).Select(pX => long.Parse(pX)).ToArray(); } static void Main() { List InputList = GetInputList(); long[] wkArr = GetSplitArr(InputList[0]); long L = wkArr[0]; long R = wkArr[1]; var LangSet = new HashSet(); for (long I = L; I <= R; I++) { LangSet.Add(GetLang(I)); } Console.WriteLine(LangSet.Count - 1); } static string GetLang(long pNo) { if (1 <= pNo && pNo <= 295) return "C++"; if (296 <= pNo && pNo <= 416) return "Rust"; return "Python"; } }