Current location - Training Enrollment Network - Mathematics courses - A detailed solution to a math problem
A detailed solution to a math problem
The method of red-violet fire in hell upstairs is right, but the result is wrong.

The first calculation period is 15 step, and every 15 step, five are dropped and three are picked, which is equivalent to a net loss of two, so,

100/2* 15=750 steps, it should be 0, but it is not.

Because in step 735, there is 2 in the pocket, 100-735/ 15*2=2.

From the ninth step to the 744th step, I picked 1 and lost three, which happened to be gone.

Go one step further until step 10, but there is no chance at step 10, because the game is over and there is no sugar in the pocket after step 9.

When doing this kind of problem, we should pay special attention to the change of the amount of sugar in the pocket when there is less than one cycle left.

The following is the corresponding relationship between the number of steps taken and the sugar in the pocket. (completed by the program)

arr = {{ 1, 100 } };

For [i = 1, I < 2000, i++,

If[Mod[i,3]= = 0 & amp; & ampMod[i,5]! = 0,

arr = Append[arr,{i,arr[[- 1]][[- 1]]- 1 }];

If[Mod[i,3]= = 0 & amp; & ampMod[i,5] == 0,

arr = Append[arr,{i,arr[[- 1]][[- 1]]}];

If[Mod[i,3]! = 0 & amp& ampMod[i,5] == 0,

arr = Append[arr,{i,arr[[- 1]][[- 1]]+ 1 }];

if[arr[[- 1]][[- 1]]= = 0,Break[]];

]

arrive)

{ 1, 100},

{3,99},

{5, 100},

{6,99},

{9,98},

{ 10,99},

{ 12,98},

{ 15,98},

{ 18,97},

{20,98},

{2 1,97},

{24,96},

{25,97},

{27,96},

{30,96},

{33,95},

{35,96},

{36,95},

{39,94},

{40,95},

{42,94},

{45,94},

{48,93},

{50,94},

{5 1,93},

{54,92},

{55,93},

{57,92},

{60,92},

{63,9 1},

{65,92},

{66,9 1},

{69,90},

{70,9 1},

{72,90},

{75,90},

{78,89},

{80,90},

{8 1,89},

{84,88},

{85,89},

{87,88},

{90,88},

{93,87},

{95,88},

{96,87},

{99,86},

{ 100,87},

{ 102,86},

{ 105,86},

{ 108,85},

{ 1 10,86},

{ 1 1 1,85},

{ 1 14,84},

{ 1 15,85},

{ 1 17,84},

{ 120,84},

{ 123,83},

{ 125,84},

{ 126,83},

{ 129,82},

{ 130,83},

{ 132,82},

{ 135,82},

{ 138,8 1},

{ 140,82},

{ 14 1,8 1},

{ 144,80},

{ 145,8 1},

{ 147,80},

{ 150,80},

{ 153,79},

{ 155,80},

{ 156,79},

{ 159,78},

{ 160,79},

{ 162,78},

{ 165,78},

{ 168,77},

{ 170,78},

{ 17 1,77},

{ 174,76},

{ 175,77},

{ 177,76},

{ 180,76},

{ 183,75},

{ 185,76},

{ 186,75},

{ 189,74},

{ 190,75},

{ 192,74},

{ 195,74},

{ 198,73},

{200,74},

{20 1,73},

{204,72},

{205,73},

{207,72},

{2 10,72},

{2 13,7 1},

{2 15,72},

{2 16,7 1},

{2 19,70},

{220,7 1},

{222,70},

{225,70},

{228,69},

{230,70},

{23 1,69},

{234,68},

{235,69},

{237,68},

{240,68},

{243,67},

{245,68},

{246,67},

{249,66},

{250,67},

{252,66},

{255,66},

{258,65},

{260,66},

{26 1,65},

{264,64},

{265,65},

{267,64},

{270,64},

{273,63},

{275,64},

{276,63},

{279,62},

{280,63},

{282,62},

{285,62},

{288,6 1},

{290,62},

{29 1,6 1},

{294,60},

{295,6 1},

{297,60},

{300,60},

{303,59},

{305,60},

{306,59},

{309,58},

{3 10,59},

{3 12,58},

{3 15,58},

{3 18,57},

{320,58},

{32 1,57},

{324,56},

{325,57},

{327,56},

{330,56},

{333,55},

{335,56},

{336,55},

{339,54},

{340,55},

{342,54},

{345,54},

{348,53},

{350,54},

{35 1,53},

{354,52},

{355,53},

{357,52},

{360,52},

{363,5 1},

{365,52},

{366,5 1},

{369,50},

{370,5 1},

{372,50},

{375,50},

{378,49},

{380,50},

{38 1,49},

{384,48},

{385,49},

{387,48},

{390,48},

{393,47},

{395,48},

{396,47},

{399,46},

{400,47},

{402,46},

{405,46},

{408,45},

{4 10,46},

{4 1 1,45},

{4 14,44},

{4 15,45},

{4 17,44},

{420,44},

{423,43},

{425,44},

{426,43},

{429,42},

{430,43},

{432,42},

{435,42},

{438,4 1},

{440,42},

{44 1,4 1},

{444,40},

{445,4 1},

{447,40},

{450,40},

{453,39},

{455,40},

{456,39},

{459,38},

{460,39},

{462,38},

{465,38},

{468,37},

{470,38},

{47 1,37},

{474,36},

{475,37},

{477,36},

{480,36},

{483,35},

{485,36},

{486,35},

{489,34},

{490,35},

{492,34},

{495,34},

{498,33},

{500,34},

{50 1,33},

{504,32},

{505,33},

{507,32},

{5 10,32},

{5 13,3 1},

{5 15,32},

{5 16,3 1},

{5 19,30},

{520,3 1},

{522,30},

{525,30},

{528,29},

{530,30},

{53 1,29},

{534,28},

{535,29},

{537,28},

{540,28},

{543,27},

{545,28},

{546,27},

{549,26},

{550,27},

{552,26},

{555,26},

{558,25},

{560,26},

{56 1,25},

{564,24},

{565,25},

{567,24},

{570,24},

{573,23},

{575,24},

{576,23},

{579,22},

{580,23},

{582,22},

{585,22},

{588,2 1},

{590,22},

{59 1,2 1},

{594,20},

{595,2 1},

{597,20},

{600,20},

{603, 19},

{605,20},

{606, 19},

{609, 18},

{6 10, 19},

{6 12, 18},

{6 15, 18},

{6 18, 17},

{620, 18},

{62 1, 17},

{624, 16},

{625, 17},

{627, 16},

{630, 16},

{633, 15},

{635, 16},

{636, 15},

{639, 14},

{640, 15},

{642, 14},

{645, 14},

{648, 13},

{650, 14},

{65 1, 13},

{654, 12},

{655, 13},

{657, 12},

{660, 12},

{663, 1 1},

{665, 12},

{666, 1 1},

{669, 10},

{670, 1 1},

{672, 10},

{675, 10},

{678,9},

{680, 10},

{68 1,9},

{684,8},

{685,9},

{687,8},

{690,8},

{693,7},

{695,8},

{696,7},

{699,6},

{700,7},

{702,6},

{705,6},

{708,5},

{7 10,6},

{7 1 1,5},

{7 14,4},

{7 15,5},

{7 17,4},

{720,4},

{723,3},

{725,4},

{726,3},

{729,2},

{730,3},

{732,2},

{735,2},

{738, 1},

{740,2},

{74 1, 1},

{744,0}.