sln_2017_02
Copyright(c) Eric Mertens 2017
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

Synopsis

Documentation

main :: IO () Source #

checksum1 :: [Int] -> Int Source #

First checksum is the difference of the largest and smallest elements

>>> checksum1 [5,1,9,5]
8
>>> checksum1 [7,5,3]
4
>>> checksum1 [2,4,6,8]
6

checksum2 :: [Int] -> Int Source #

Second checksum is the quotient of the only two elements that evenly divide each other.

>>> checksum2 [5,9,2,8]
4
>>> checksum2 [9,4,7,3]
3
>>> checksum2 [3,8,6,5]
2