- @set @n=0;//&cscript -nologo -e:jscript "%~0"<a.txt>b.txt & pause & exit
-
- while (!WScript.StdIn.AtEndOfStream) {
- str = WScript.StdIn.ReadLine();
- if (!/^\s*$/.test(str)) WScript.Echo(getNum(str))
- }
-
- function getNum(s) {
- ar = [];
- for (i=100; i<=199; i++) {
- s1 = (i + "").substr(1);
- ar.push(s.split(s1).length + "=" + s1);
- }
- ar.sort(function(x,y){return y.split("=")[0]-x.split("=")[0]});
- return ar.join(" ").replace(/\d+=/g, "");
- }
复制代码
|