Merge branch 'devel' of github.com:nim-lang/Nim into devel
This commit is contained in:
commit
9995f50050
1 changed files with 17 additions and 0 deletions
17
tests/openarray/t6163.nim
Normal file
17
tests/openarray/t6163.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
discard """
|
||||||
|
exitcode: 0
|
||||||
|
targets: "c cpp js"
|
||||||
|
output: '''19316
|
||||||
|
'''
|
||||||
|
"""
|
||||||
|
|
||||||
|
from future 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue