Created
October 24, 2015 13:59
-
-
Save Wintus/08e77c635d0229c6b76b to your computer and use it in GitHub Desktop.
Debug 64bit int problem -- CodeIQ question solved in Haskell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DEBUG
Question
https://codeiq.jp/q/1561