Find the greatest product of five consecutive digits in the 1000-digit number.
73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614282806444486645238749
30358907296290491560440772390713810515859307960866
70172427121883998797908792274921901699720888093776
65727333001053367881220235421809751254540594752243
52584907711670556013604839586446706324415722155397
53697817977846174064955149290862569321978468622482
83972241375657056057490261407972968652414535100474
82166370484403199890008895243450658541227588666881
16427171479924442928230863465674813919123162824586
17866458359124566529476545682848912883142607690042
24219022671055626321111109370544217506941658960408
07198403850962455444362981230987879927244284909188
84580156166097919133875499200524063689912560717606
05886116467109405077541002256983155200055935729725
71636269561882670428252483600823257530420752963450
解析:在红色的连续数字串中找出找出最大的连续5个数的乗积。
今天把分析写上,其实算法很简单就是逐次比较连续五位数字的乘积。
中间的for循环得到连续五个数的乘积,而最外层的for循环就是让最里层的for循环可以遍历完整个连续的数字字符串。
分享到:
相关推荐
openEuler-20.03-LTS-SP2-x86_64-dvd支持鲲鹏及其它多种处理器,文件分割成 5个 压缩包,必须集齐5个 文件后才能一起解压一起使用: openEuler-20.03-LTS-SP2-x86_64-dvd.part5.rar ... openEuler-20.03-LTS-SP2-x86_...
openEuler-20.03-LTS-SP2-x86_64-dvd支持鲲鹏及其它多种处理器,文件分割成 5个 压缩包,必须集齐5个 文件后才能一起解压一起使用: openEuler-20.03-LTS-SP2-x86_64-dvd.part5.rar ... openEuler-20.03-LTS-SP2-x86_...
openEuler-22.03-LTS-SP3-netinst-aarch64-dvd.iso
openEuler-20.03-LTS-SP2-x86_64-dvd支持鲲鹏及其它多种处理器,文件分割成 5个 压缩包,必须集齐5个 文件后才能一起解压一起使用: openEuler-20.03-LTS-SP2-x86_64-dvd.part5.rar ... openEuler-20.03-LTS-SP2-x86_...
openEuler-22.03-LTS-SP2-netinst-x86_64-dvd.iso 适用于x86_64平台服务器
openEuler 22.03(openEuler-22.03-LTS-SP3-x86-64-dvd.iso)适用于Linux x86-64系统,文件使用360压缩软件分割成4个压缩包,必须一起下载使用: part1: ...
openEuler-competition/National-Innovation-2021openEuler-competition/National-Innovation-2021openEuler-competition/National-Innovation-2021openEuler-competition/National-Innovation-2021openEuler-...
openEuler 20.03(openEuler-20.03-LTS-SP4-x86-64-dvd.iso)适用于Linux x86-64系统,文件使用360压缩软件分割成4个压缩包,必须一起下载使用: part1: ...
基于openEuler20.03TLS版本编译openGauss源码时需要的软件包: 1. openeuler-lsb-5.0-1.oe2203.src.rpm 2. git-lfs-linux-arm64-v3.3.0.tar.gz 3. flex-2.5.39.tar.bz2
openEuler 22.03(openEuler-22.03-LTS-SP3-x86-64-dvd.iso)适用于Linux x86-64系统,文件使用360压缩软件分割成4个压缩包,必须一起下载使用: part1: ...
openEuler-20.03-LTS-SP4-netinst-x86_64-dvd.iso
openEuler-22.03-LTS-SP2-x86_64-dvd.iso 适用于x86_64平台服务器,文件使用WinRAR分割成 4 个压缩包,必须一起下载使用: part1:https://download.csdn.net/download/weixin_43800734/88220955 part2:...
此版本的压缩包(openGauss-3.0.0-openEuler-64bit-all.tar.gz)包含了完整的软件栈,旨在提供企业级的稳定性和性能。以下是对其中主要组件和功能的详尽解析: 1. **openGauss-3.0.0-openEuler-64bit.tar.bz2**:这...
openEuler-22.03-LTS-SP2-everything-x86_64-dvd.iso 分成18份: part14: https://download.csdn.net/download/weixin_43800734/88219608 part15: https://download.csdn.net/download/weixin_43800734/88219187 ...
近日,Linux内核被曝存在提取权限漏洞(漏洞编号CVE-2024-1086),攻击者利用该漏洞可在本地进行提权操作,最高可获取目标服务器的root管理权限,根据openEuler社区公告,也存在此漏洞,此安装包为openEuler-22.03-LTS内核...
openEuler-22.03-LTS-SP2-everything-x86_64-dvd.iso 分成18份: part17: https://download.csdn.net/download/weixin_43800734/88219189 part18: https://download.csdn.net/download/weixin_43800734/88219185 ...
openEuler-22.03-LTS-SP2-x86_64.qcow2.xz 适用于x86_64平台云计算场景
openEuler-22.03-LTS-SP2-everything-x86_64-dvd.iso 分成18份: part16: https://download.csdn.net/download/weixin_43800734/88219188 part17: https://download.csdn.net/download/weixin_43800734/88219189 ...
openGauss_3.0.0 极简版(openGauss-3.0.0-openEuler-64bit.tar.bz2)适用于openeuler_x86_64
openEuler 22.03(openEuler-22.03-LTS-SP3-x86-64-dvd.iso)适用于Linux x86-64系统,文件使用360压缩软件分割成4个压缩包,必须一起下载使用: part1: ...