Sobre macaca, macaca-de-auditório, macacal, macacão, macacar, macacarecuia, macacaria, macaco, macacoa*, macaco-adufeiro, macaco-aranha, macaco-barrigudo, macaco-cabeludo, macaco-da-meia-noite, macaco-da-noite macaco-de-bando, macaco-de-cheiro, macaco-inglês, macaco-japonês, macaco-narigudo, macaco-patrona, macaco-prego, macaco-prego-do-peito-amarelo e TI.

domingo, setembro 09, 2007

Code Contest Mega Sena: Resultados

Para organizar melhor os códigos que foram feitos para o Code Constest da Mega Sena criei este novo post.

Alguns desses códigos não respeitam a regra da unidade léxica da linha, mas eles são tão criativos que quem se importa? Se vocês se importarem eu tiro.

Uma Linha:

Bernado Rufino fez em Ruby

Array.new(100000){rand(60)+1}.inject(Hash.new(0)){|hash, i| hash if hash[i] += 1}.invert.sort.reverse[0..6].each{|t, n| puts "#{n}repeated #{t} times"}



Walter Cruz fez em Python

x = [item for item in sorted([(k, len(list(g))) for k, g in groupby(sorted([randrange(1,61) for item in xrange(0,100000)]))],key=itemgetter(1),reverse=True)][:6]rint(x)



Diogo Carrion fez em JavaScript

