`
诗意的栖居
  • 浏览: 268039 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

No.8 The greatest product of five consecutive digits in the 1000-digit numb

阅读更多
Q:
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

A:

string = 'long string'

l = list(string)
great = 0

for i in range(0,len(l)-5):
    num = 1
    for j in range(i,i+5):
        num *= int(l[j])
        if great < num:
            great = num

print great
分享到:
评论

相关推荐

    The irrationals: a story of the numbers you can't count on

    In The Irrationals, the first popular and comprehensive book on the subject, Julian Havil tells the story of irrational numbers and the mathematicians who have tackled their challenges, from ...

    michael-jordan-a-biography-greenwood-biographies.pdf

    With the possible exceptions of boxer Muhammad Ali and baseball player Babe Ruth, no athlete has made a greater impact on American society-or in the world-than Michael Jordan. Follow the life of one ...

    Credit Risk in Online Peer-to-Peer Lending?.pdf

    ABSTRACT: Effective assessment of borrower credit risk is the greatest challenge for peer-to-peer (P2P) lenders, especially in the Chinese market, where borrowers lack widely recognized credit scores....

    Theory of Point Estimation.pdf

    The greatest change has been the addition to the sparse treatment of Bayesianinference in the first edition. This includes the addition of new sections onEquivariant, Hierarchical, and Empirical ...

    Handbook-of-Hidden-Markov-Models-in-Bioinformatics.pdf

    and wish to obtain the greatest possible information in the least amount of time. Many useful resources in terms of databases and programs are woefully underutilized by the bioinformatics community, ...

    The evolution of physics by Einstein and Infeld 1938

    Downloaded from archive.org.... A thrown stone is, from this point of view, a changing field in which the states of the greatest field intensity travel through space with the velocity of the stone.

    Earth.3of3.Romans

    BBC.Ancient.Greece.The.Greatest.Show.on.Earth.3of3.Romans.HDTV.x264.AAC.MVGroup.org.mkv.td.cfg

    JavaScript: The Good Parts

    Most programming languages contain good and bad parts, but JavaScript has more than its share of the bad, having been developed and released in a hurry before it could be refined. This authoritative ...

    Diskeeper 2008 v12.0.759.0

    and overall health of your volumes in the Dashboard tab. This information allows you to be more proactive in the management and maintenance of your computers. I-FAAST[R] (Intelligent File Access ...

    The Landmarks of New York, Fifth Edition

    accumulated data, our greatest problem was keeping track of all the changes that had taken place in a landmark since designation and determining the use of the landmark. Effecting changes in landmark ...

    Self-Help

    But the greatest tailor of all is unquestionably Andrew Johnson, the present President of the United States--a man of extraordinary force of character and vigour of intellect. In his great speech at ...

    Yunus, Muhammad - Creating A World Without Poverty; Social Business and the Future of Capitalism

    It reveals the next phase in a hopeful economic and social revolution that is already under way—and in the worldwide effort to eliminate poverty by unleashing the productive energy of every human ...

    TCP IP Illustrated, Vol 1 The Protocols 2nd.pdf

    The time-to-live field is fully described when we look at the Traceroute program in Chapter 8, because this field is the basis for the operation of the program. Similarly, many features of ICMP are ...

    微软内部资料-SQL性能优化2

    The main advantage of running in-process is that the system usually does not need to perform a context switch. The disadvantage to running in-process is that DLL has access to the process address ...

    Data Structure and Algorithms

    9.3 Attaining the greatest common denominator of two numbers . . 73 9.4 Computing the maximum value for a number of a speci¯c base consisting of N digits . . . . . . . . . . . . . . . . . . . . . ...

    雷达技术知识

    partial fulfillment of the requirements for the Master of Science degree in the Department of Geography. This thesis has been approved and accepted by: Date Committee in Charge: W. Andrew Marcus, ...

    Universal-USB-Installer

    under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-...

    hibernate-shards.jar

    on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may ...

    Handbook of Research on Soft Computing and Nature-Inspired Algorithms

    Itcausestoolwearresultinginlossofqualityoftheproduct.Non-conventional machining,ontheotherhandproducesproductwithminimumtimeandatdesiredlevelof...

    [离散数学及其应用(英文第六版)].Discrete.Mathematics.and.its.Applications.djvu

    经典教材Contents Preface vii The MathZone Companion Website xviii To the Student xx 1 The Foundations: Logic and Proofs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 ...

Global site tag (gtag.js) - Google Analytics