Wintus
10/24/2015 - 1:59 PM

Debug 64bit int problem -- CodeIQ question solved in Haskell

Debug 64bit int problem -- CodeIQ question solved in Haskell

Top (good answer):      CodeIQ Haskell (ghc-7.8)
Bottom (wrong answer):  paiza  Haskell (ghc-7.6.2)

708010: count -> 2869584, index -> 2299
616490: count ->  120805, index -> 2082
    count diff: 2748779, index diff: 217

143850: count -> 3160493, index -> 2583
945130: count ->  411714, index -> 2366
    count diff: 2748779, index diff: 217

406250: count -> 3199999, index -> 3123
815530: count ->  451220, index -> 2906
    count diff: 2748779, index diff: 217


maxLong = 2748779 * 3125 + 217
        = 8589934592
        = 0x2_0000_0000
        = 2^33