Created
June 22, 2013 06:06
-
-
Save nk0t/5836056 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Linq; | |
using System.Text; | |
namespace AOJ | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
foreach (var s in EnumerateInput() | |
.Select(s => s.Split(' ') | |
.Select(int.Parse).Sum() | |
.ToString() | |
.Length)) | |
{ | |
Console.WriteLine(s); | |
} | |
} | |
static IEnumerable<string> EnumerateInput() | |
{ | |
var s = ""; | |
while ((s = Console.ReadLine()) != null) | |
{ | |
yield return s; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment