读立写生 2018-04-12
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> </body> </html> <script type="text/javascript"> var biao = 0 for(var i = 1;i < 50;i++){ for(var j = 1;j<99;j++){ for(var x = 1;x <= 98;x++){ if(i*2 + j*1 + 0.5*x == 100 && i + j + x == 100){ biao++; console.log(i+","+j+","+x); } } } } alert(biao) </script>