mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
18 lines
291 B
Nim
18 lines
291 B
Nim
discard """
|
|
exitcode: 0
|
|
targets: "c cpp js"
|
|
output: '''19316
|
|
'''
|
|
"""
|
|
|
|
from sugar import `->`, `=>`
|
|
from math import `^`, sum
|
|
from sequtils import filter, map, toSeq
|
|
|
|
proc f: int =
|
|
toSeq(10..<10_000).filter(a => a == ($a).map(d => (d.ord-'0'.ord).int^4).sum).sum
|
|
|
|
var a = f()
|
|
|
|
echo a
|