Tokur 发布于五月 12, 2021 分享 发布于五月 12, 2021 (已修改) 今天的MMA作业挺简单的啊(确信)XD *哒哒哒哒哒哒* (敲代码的声音) Clear["`*"] A1 := Solve[{Mod[x, 5] == 0, 1 <= x <= 1000, x \[Element] Integers}, x] A2 := Solve[{Mod[x, 6] == 0, 1 <= x <= 1000, x \[Element] Integers}, x] A3 := Solve[{Mod[x, 8] == 0, 1 <= x <= 1000, x \[Element] Integers}, x] A4 := Union[A1, A2, A3] A5 := Table[{x -> i}, {i, 1, 1000}] A6 := Complement[A5, A4] Length[A6] Link Start!(雾 出现了!答案不多不少刚好600个! 悄咪咪补充个简洁亿点点点的算法x Length[Select[Range[1000], ! Mod[#, 5] == 0 && ! Mod[#, 6] == 0 && ! Mod[#, 8] == 0 &]] 五月 12, 2021,由Tokur233修改 Tokur水回不料路遇小白,被乱刀砍死.-4节操 注释 Eternalcycle 100.00节操 奖励 链接到点评
推荐贴