Blog about programming and math

SPOJ 10186. Divisor Digits is easy problem in my opinion but I haven’t solve this problem so I may be wrong and read it further at you own risk :). What I understood is , we have to count all the individual digits which divides the given number. Wiki page for divisibility.This problem is not allowed in Haskell so I am not sure if this solutions is correct as well fast enough to get accepted ( I requested problem setter to allow Haskell or move the same copy of problem in tutorial section with increased time limit ). All the divisibility rules are simple except seven [ Just iterated through the number and taking mod 7. We can also do mod ( fst . fromJust . BS.readInteger $ s ) 7 ) ]. Haskell code for this problem.

About

Hello All, My name is Mukesh Tiwari and I graduated from IIITM Gwalior in 2009. I am passionate about programming and mathematics. I love solving problems on SPOJ , UVA , Topcoder and Project Euler. I am curious about functional languages specially Haskell and it’s one the excellent language I encountered after python. I am also looking for some challenging functional programming job specially related to Haskell. You can reach me mukeshtiwariDOTiiitmATgmailDOTcom. Replace DOT with . and AT with @