|
|
I'll see you and raise![^]
speramus in juniperus
|
|
|
|
|
Is this the shortest solution?
var switcher = true;
var range = Enumerable.Range(1,1000).ToList();
while( range.Count > 1)
range = range.Where(x => (switcher = !switcher) == false).ToList();
range.Dump();
|
|
|
|
|
Keeping up with today's trend, let me ask,
To those who are willing to do this task,
Given digits numbered one to nine,
Only positive and without a minus sign,
Not repeating a digit find a two number set,
The product of which none other can offset.
|
|
|
|
|
Not really clear on what "The product of which none other can offset." means, but here's my go.
I'm assuming it means won't result in a different number when multiplied by another. 3 and 7 gives us ten. One by Zero leaves us with 0.
3 + 7 --> 10
1 * 0 --> 0
|
|
|
|
|
I guess I did not do too well with the rhyme.
I just mean the largest product.
|
|
|
|
|
Perhaps not perfectly, but still pretty bloody impressive. (to an aussie )
Interesting question. Bookmarked for future fun.
Thanks.
|
|
|
|
|
Poetry + Maths = MehGerbil Logging Out
|
|
|
|
|
97531 * 8642
speramus in juniperus
|
|
|
|
|
|
... no, just sums.
speramus in juniperus
|
|
|
|
|
just sums for some, awesome for some other..
|
|
|
|
|
|
Nagy Vilmos wrote: 97531 * 8642
Sorry mate, I'd like one of those votes back, on account of your suggestion not being the answer..
I can go at least 1,111 higher.
97531 * 8642 = 842,862,902
9753 * 86421 = 842,864,013
I wonder if there's a published theorem on the matter. Your solution probably wouldn't have occurred to me. It seemed perfect upon first look. It was only now watching an old doco that I found myself considering the benefit/loss of taking a digit from one side and adding it to the other. But this was a mere chance discovery, it certainly wasn't systematic. The curious value of the difference between the two results makes me wonder even more. (Damn you Sandoz & Albert Hoffman - this doco is a trip! )
|
|
|
|
|
Well you can at least temporarily award the points to me.
With 87431 * 9652 = 843884012, I'm 1019999 higher than you.
Politicians are always realistically manoeuvering for the next election. They are obsolete as fundamental problem-solvers.
Buckminster Fuller
|
|
|
|
|
Sure, but don't get too attached to them, I'm going to hold them again for a bit, if you don't mind.
87531 * 9642 = 843,973,902 (another 89,890 higher again)
|
|
|
|
|
I don't mind.
Politicians are always realistically manoeuvering for the next election. They are obsolete as fundamental problem-solvers.
Buckminster Fuller
|
|
|
|
|
87431*9652
Politicians are always realistically manoeuvering for the next election. They are obsolete as fundamental problem-solvers.
Buckminster Fuller
|
|
|
|
|
I am an old dog, that still like to produce small code that doesn't require a huge framework or any runtime.
I would like to know if there are still low level SDK programmers floating around here?
I am asking this because i am porting my PowerBASIC graphic libraries (WinLIFT/GDImage) to C++, and i am not sure of the best setting to produce the smallest Visual Studio 64-bit DLL without any external dependencies.
...
Patrice Terrier
www.zapsolution.com
|
|
|
|
|
Why do you need to be as small as possible in the world of 64 bits?
Regards,
Rob Philpott.
|
|
|
|
|
How far do you want to go with that?
There are some tricks here[^]
|
|
|
|
|
Thanks for the link.
Forget to say that i am switching from ANSI to UNICODE, to use the Windows native string mode.
So far i am always using Multithread (/MT)
and __stdcall (/Gz) for compatibility with the other languages i am using.
The size of my original (PowerBASIC) 32-bit GDImage.dll was: 360,960 Kb,
the size of my C++ 32-bit GDImage32.dll is: 363,520 Kb (almost the same),
the size of my C++ 64-bit GDImage64.dll is: 424,960 Kb (i don't know if i could make it smaller).
...
Patrice Terrier
www.zapsolution.com
|
|
|
|
|
Yep, we're still around.
Other than /MT and /O2, perhaps /LTCG (merge sections?, perhaps), we're in the land of guessing.
Nuclear launch detected
|
|
|
|
|
An assassin was discovered slipping a dangerous poison into one of the king's barrels of wine, but unfortunately, after he was captured, no one could remember which barrel he had been poisoning.
It's known that the poison is a slow acting one, which kills its victims within a week, and there are thirty possible barrels which might contain the poison. The king, eager to restore his wine supply, has decided that the poisons should be tested out on the 5 prisoners arrested in connection with the incident.
Your job is to figure out the best way to test all 30 barrels of wine by giving samples of them to the prisoners and observing the results.You should be able to get the entire job done in the space of one week.
For example, you could give each of the prisoners a sample of one of the first five wines, wait a week to see the results, and give them the next 5 wines and so on, but that could take 6 weeks to do in the worst case.
|
|
|
|
|
Give the prisoners numbers 1, 2, 4, 8, 16, number each barrel, give prisoners drink from each barrel so as the number of each prisoner given drink added up equals the barrel number. After a week add the numbers of the prisoners who die up and that's the poisoned barrel.
|
|
|
|