China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-31 23:33
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Discussion][Exploration] Using batch processing to make interesting math problems DigestI View 36,417 Replies 139
Floor 61 Posted 2006-11-18 05:41 ·  中国 河北 廊坊 三河市 移动
金牌会员
★★★★
Credits 2,725
Posts 1,160
Joined 2006-09-23 12:00
19-year member
UID 63486
From 河北廊坊
Status Offline
Fame and fortune are external things; what matters is to acquire knowledge.
三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。
Floor 62 Posted 2006-11-18 05:54 ·  中国 江苏 苏州 联通
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
Marked as (Essence) for easier finding. ^_^
Floor 63 Posted 2006-11-18 07:46 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Originally posted by namejm at 2006-11-17 16:27:
It might be that some moderator operated improperly and removed the essence, and now it is re-added as essence. However, there is a little regret that the original poster of this post was zouzhxi, but when returning to the post list interface to look...

It's not that the essence was removed, but that the PID was changed when merging topics. Oh, my.
Floor 64 Posted 2006-11-19 00:07 ·  中国 广东 清远 联通
高级用户
★★
Credits 846
Posts 247
Joined 2006-10-27 12:03
19-year member
UID 68504
Gender Male
From 湖南==》广东
Status Offline
Let's attack the "castle" again. First, release my calculation results and see if the answers are correct first?!

Question 19, 10 digits; this should be no problem, 9 sixes and one 2.

Question 20, 14, 10, 35 (the problem of the least common multiple)

Question 21, 1.8 degrees

Looking forward to the building owner's reply.
Floor 65 Posted 2006-11-19 00:59 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
### 第19题:
@echo off
setlocal enabledelayedexpansion
set a=3333333333
set b=9999999999
set a1=%a%0000000000
set/a jg=1%a1:~-9%-%a:~-9%
set a1=%a1:~0,-9%
set/a jg1=%a1:~-9%-1-%a:~0,-9%
set jg=%a1:~0,-9%%jg1%%jg%
for /l %%a in (0,1,19) do for /l %%b in (0,2,8) do (set tm=!jg:~%%a,1!
if !tm!==%%b set/a gs+=1)
echo %a%*%b%=%jg%
echo 共有%gs%个偶数
pause
Floor 66 Posted 2006-11-19 01:06 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
**第20题:**
@echo off
set a=5
set b=7
set C=2
set/a ji=a*b*c
set/a a1=ji/a
set/a b1=ji/b
set/a c1=ji/c
echo The number of teeth of these three gears should be at least %a1%, %b1%, %c1% teeth!
pause
Floor 67 Posted 2006-11-19 02:12 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
The first two questions are correct. As for the last question? Since it's not the question I made, I'm also calculating it, and I don't know if the result is correct!!!
Floor 68 Posted 2006-11-19 07:07 ·  中国 广东 清远 联通
高级用户
★★
Credits 846
Posts 247
Joined 2006-10-27 12:03
19-year member
UID 68504
Gender Male
From 湖南==》广东
Status Offline
Question 21 write the corresponding code, I can't, but I can talk about my thinking:
1>First of all, it should be clear that the mass of a cup of water can be ignored compared to a basin of water.
Suppose the temperature of the hot water in the cup drops by X degrees at the very beginning, then it drops by X-3 degrees for the second time
According to the physics formula: Q=cm△t, we can know:
3/5=(X-3)/X
Solve for X=7.5
2>Let the temperature of the water in the basin rise by a degree when heating water for the third time, then:
a/3=(4.5-a)/4.5
Solve for a=1.8

This is the thinking of the above problem, but unfortunately, I can't make it automatically complete with a computer.
Floor 69 Posted 2006-11-20 03:22 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
????
I haven't written it out yet...
!!!
Floor 70 Posted 2006-11-21 00:22 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 71 Posted 2006-11-21 00:40 ·  IANA 局域网IP(Private-Use)
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
I still can't write it with BAT... I don't know if any expert can post the code for reference!!!
Floor 72 Posted 2006-11-21 01:27 ·  中国 广东 清远 联通
高级用户
★★
Credits 846
Posts 247
Joined 2006-10-27 12:03
19-year member
UID 68504
Gender Male
From 湖南==》广东
Status Offline
The 4.5 on the 68th floor is based on 7.5 - 3, that's because for the first time, there was a problem with the hot water, and it was cooled down by 3 degrees the first time.
Floor 73 Posted 2006-11-21 03:10 ·  中国 江苏 苏州 联通
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
The standard answer is to rise another 2 degrees.
Floor 74 Posted 2006-11-21 05:39 ·  中国 广东 清远 联通
高级用户
★★
Credits 846
Posts 247
Joined 2006-10-27 12:03
19-year member
UID 68504
Gender Male
From 湖南==》广东
Status Offline
According to physics, it's impossible!

Could it really be a so-called primary school problem, and we've artificially made it complicated!
Floor 75 Posted 2006-11-21 05:50 ·  中国 江苏 苏州 联通
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
It's a junior high school problem. This problem doesn't seem suitable for solving with a program.
‹ Prev 1 3 4 5 6 7 10 Next ›
Forum Jump: