Skip to content

Instantly share code, notes, and snippets.

@do-aki
Created May 10, 2012 11:12
Show Gist options
  • Save do-aki/2652478 to your computer and use it in GitHub Desktop.
Save do-aki/2652478 to your computer and use it in GitHub Desktop.
glt のあれ
<?php
$cards = range(1,99);
$get_cards = array();
$count = 0;
while(++$count) {
$get_cards[$cards[array_rand($cards, 1)]] = 1;
if (!array_diff($cards, array_keys($get_cards))) {
break;
}
}
echo $count;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment