Skip to content

Instantly share code, notes, and snippets.

@Wintus
Created October 24, 2015 13:59
Show Gist options
  • Save Wintus/08e77c635d0229c6b76b to your computer and use it in GitHub Desktop.
Save Wintus/08e77c635d0229c6b76b to your computer and use it in GitHub Desktop.
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
@Wintus
Copy link
Author

Wintus commented Oct 24, 2015

DEBUG

Question

https://codeiq.jp/q/1561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment