创建此算法的块方案

编程入门 行业动态 更新时间:2024-10-27 18:21:53
本文介绍了创建此算法的块方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

找到这个数字范围的总和和乘积:2,4,8,16 ... a)直到数字1000 b)没有结束数字(我不确定这一点是否正确)我解决了一点,但我不知道它是否正确。这是正确的吗? http:// codegolf.stackexchange/questions/50853/create-the-block-scheme-of-this-algorithm [ ^ ]

Find the sum and the product of this range of numbers: 2,4,8, 16... a) till the number 1000 b) no ending number (I'm not sure this point is correct) I solved the a point but I don't know if it is right. Is it correct? codegolf.stackexchange/questions/50853/create-the-block-scheme-of-this-algorithm[^]

推荐答案

试一试。 拿出一支铅笔和纸,把结尾的数字想象成5而不是1000以使它具有人类可读性,并使用纸和笔来记录发生的事情。 你得到了正确的结果吗?如果是这样,那么(a)是正确的。 没有(b)......所以这是不对的! Try it. Get out a pencil and paper, think of the ending number as 5 instead of 1000 to make it human readable and follow it through, using the paper and pencil to record what happens. Do you get the right result? If so, then (a) is correct. There is no (b)...so that isn't right!

更多推荐

创建此算法的块方案

本文发布于:2023-11-29 19:13:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1647366.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:算法   方案

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!