Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Finding sum of all digits from 1 to 1 million.

by flexvault (Monsignor)
on Jan 30, 2013 at 19:32 UTC ( [id://1016144]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
       100                sum: 3
       101                sum: 6
       102                sum: 9
       ...
    
  2. or download this
    perl -E '$sum=0;for(1..1e6){$sum+=length($_);} say $sum;'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1016144]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-03-28 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found