Created
May 22, 2014 16:22
-
-
Save jikeytang/c54d478b653927d0cfa0 to your computer and use it in GitHub Desktop.
[ Javascript ] - 20140523-题目2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
809*??=800*??+9*??+1 其中??代表的两位数,8*??的结果为两位数,9*??的结果为3位数。求??代表的两位数,及809*??后的结果。 | |
?? 可以为xy 或者yx 只是说了是2位数。。 所以??未必等于?? | |
PS: | |
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。 | |
```javascript | |
// you code | |
``` | |
2. 粘贴代码时请使用shift+tab,缩进前面的空白。 |
karrynew
commented
May 23, 2014
//这样得到的结果只有1,2
for(var i=1;8*10*i<100;i++){
var arr1=[];
if(8*10*i<100){
arr1.push(i);
for(var j=1;8*10*i+8*j<100;j++){
var arr2=[];
if(8*10*i+8*j<100&&(9*(10*i+j)>100||9*(10*j+i)>100)){
arr2.push(j);
}
};
};
}
console.log(arr2,arr1);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment