aboutsummaryrefslogtreecommitdiff
path: root/challenge-116/stuart-little/python/ch-2.py
blob: 3c8e5e1d4568bf8182dfce05d65180e860939fc2 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env python

# run <script> <number>

import math
import sys

digSqSum=sum(map(lambda x: int(x) ** 2,list(sys.argv[1])))
print(int(digSqSum == int(math.sqrt(digSqSum)) ** 2))