![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-11-10 13:03 |
47,815 topics / 349,930 posts / today 0 new / 48,291 members |
| DOS批处理 & 脚本技术(批处理室) » [Discussion][Exploration] Using batch processing to make interesting math problems |
| Printable Version 40,618 / 139 |
| Floor91 youxi01 | Posted 2006-11-25 22:28 |
| 高级用户 Posts 247 Credits 846 From 湖南==》广东 | |
|
It will be calculated out, but not in one place. The form it gives is like this:
1×54=54 2×27=54 ....... 2×27=54 3×18=54 …… 3×18=54 6×9=54 |
|
| Floor92 不得不爱 | Posted 2006-11-25 22:37 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
Isn't that going to be a mess?
|
|
| Floor93 a9319751 | Posted 2006-11-27 15:09 |
| 中级用户 Posts 170 Credits 439 | |
|
#25 ?
Number of chickens and dogs = There are seventy-nine chickens and dogs, with two hundred feet on the ground. Think and calculate, how many chickens? How many dogs? @echo off set /a 鸡狗=79 set /a 鸡腿狗腿=200 set /a 最大狗=200/4 setlocal enabledelayedexpansion for /l %%i in (1 1 %最大狗%) do ( set /a 狗腿=%%i*4 set /a 鸡腿=%鸡腿狗腿%-!狗腿! set /a 鸡=!鸡腿!/2 set /a num=%%i+!鸡! call :test !num! %%i !鸡! %鸡狗% ) pause>nul :test if %1 EQU %4 echo 可能的组合为:狗=%2 鸡=%3 goto :eof |
|
| Floor94 40szb | Posted 2006-12-28 14:32 |
| 初级用户 Posts 21 Credits 46 From 西安 | |
|
Collecting it
|
|
| Floor95 redtek | Posted 2007-01-29 08:12 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
A good post should be topped up~:)
The way to top up a long-sunken good post without posting too much junk posts is: delete your original reply in the post (-1 point), and then reply again~:) [ Last edited by redtek on 2007-1-28 at 07:14 PM ] |
|
| Floor96 0401 | Posted 2007-01-29 10:57 |
| 中级用户 Posts 88 Credits 435 | |
|
Posting up also has such knowledge, learned.
|
|
| Floor97 hngaoshou | Posted 2007-02-01 02:50 |
| 社区乞丐 Posts 77 Credits -16 | |
|
No speed
|
|
| Floor98 nzisisco | Posted 2007-03-04 17:13 |
| 初级用户 Posts 47 Credits 107 | |
|
All are experts, drifting by```
|
|
| Floor99 6622186 | Posted 2007-03-17 11:09 |
| 高级用户 Posts 411 Credits 894 | |
|
So the original maximum number is 2^31 - 1. No wonder 2^31 overflows!
|
|
| Floor100 6622186 | Posted 2007-03-17 11:42 |
| 高级用户 Posts 411 Credits 894 | |
|
It would be nice if we could filter the multiples of 3, 4, 5 and 5, 12, 13.
|
|
| Floor101 6622186 | Posted 2007-03-17 12:39 |
| 高级用户 Posts 411 Credits 894 | |
|
The code on floor 84 is pretty good, and the running efficiency is very high.
|
|
| Floor102 6622186 | Posted 2007-03-19 11:59 |
| 高级用户 Posts 411 Credits 894 | |
|
@echo off
rem x+y=n m*x+y/m=n set n=100 set m=4 set x=100/(1+m) set y=x*m echo Number of senior monks is %x% echo Number of senior monks is %y% pause>nul |
|
| Floor103 6622186 | Posted 2007-03-19 12:08 |
| 高级用户 Posts 411 Credits 894 | |
|
There are several errors. The fifth line should change "100" to "n". The eighth line should change "大" to "small". This correction is hereby made. Please forgive me a lot.
|
|
| Floor104 6622186 | Posted 2007-03-19 12:39 |
| 高级用户 Posts 411 Credits 894 | |
|
### Step 1: Analyze the conditions
We can find that if we add 1 person to the number of people participating in the sports meeting, then the number of people can be exactly divided by 2, 3, 4, 5, and 6. ### Step 2: Find the least common multiple of 2, 3, 4, 5, and 6 - Prime factorize each number: - \(2 = 2\) - \(3 = 3\) - \(4 = 2\times2\) - \(5 = 5\) - \(6 = 2\times3\) - The least common multiple is the product of the highest powers of all prime factors involved. So the least common multiple of 2, 3, 4, 5, and 6 is \(2\times2\times3\times5= 60\) ### Step 3: Find the number of people participating in the sports meeting Since adding 1 person makes it divisible by 60, then the number of people participating in the sports meeting is \(60 - 1 = 59\) So the school has at least 59 people participating in this sports meeting. The translated text is:### Step 1: Analyze the conditions We can find that if we add 1 person to the number of people participating in the sports meeting, then the number of people can be exactly divided by 2, 3, 4, 5, and 6. ### Step 2: Find the least common multiple of 2, 3, 4, 5, and 6 - Prime factorize each number: - \(2 = 2\) - \(3 = 3\) - \(4 = 2\times2\) - \(5 = 5\) - \(6 = 2\times3\) - The least common multiple is the product of the highest powers of all prime factors involved. So the least common multiple of 2, 3, 4, 5, and 6 is \(2\times2\times3\times5 = 60\) ### Step 3: Find the number of people participating in the sports meeting Since adding 1 person makes it divisible by 60, then the number of people participating in the sports meeting is \(60 - 1 = 59\) So the school has at least 59 people participating in this sports meeting. |
|
| Floor105 youxi01 | Posted 2007-03-19 12:57 |
| 高级用户 Posts 247 Credits 846 From 湖南==》广东 | |
|
Through mathematical knowledge, it is known that when this number is increased by 1, it is a multiple of 2, 3, 4, 5, 6.
Thus, the following code is available: |
|
| Prev 1 … 4 5 6 7 8 9 10 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |