https://projecteuler.net/problem=28角から次の角を求められればよいです。 import sys alias Point = Tuple[Int, Int] fn proceed(pt: Point, n: Int) -> Tuple[Point, Int]: var x = pt.get[0, Int]() var y = pt.get[1, Int]() if x >= 0 and y >= 0: return ((x+1, -y-1), n+x*2+2) elif x >= 0: return ((-x, y), n+x*2) elif y < 0: re…