Training Site
Sideways banner 8b44c02b768aa359c4d0a2bce3b247c6d7ab888f8b26852e9bfc3659c8c25612

C#

Input: Standard Input (stdin)
Output: Standard Output (stdout)
Memory limit: 100 megabytes
Time limit: 1.0 seconds

I/O and Documentation

Learn how to download .NET and use the dotnet command.

Example

Adding two numbers. Numbers will be space separated on a single line.

using System;

namespace Program
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] nums = Console.ReadLine().Split(' ');
            int sum = Int32.Parse(nums[0]) + Int32.Parse(nums[1]);
            Console.WriteLine(sum);
        }
    }
}


Submit

Sample Explanation

3 + 4 = 7

  • Sample Input 1

    3 4
    

    Sample Output 1

    7