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 <>

13 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 10:48 PM, Blogger Unknown said...

adidas outlet
oakley vault
timberland outlet
ray ban sunglasses
replica rolex watches
uggs outlet
christian louboutin shoes
michael kors handbags
ugg boots
adidas nmd
201612.19wengdongdong

 
At 8:30 AM, Blogger Unknown said...

Our Dolphins Flag is constructed of polyester, measures 3x5 feet, and has two metal grommets for attaching to a traditional flagpole, tailgate pole, or our 6' aluminum flagpole. The perimeter of our Dolphins Flag is double stitched and the Officially Licensed NFL Miami Dolphins team logos are dye sublimated into the flag so they won't peel. Due to its large size, this flag is also perfect to hang in your game room, sports room, office, or kids room.dallas cowboys american flag
cowboys stars and stripes flagsPackers stars and stripes flags
Houston Oilers stars and stripes flagscollege football flags,
house divided college flags
Sports flags and banners,
nfl house flags

 
At 12:34 AM, Blogger raybanoutlet001 said...

michael kors handbags
new york giants jerseys
the north face
ravens jerseys
bengals jersey
kobe 9
abercrombie and fitch kids
nike air huarache
texans jerseys
fitflops sale clearance

 
At 6:54 AM, Blogger Unknown said...

cleveland cavaliers
michael kors handbags
nike trainers uk
converse trainers
michael kors handbags
nike outlet
cheap jordans
polo ralph lauren
air force 1 shoes
cheap nfl jerseys
20170417

 
At 3:11 AM, Blogger raybanoutlet001 said...

ugg outlet
oakley sunglasses
mont blanc outlet
pandora jewelry
louboutin shoes
true religion outlet
ugg outlet
michael kors uk
carolina jerseys
coach outlet

 
At 12:58 AM, Blogger Unknown said...

zzzzz2018.7.4
kate spade outlet
michael kors outlet online sale
mbt shoes
yeezy
supreme outlet
louboutin shoes
fitflops
ferragamo shoes
coach outlet online
ray ban eyeglasses

 
At 8:49 PM, Blogger wacogade said...

New Casino - JtmHub
JTA - Casino, 서귀포 출장샵 Hotel & Resort 이천 출장샵 & Spa, Uncasville, 창원 출장안마 CT 군산 출장안마 The only indoor and outdoor pool in 경기도 출장마사지 the resort. There are several private areas including a private,

 

Postar um comentário

<< Home