aboutsummaryrefslogtreecommitdiff
path: root/challenge-282/conor-hoekstra/ch-1.bqn
blob: c8af7dc26da1382d5a872a7d77f12010eb03c0d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
# For up to date code:
# https://github.com/codereport/bqn-code/blob/main/pwc/282-1.bqn

Group  •Import "../lib/fun.bqn"

GoodInteger  ¯1˜·(3=≠¨)/Group

# Tests
•Show GoodInteger "12344456" # "444"
•Show GoodInteger "1233334"  # -1
•Show GoodInteger "10020003" # "000"