public void RandomDataset() { var generator = new StringBasedGenerator(); var data = Enumerable.Range(0, 1000).Select(i => generator.GetRandom(1, 16)).Distinct().Take(100).ToList(); Console.WriteLine($"divisible values count: {data.Count(IsDivisibleBy7)}"); Console.WriteLine(string.Join(Environment.NewLine, data)); Console.WriteLine(); Console.WriteLine(string.Join(Environment.NewLine, data.Select(IsDivisibleBy7))); }
public void CreateInputOutput() { var generator = new StringBasedGenerator(); var testCaseCount = 100; var inputLines = Enumerable.Range(0, 10000).Select(i => generator.GetRandom(1, 16)).Distinct().Take(testCaseCount).ToList(); Console.WriteLine(testCaseCount); foreach (var inputLine in inputLines) { Console.WriteLine(inputLine); } Console.WriteLine(); for (var i = 0; i < inputLines.Count; i++) { var answer = IsDivisibleBy7(inputLines[i]) ? "TAIP" : "NE"; Console.WriteLine($"Testas #{i+1}: {answer}"); } }