for (var i, array = new Array(), j = 0; j < i =" Math.round(59" j ="=">


Rafael fez duas em C++

int main() { for(int freq[] ={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60},i = 0; i == 100000 ? printf("%d %d %d %d %d %d\n", freq[59]%100,freq[58]%100, freq[57]%100, freq[56]%100, freq[55]%100,freq[54]%100)*0 : 1;sort(freq, freq+sizeof(freq)/sizeof(int)), i++,freq[rand()%60]+=100); }



int main() {for(vector<> v(60,0),i(0,0); i[0] == 100060 ? printf("%d %d %d %d %d %d\n", v[59]%70, v[58]%70, v[57]%70, v[5 6]%70, v[55]%70, v[54]%70)*0 : 1; v[i[0] <>


Rodrigo Fenrrir fez Python

sorted([ (x.count(k),k) for x in [[ random.randint(1,60) for z in xrange(100000) ]] for k in xrange(1,61) ], reverse=True)[:6]


Rodrigo(deixou comentário) fez em Perl

for (1..100001) { ($_ == 100001) ? print join(" ", (sort { $h{$b} <=> $h{$a} } keys %h)[0..5]) . "\n": $h{int(rand()*60+1)}++ }


Duas Linhas:

Náiron J. C. G fez em JavaScript

for(var i,ra=new Array(),j=0 ; j<10000 i="Math.round(59*Math.random())+1,ra[i]=">


Três Linhas:

ZehOliveira fez em IO

h := Map;
100000 repeat(if(h hasKey(n := Random value(1, 60) round asString), h atPut(n, h at(n)+1), h atPut(n, 1)))
h asList sortBy(block(f, s, f at(1) > s at(1))) slice(0, 6) foreach(k, writeln(k at(0), " --> ", k at(1)))


O Daniel Martins fez em Groovy e em SmallTalk

def hist = [:], v
100000.times{hist[v = 1 + Math.random() * 60 as int] = !hist[v] ? 1 : hist[v] + 1}
println hist.keySet().toList().sort{-hist[it]}[0..5].join(‘,’)


| s |
s := ((OrderedCollection withAll: ((1 to: 100000) collect: [:each | 60 atRandom])) groupBy: [:each | each] having: [:each | true]) asSortedCollection: [:a :b | b size <>

9 Comments:

At 10:07 PM, Blogger Walker said...

Este comentário foi removido pelo autor.

 
At 5:41 PM, Blogger Micox - Náiron J. C. G. said...

Opa, tá cortando os códigos ae...
dá uma olhada ae.

 
At 10:01 PM, Blogger oakleyses said...

replica watches, uggs outlet, uggs outlet, polo ralph lauren outlet online, ray ban sunglasses, louis vuitton outlet, michael kors outlet store, ugg boots, louis vuitton outlet, ugg boots, gucci handbags, burberry handbags, oakley sunglasses wholesale, polo outlet, longchamp outlet, tiffany and co, christian louboutin shoes, nike air max, nike free, burberry outlet, prada handbags, christian louboutin uk, louis vuitton, michael kors outlet online, louis vuitton outlet, christian louboutin, jordan shoes, oakley sunglasses, michael kors outlet online, michael kors outlet online, nike air max, tory burch outlet, tiffany jewelry, oakley sunglasses, nike outlet, michael kors outlet, christian louboutin outlet, uggs on sale, michael kors outlet, longchamp outlet, longchamp outlet, prada outlet, louis vuitton, replica watches, ray ban sunglasses

 
At 10:04 PM, Blogger oakleyses said...

ray ban pas cher, mulberry uk, air max, true religion outlet, nike tn, polo lacoste, north face uk, vans pas cher, michael kors pas cher, kate spade outlet, kate spade, nike free run, michael kors outlet, guess pas cher, louboutin pas cher, true religion jeans, coach purses, sac hermes, hogan outlet, true religion outlet, coach outlet, sac longchamp pas cher, lululemon canada, coach outlet store online, michael kors, chanel handbags, longchamp pas cher, ray ban uk, north face, new balance, coach outlet, nike air max, jordan pas cher, hollister pas cher, true religion outlet, burberry pas cher, nike air force, timberland pas cher, sac vanessa bruno, nike blazer pas cher, polo ralph lauren, oakley pas cher, hollister uk, converse pas cher, nike roshe

 
At 10:05 PM, Blogger oakleyses said...

hollister, soccer jerseys, nike free uk, nike air max uk, chi flat iron, hermes belt, north face outlet, lululemon, nike huaraches, nike air max uk, ralph lauren uk, nike air max, celine handbags, insanity workout, ghd hair, nfl jerseys, new balance shoes, reebok outlet, north face outlet, mont blanc pens, wedding dresses, ferragamo shoes, herve leger, valentino shoes, vans outlet, asics running shoes, soccer shoes, nike trainers uk, giuseppe zanotti outlet, instyler, bottega veneta, p90x workout, nike roshe run uk, babyliss, mac cosmetics, abercrombie and fitch uk, iphone 6 cases, nike roshe run, baseball bats, beats by dre, jimmy choo outlet, longchamp uk, hollister clothing, mcm handbags, timberland boots, abercrombie and fitch

 
At 10:07 PM, Blogger oakleyses said...

pandora uk, lancel, ugg,uggs,uggs canada, montre pas cher, louis vuitton, converse, pandora charms, toms shoes, thomas sabo, links of london, juicy couture outlet, ugg pas cher, gucci, louis vuitton, michael kors outlet online, juicy couture outlet, louis vuitton, vans, swarovski crystal, ugg,ugg australia,ugg italia, louis vuitton, replica watches, michael kors outlet, ugg, ralph lauren, wedding dresses, karen millen uk, hollister, pandora jewelry, michael kors handbags, louis vuitton, converse outlet, ugg uk, doke gabbana, marc jacobs, oakley, louboutin, swarovski, supra shoes, ray ban, nike air max, hollister, coach outlet

 
At 3:42 AM, Blogger 艾丰 said...

jianbin1127
arizona cardinals
mont blanc
lululemon outlet store
miami dolphins
basketball shoes
cleveland cavaliers
michael kors handbags,michael kors outlet,michael kors,kors outlet,michael kors outlet online,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors
michael kors outlet online
salomon speedcross 3
abercrombie fitch
iphone cases
cheap oakley sunglasses
louis vuitton uk
nike huarache
woolrich clothing
celine outlet online
ralph lauren,ralph lauren uk,ralph lauren outlet,ralph lauren outlet online,polo ralph lauren outlet,ralph lauren polo
oakley outlet online
tory burch sandals
indianapolis colts
soccer jerseys,cheap soccer jerseys,cheap soccer jerseys for sale,soccer jersey,usa soccer jersey,football jerseys
ugg boots
snow boots outlet
beats by dr dre
ralph lauren polo shirts
ugg outlet
marc jacobs outlet
hermes bags
baltimore ravens
coach outlet store online,coach outlet store,coach outlet
new orleans saints
nike roshe run

 
At 3:43 AM, Blogger 艾丰 said...

jianbin1127
arizona cardinals
mont blanc
lululemon outlet store
miami dolphins
basketball shoes
cleveland cavaliers
michael kors handbags,michael kors outlet,michael kors,kors outlet,michael kors outlet online,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors
michael kors outlet online
salomon speedcross 3
abercrombie fitch
iphone cases
cheap oakley sunglasses
louis vuitton uk
nike huarache
woolrich clothing
celine outlet online
ralph lauren,ralph lauren uk,ralph lauren outlet,ralph lauren outlet online,polo ralph lauren outlet,ralph lauren polo
oakley outlet online
tory burch sandals
indianapolis colts
soccer jerseys,cheap soccer jerseys,cheap soccer jerseys for sale,soccer jersey,usa soccer jersey,football jerseys
ugg boots
snow boots outlet
beats by dr dre
ralph lauren polo shirts
ugg outlet
marc jacobs outlet
hermes bags
baltimore ravens
coach outlet store online,coach outlet store,coach outlet
new orleans saints
nike roshe run

 
At 11:28 PM, Blogger Minko Chen said...

hermes birkin bag
mbt shoes outlet
beats by dre
ed hardy clothing
longchamp outlet
ugg boots sale
nike air max uk
oakley outlet store
prada outlet online
coach outlet online
air jordan shoes for sale
fitflops sale
longchamp handbags
louis vuitton bags cheap
rolex uk
winter jackets
cyber monday deals
oakley sunglasses wholesale
ray ban,rayban,occhiali ray ban,ray-ban,ray ban occhiali,ray ban sunglasses
michael kors handbags sale
1201minko

 

Postar um comentário

<< Home