Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $test=6677337;
- for($i=($test+1);$i<($test+1000000);$i++){
- #Start loop assuming not unique
- $unique=false;
- #true if unique digit
- foreach(count_chars((string)$i, 1) as $v){
- if($v==1){$unique=true;continue 2;}}
- #if not unique
- if($unique===false){
- echo $i;break;}}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment