<script>
var a=prompt("请输入你的学号:");
var b=[];
var newb=[];
for(var i=0;i<a.length;i++){
b[b.length]=a[i];
}
for(var i=1;i<b.length;i++){
for(var j=0;j<b.length-1;j++){
if(b[j]>b[j+1]){
var temp=b[j+1];
b[j+1]=b[j];
b[j]=temp;
}
}
}
for(var i=0;i<b.length-1;i++){
if(b[i]!=b[i+1]){
newb[newb.length]=b[i];
}
}
for(var i=b.length-1;i>=0;i--){
if(b[i]!=b[i-1]){
newb[newb.length]=b[i];
break;
}
}
alert(newb);
</script>