Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
project euler 13, C#
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { var n = Console.In.ReadToEnd(); string [] numbers = n.Split("\n".ToCharArray()); List<double> list = new List<double>(); for(int i=0; i<numbers.Length; i++) list.Add(Convert.ToDouble(numbers[i])); var sum = list.Sum(); Console.WriteLine(sum); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
jjj
Stack as a queue
SHA Tester 2.0
Use Lock Keyword
custom Queue Implementation
linq subquery z grupowaniem po dwóch polach
test1
Selection sort
C# managing ISO 8601 dates and times
ProtectedUse
stackse - search stackoverflow differently
Please log in to post a comment.