Click here to Skip to main content
15,892,746 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Mark_Wallace24-Jan-17 8:40
Mark_Wallace24-Jan-17 8:40 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Munchies_Matt24-Jan-17 8:58
Munchies_Matt24-Jan-17 8:58 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
TheGreatAndPowerfulOz24-Jan-17 10:56
TheGreatAndPowerfulOz24-Jan-17 10:56 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Mike Hankey24-Jan-17 9:11
mveMike Hankey24-Jan-17 9:11 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
PIEBALDconsult24-Jan-17 12:24
mvePIEBALDconsult24-Jan-17 12:24 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Mike Hankey24-Jan-17 12:30
mveMike Hankey24-Jan-17 12:30 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
TonyManso24-Jan-17 9:49
professionalTonyManso24-Jan-17 9:49 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Richard Deeming24-Jan-17 9:55
mveRichard Deeming24-Jan-17 9:55 
Sod it - my brain is too knackered to work this out. Time to cheat! Big Grin | :-D
C#
Enumerable.Range(1, 1000)
    .SelectMany(i => i.ToString())
    .GroupBy(d => d, (Digit, items) => new { Digit, Count = items.Count() })
    .Dump();

Digit | Count
-------------
1     | 301 
2     | 300 
3     | 300 
4     | 300 
5     | 300 
6     | 300 
7     | 300 
8     | 300 
9     | 300 
0     | 192 




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
TheGreatAndPowerfulOz24-Jan-17 10:55
TheGreatAndPowerfulOz24-Jan-17 10:55 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
imzhangqin24-Jan-17 12:19
imzhangqin24-Jan-17 12:19 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
PIEBALDconsult24-Jan-17 12:26
mvePIEBALDconsult24-Jan-17 12:26 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Member 1286378724-Jan-17 23:00
Member 1286378724-Jan-17 23:00 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Kornfeld Eliyahu Peter24-Jan-17 23:18
professionalKornfeld Eliyahu Peter24-Jan-17 23:18 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Member 1286378724-Jan-17 23:16
Member 1286378724-Jan-17 23:16 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Kornfeld Eliyahu Peter24-Jan-17 23:19
professionalKornfeld Eliyahu Peter24-Jan-17 23:19 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Member 1286378725-Jan-17 4:49
Member 1286378725-Jan-17 4:49 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Chris C-B25-Jan-17 0:27
Chris C-B25-Jan-17 0:27 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Kornfeld Eliyahu Peter25-Jan-17 0:36
professionalKornfeld Eliyahu Peter25-Jan-17 0:36 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
Chris C-B25-Jan-17 1:44
Chris C-B25-Jan-17 1:44 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
kalberts25-Jan-17 0:31
kalberts25-Jan-17 0:31 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
gervacleto25-Jan-17 1:40
professionalgervacleto25-Jan-17 1:40 
GeneralRe: TWCP OTD (The Who Cares Puzzle Of The Day) - 24th of January, 2017 Pin
RussTheMan25-Jan-17 3:51
RussTheMan25-Jan-17 3:51 
GeneralStackOverflow down? Pin
Afzaal Ahmad Zeeshan24-Jan-17 6:51
professionalAfzaal Ahmad Zeeshan24-Jan-17 6:51 
GeneralRe: StackOverflow down? Pin
Dave Kreskowiak24-Jan-17 6:54
mveDave Kreskowiak24-Jan-17 6:54 
GeneralRe: StackOverflow down? Pin
Afzaal Ahmad Zeeshan24-Jan-17 7:05
professionalAfzaal Ahmad Zeeshan24-Jan-17 7:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.