Beispiel #1
0
    public static void ExecuteByStandardIO(Action method)
    {
        string input;

        do
        {
            AtCoder.Timer("", method);

            Console.WriteLine();
            Console.WriteLine("Continue? 1:Yes, others:No");
            input = Console.ReadLine();
        } while (input == "1");
    }
Beispiel #2
0
    public static void ExecuteByFileIO(Action method)
    {
        var textFile = @$ "Text\Sample.txt";

        string input;

        do
        {
            using (var reader = new StreamReader(textFile))
            {
                IOLibrary.SetReadLineMethod(reader.ReadLine);

                AtCoder.Timer("", method);
            }

            Console.WriteLine();
            Console.WriteLine("Continue? 1:Yes, others:No");
            input = Console.ReadLine();
        } while (input == "1");
    }