Problem:
Score : 100 points

Problem Statement

Joisino wants to evaluate the formula "A op B".
Here, A and B are integers, and the binary operator op is either + or -.
Your task is to evaluate the formula instead of her.

Constraints

1≦A,B≦10^9

op is either + or -.

Input

The input is given from Standard Input in the following format:

A op B

Output

Evaluate the formula and print the result.

Sample Input 1

1 + 2

Sample Output 1

3

Since 1 + 2 = 3, the output should be 3.

Sample Input 2

5 - 7

Sample Output 2

-2

Solution in C# (Mono 4.6.2.0) (judge verdict: Runtime Error)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static void Main()
    {
        Console.ReadLine();
        string[] arrStrAbsoluteValue = Console.ReadLine().Split(' ');
        string strOutput;

        if(arrStrAbsoluteValue.Length % 2 == 0)
        {
             strOutput = EvenCalc(arrStrAbsoluteValue);
        }
        else
        {
            strOutput = OddCalc(arrStrAbsoluteValue);
        }
        Console.WriteLine(strOutput);
    }

   private static string EvenCalc(string[] arrStrAbsoluteValue)
    {
        // 1個目Key追加,bool=false 2個目bool=true
        Dictionary<string, bool> dicStrBln = new Dictionary<string, bool>();
        for(int i = 0; i < arrStrAbsoluteValue.Length; i++)
        {
            int intSengenValue = int.Parse(arrStrAbsoluteValue[i]);
            if (intSengenValue % 2 == 0)
            {
                return "0";
            }
            if(!dicStrBln.ContainsKey(arrStrAbsoluteValue[i]))
            {
                dicStrBln.Add(arrStrAbsoluteValue[i], false);
            }
            else
            {
                if(!dicStrBln[arrStrAbsoluteValue[i]])
                {
                    dicStrBln[arrStrAbsoluteValue[i]] = true;
                }
                else
                {
                    return "0";
                }
            }
        }
        if(dicStrBln.ContainsValue(false))
        {
            return "0";
        }

        return Math.Pow(2, arrStrAbsoluteValue.Length / 2).ToString();
    }

    private static string OddCalc(string[] arrStrAbsoluteValue)
    {
        // 1個目Key追加,bool=false 2個目bool=true
        Dictionary<string, bool> dicStrBln = new Dictionary<string, bool>();
        for (int i = 0; i < arrStrAbsoluteValue.Length; i++)
        {
            int intSengenValue = int.Parse(arrStrAbsoluteValue[i]);
            if (intSengenValue % 2 == 1)
            {
                return "0";
            }
            if (!dicStrBln.ContainsKey(arrStrAbsoluteValue[i]))
            {
                dicStrBln.Add(arrStrAbsoluteValue[i], false);
            }
            else
            {
                if (!dicStrBln[arrStrAbsoluteValue[i]])
                {
                    dicStrBln[arrStrAbsoluteValue[i]] = true;
                }
                else
                {
                    return "0";
                }
            }
        }
        if(!dicStrBln.ContainsKey("0")  || 
            dicStrBln["0"])
        {
            return "0";
        }
        else
        {
            dicStrBln["0"] = true;
        }
           

        if (dicStrBln.ContainsValue(false))
        {
            return "0";
        }

        return Math.Pow(2, arrStrAbsoluteValue.Length / 2 - 1).ToString();
    }
}