From 9d5ec5e3bc01c6174dea048e118edee579c36565 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 7 Feb 2026 23:06:23 +0900 Subject: fix(style): fix codeblock style for rouge --- .../php-conference-okinawa-code-golf/index.html | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'services/nuldoc/public/blog/posts/2022-08-27/php-conference-okinawa-code-golf/index.html') diff --git a/services/nuldoc/public/blog/posts/2022-08-27/php-conference-okinawa-code-golf/index.html b/services/nuldoc/public/blog/posts/2022-08-27/php-conference-okinawa-code-golf/index.html index 848739b4..08f16b61 100644 --- a/services/nuldoc/public/blog/posts/2022-08-27/php-conference-okinawa-code-golf/index.html +++ b/services/nuldoc/public/blog/posts/2022-08-27/php-conference-okinawa-code-golf/index.html @@ -15,7 +15,7 @@ PHP カンファレンス沖縄で出題されたコードゴルフの問題を解いてみた|REPL: Rest-Eat-Program Loop - +
@@ -144,8 +144,7 @@ 書いたものがこちら:

-
[<?php $n=$argv[1];foreach([1e4,5e3,2e3,1e3,500,100,50,10,5,1]as$x)for(;$n>=$x;$n-=$x)$r[]=$x;echo implode(', ',$r??[]);?>]
-
+
[<?php $n=$argv[1];foreach([1e4,5e3,2e3,1e3,500,100,50,10,5,1]as$x)for(;$n>=$x;$n-=$x)$r[]=$x;echo implode(', ',$r??[]);?>]

しめて 123 バイトとなった (末尾改行を含めずにカウント)。 @@ -154,16 +153,15 @@ こちらは改行とスペースを追加したバージョン:

-
[<?php
-
-$n = $argv[1];
-foreach ([1e4, 5e3, 2e3, 1e3, 500, 100, 50, 10, 5, 1] as $x)
-  for (; $n >= $x; $n -= $x)
-    $r[] = $x;
-echo implode(', ', $r ?? []);
-
-?>]
-
+
[<?php +
+
$n = $argv[1]; +
foreach ([1e4, 5e3, 2e3, 1e3, 500, 100, 50, 10, 5, 1] as $x) +
for (; $n >= $x; $n -= $x) +
$r[] = $x; +
echo implode(', ', $r ?? []); +
+
?>]
-- cgit v1.3-1-g0d28