diff options
| author | Mistivia <i@mistivia.com> | 2024-02-15 17:06:54 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2024-02-15 17:06:54 +0800 |
| commit | 58709a89622062b527b242f65aa0501a4efd47d3 (patch) | |
| tree | 118a2a30c2dfc65360c4d5a8c85a81b80178c93a /codewars/6-kyu/does-my-number-look-big-in-this | |
| parent | 4e5cb9c3b56bc1c84118586d2f9b7fde6566285a (diff) | |
update
Diffstat (limited to 'codewars/6-kyu/does-my-number-look-big-in-this')
| -rw-r--r-- | codewars/6-kyu/does-my-number-look-big-in-this/solution.hs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/codewars/6-kyu/does-my-number-look-big-in-this/solution.hs b/codewars/6-kyu/does-my-number-look-big-in-this/solution.hs deleted file mode 100644 index 1b84d9f..0000000 --- a/codewars/6-kyu/does-my-number-look-big-in-this/solution.hs +++ /dev/null @@ -1,17 +0,0 @@ --- https://www.codewars.com/kata/5287e858c6b5a9678200083c - -module Narcissistic where - -splitNum n = reverse $ impl n - where - impl n - | n < 10 = [n] - | otherwise = (n `mod` 10):(impl (n `div` 10)) - -narcissistic :: Integral n => n -> Bool -narcissistic n - | (sum $ map (^ (length splited)) splited) == n = True - | otherwise = False - where - splited = splitNum n - |
