You are here: Home Blog Comments [Python][Programming]どう書く2

Personal tools

[Python][Programming]どう書く2

Posted by DiaryException at 2006-07-13 13:57
参考: キミならどう書く 2.0 - ROUND 2 - — Lightweight Language Ring 取り敢えず、まずはシンプルに。 Collatz予想(角谷予想) #! /usr/bin/python def g(i, r): r = r + 1 if i == 1: return r if i % 2 == 0: return g(i / 2, r) if i % 2 == 1: return g(3 *
Parent entry キミならどう書く 2.0 - ROUND 2 -