You are viewing a single comment's thread. Return to all comments →
I usually use some variation of this, and I find it to be cleaner (IMO)
import Control.Monad main = do t <- read <$> getLine replicateM_ t $ do [m,n] <- fmap read . words <$> getLine print $ countCommonDivisors m n
Seems like cookies are disabled on this browser, please enable them to open this website
Common Divisors
You are viewing a single comment's thread. Return to all comments →
I usually use some variation of this, and I find it to be cleaner (IMO)