- @echo off
- setlocal enabledelayedexpansion
- echo 统计结果>ret.txt
- for /L %%i in (0,1,20) do (
- for /L %%a in (0,1,33) do (
- set /a temp=5*%%i+3*%%a
- if 100 geq !temp! (
- set /a m=100-!temp!
- set /a n+=1
- echo 第!n!种方法为:%%i只公鸡,%%a只母鸡,!m!只小鸡 >>ret.txt
- )
- )
- )
- echo 方法有:%n%个 >>ret.txt
- pause>nul
复制代码
|