From a28bf70d0bfd2d94fb1f1ea561f40661cbddf3d4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 14 Feb 2023 23:04:39 +0900 Subject: 枚数、分量を削減 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catchline.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'catchline.php') diff --git a/catchline.php b/catchline.php index 058abeb..97f3c93 100644 --- a/catchline.php +++ b/catchline.php @@ -2,14 +2,16 @@ try { f(3); } catch (Throwable $e) { - while ($e = $e->getPrevious()) printf('%c', $e->getLine() + 23); + do { + printf('%c', $e->getLine() + 21); + } while ($e = $e->getPrevious()); echo "\n"; } function f(int $i) { - if ($i < 0) f(); + if ($i < 0) return; try { match ($i) { - 0 => X, // 12行目 + 0 => X, // 14行目 @@ -46,7 +48,7 @@ function f(int $i) { - 2 => X, // 49行目 + 2 => X, // 51行目 @@ -54,7 +56,7 @@ function f(int $i) { - 1, 3 => X, // 57行目 + 1, 3 => X, // 59行目 }; } finally { f($i - 1); -- cgit v1.2.3-70-g09d2