Comment detail

LL Golf Hole 5 - 最上位の桁を数え上げる (Nested Flatten)
1
2
3
4
5
6
7
#!/usr/bin/env python
# -*- coding: utf8 -*-
def f(n, m=0):
    print m
    return (n == m) and True or f(n, m + 10 ** (len(str(m)) - 1))

f(300)

Index

Feed

Other

Link

Pathtraq

loading...