Perl - I tried a little harder this time. It's a really <strike>simple</strike> complex strategy, but I've set up the framework for expansion. Edit: Super secret edit for evil reasons. $_=<>; INPUT:{ tr/ /,/; @in = eval; @rbids = ""; for(1..$#in){ $rbids[$in[$_]]++ } LOWBID: for($pnt=1;$pnt<$#in+1;$pnt++){ if($rbids[$pnt]==0){$lows[$pnt]++;last LOWBID} if($rbids[$pnt]==1){last LOWBID} } $_=<>; if($_ ne"\n"){redo INPUT} } $max=0; $maxloc=3; for(1..100){ if($lows[$_]>$max){$maxloc=$_;$max=$lows[$_]} } print$maxloc This program takes input one line at a time, followed by two newlines: perl PhiNotPi2.plx 1 2 3 3 2 2 1 3 1 3 2 1 1 1 3 [empty line]