[AccessD] OT: Friday Puzzles

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Sat Apr 24 12:22:16 CDT 2010


That's wrong, and a bit(?)/plain(?) stupid, sorry. Any, takers? (I'm off
till tomorrow's late evening/Monday).

Thank you.

--Shamil

-----Original Message-----
From: Shamil Salakhetdinov [mailto:shamil at smsconsulting.spb.ru] 
Sent: Saturday, April 24, 2010 7:30 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] OT: Friday Puzzles

8925 medals.

Correct?

x = size of the army
y = qty of soldiers who have lost one arm, one leg, one ear and one eye;

y = 0.85*(1-0.8)*0.75*0.7x

Assuming that army size is between 100,000+ and 150,000
(
http://www.secondworldwar.co.uk/units.html
http://usmilitary.about.com/od/army/l/blchancommand.htm
)

the anwers would be

foreach (int x in Enumerable.Range(100000,50001))
{
    decimal y = 0.85m * (1.0m-0.8m) * 0.75m * 0.7m * x;

    if (y == (decimal)(int)y)
        Console.WriteLine("// SizeOfTheArmy={0:#,0}+, Medals={1} ", 
            x, (decimal)(int)y); 
}

// SizeOfTheArmy=100,000+, Medals=8925
// SizeOfTheArmy=104,000+, Medals=9282
// SizeOfTheArmy=108,000+, Medals=9639
// SizeOfTheArmy=112,000+, Medals=9996
// SizeOfTheArmy=116,000+, Medals=10353
// SizeOfTheArmy=120,000+, Medals=10710
// SizeOfTheArmy=124,000+, Medals=11067
// SizeOfTheArmy=128,000+, Medals=11424
// SizeOfTheArmy=132,000+, Medals=11781
// SizeOfTheArmy=136,000+, Medals=12138
// SizeOfTheArmy=140,000+, Medals=12495
// SizeOfTheArmy=144,000+, Medals=12852
// SizeOfTheArmy=148,000+, Medals=13209

As we do not have the general's army size defined but we know that general
wanted to reward teh fewest number of soldiers then we select the minimal
appropriate army size = 100,000 soldiers, and then the answer will be 8925
medals.

Correct?

Thank you.

--Shamil

<<< snip >>>




More information about the AccessD mailing list