[ create a new paste ] login | about

Link: http://codepad.org/UzRjUfXs    [ raw code | output | fork ]

Python, pasted on Dec 3:
1
2
3
4
5
#!/usr/bin/env python3

INPUT = "9919999"

print(sum(map(lambda a, b: int(a) if a == b else 0, INPUT, INPUT[1:]+INPUT[0])))


Output:
1
45


Create a new paste based on this one


Comments: