[D言語] Collatz予想
Posted by
暇つぶし文@謎
at
2006-07-14 16:05
キミならどう書く 2.0 - ROUND 2 - private import std.stdio; template f(uint t){ static if(t==1) const uint f=1; else static if(t%2==0) const uint f=f!(t/2)+1; else const uint f=f!(t*3+1)+1; } template max(uint i,uint n){ static if(i>n) const uint max=i
Parent entry
キミならどう書く 2.0 - ROUND 2 -