I hereby claim:
- I am vaibhavsagar on github.
- I am vaibhavsagar (https://keybase.io/vaibhavsagar) on keybase.
- I have a public key whose fingerprint is C358 4D99 C4E3 B6FF AE66 4BFC 1CE0 EE35 7CFB 9A10
To claim this, I am signing this object:
-- Slow solution that fails for n>19 due to integer overflow | |
import Data.List | |
import Data.Ord | |
maxPair n = sortBy (comparing snd) [(x,y) | x <- [0,3..n], y <- [0,5..(n-x)], x+y==n] | |
gen [] = -1 | |
gen ((x,y):_) = let | |
noOf5s = (replicate x '5') | |
noOf3s = (replicate y '3') | |
in read (noOf5s ++ noOf3s) :: Int |
I hereby claim:
To claim this, I am signing this object: