Results 1 to 4 of 4

Thread: tricky tricky...err..word prob

  1. #1

    Thread Starter
    Addicted Member dolor's Avatar
    Join Date
    Sep 2002
    Location
    in a place seldom found on a map
    Posts
    220

    tricky tricky...err..word prob

    Let x = 0.123456789101112...997998999, where the digits are obtained by writing the integers1 through 999 in order. Find the 1983rd digit to the right of the decimal point.
    - you've been privileged to read a post by Miz

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    7
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Arrow

    Code:
    'VB6
    
    sub FindIt()
    dim text as string
    dim i as long
    
    text = "0."
    for i = 1 to 999
    text = text & str(i)
    next i
    
    msgbox mid$(text, 1985,1)
    End Sub
    I don't live here any more.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Code:
    Main> last (take 1983 (foldr1 (++) (map show [1..999])))
    '7'
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width