- @echo off&setlocal enabledelayedexpansion
- set num=0
- :main
- for /l %%a in (0 1 25) do (
- for /l %%b in (0 1 35) do (
- for /l %%c in (0 2 100) do (
- set /a 鸡=5*%%a+3*%%b+%%c/2
- set /a 钱=%%a+%%b+%%c
- if !鸡! equ 100 if !钱! equ 100 (
- set /a num+=1
- echo 第!num!种方法: %%a + %%b + %%c
- ))))
- echo 共有 %num% 种方法
- pause>nul
复制代码
|