Re: Reading array of integers readln performance issues

2015-06-12 Thread kerdemdemir via Digitalmars-d-learn
Thanks a lot for your great advices and exaamples. Yes if I don't return; web-site won't show it as "wrong answer". As a learner I am very happy with the responsiveness of the community. Regards

Re: Reading array of integers readln performance issues

2015-06-11 Thread anonymous via Digitalmars-d-learn
On Thursday, 11 June 2015 at 19:56:00 UTC, kerdemdemir wrote: Can I achieve something faster than code below? auto peopleMoney = stdin.readln().split().map!(a => to!int(a)).array(); if (peopleMoney.length == 20) writeln(":("); `std.array.split` is eager. It may be faster if you

Re: Reading array of integers readln performance issues

2015-06-11 Thread Dennis Ritchie via Digitalmars-d-learn
On Thursday, 11 June 2015 at 19:56:00 UTC, kerdemdemir wrote: Hi; To learn D better and challanging myself I am tring code computation's with D. There is a question which is about reading a line of integer which consist of 20 elements. My solution fails because "Time limit exceeded", I

Reading array of integers readln performance issues

2015-06-11 Thread kerdemdemir via Digitalmars-d-learn
Hi; To learn D better and challanging myself I am tring code computation's with D. There is a question which is about reading a line of integer which consist of 20 elements. My solution fails because "Time limit exceeded", I thought it is because of my algorithm first. I realize time l