>>695
JSの場合なら、正の整数 x に対し、
if ( x != 0 && x / Math.pow(10, ((int)Math.log10(x))) == 1 ) {
 (最上位の桁が1の場合の処理);
}