Skip to content

Instantly share code, notes, and snippets.

@NotFounds
Last active December 31, 2015 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NotFounds/cb9b25c5dad105ae3638 to your computer and use it in GitHub Desktop.
Save NotFounds/cb9b25c5dad105ae3638 to your computer and use it in GitHub Desktop.
using System;
using System.Linq;
using System.Collections.Generic;
using static System.Console;
namespace WaterAngel
{
public class Program
{
public static void Main(string[] args)
{
Solve();
}
public static void Solve()
{
MyInputStream cin = new MyInputStream();
int x = cin.ReadInt();
int y = cin.ReadInt();
WriteLine(x + y);
}
}
public class MyInputStream
{
private char SPLIT = ' ';
private Queue<string> inputStream;
public MyInputStream(char split = ' ')
{
SPLIT = split;
inputStream = new Queue<string>();
}
public string Read()
{
if (inputStream.Count != 0) return inputStream.Dequeue();
string[] tmp = Console.ReadLine().Split(SPLIT);
for (int i = 0; i < tmp.Length; i++)
{
inputStream.Enqueue(tmp[i]);
}
return inputStream.Dequeue();
}
public string ReadLine()
{
return Console.ReadLine();
}
public int ReadInt()
{
return int.Parse(Read());
}
public long ReadLong()
{
return long.Parse(Read());
}
public double ReadDouble()
{
return double.Parse(Read());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment