示例#1
0
文件: 9.cs 项目: qifanyyy/CLCDSA
        static void Main(string[] args)
        {
            TextReader tr = new StreamReader(@"C:\Google Code Jam\A-small-attempt3.in");
            TextWriter tw = new StreamWriter(@"C:\Google Code Jam\A-small-attempt3.txt");

            ProblemA.Solve(tr, tw);
            tr.Close(); tw.Close();
            Console.ReadKey();
        }
示例#2
0
        public static void Solve(TextReader tr, TextWriter tw)
        {
            int L = int.Parse(tr.ReadLine());

            for (int i = 1; i <= L; i++)
            {
                ProblemA problem = new ProblemA(tr.ReadLine().Trim());
                Console.WriteLine("Case #{0}: {1}", i, problem.a);
                tw.WriteLine(String.Format("Case #{0}: ", i) + problem.Calc());
            }
        }