2012-08-11
FizzBuzz
@
01:10
Label:
code
気が向いたので書いてみる。
fizzbuzz=lambda num:"".join([["",word][int(divmod(num,base)[1]==0)] for word, base in [("Fizz",3),("Buzz",5)]]) or str(num)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment