aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/posts/2022-08-27/php-conference-okinawa-code-golf/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'public/posts/2022-08-27/php-conference-okinawa-code-golf/index.html')
-rw-r--r--public/posts/2022-08-27/php-conference-okinawa-code-golf/index.html10
1 files changed, 3 insertions, 7 deletions
diff --git a/public/posts/2022-08-27/php-conference-okinawa-code-golf/index.html b/public/posts/2022-08-27/php-conference-okinawa-code-golf/index.html
index fbac1f0..ea60e83 100644
--- a/public/posts/2022-08-27/php-conference-okinawa-code-golf/index.html
+++ b/public/posts/2022-08-27/php-conference-okinawa-code-golf/index.html
@@ -111,9 +111,7 @@
書いたものがこちら:
</p>
- <pre class="highlight" language="php" linenumbering="unnumbered">
- <code>[&lt;?php $n=$argv[1];foreach([1e4,5e3,2e3,1e3,500,100,50,10,5,1]as$x)for(;$n&gt;=$x;$n-=$x)$r[]=$x;echo implode(&apos;, &apos;,$r??[]);?&gt;]</code>
- </pre>
+ <pre class="highlight" language="php" linenumbering="unnumbered"><code>[&lt;?php $n=$argv[1];foreach([1e4,5e3,2e3,1e3,500,100,50,10,5,1]as$x)for(;$n&gt;=$x;$n-=$x)$r[]=$x;echo implode(&apos;, &apos;,$r??[]);?&gt;]</code></pre>
<p>
しめて 123 バイトとなった (末尾改行を含めずにカウント)。
@@ -123,8 +121,7 @@
こちらは改行とスペースを追加したバージョン:
</p>
- <pre class="highlight" language="php" linenumbering="unnumbered">
- <code>[&lt;?php
+ <pre class="highlight" language="php" linenumbering="unnumbered"><code>[&lt;?php
$n = $argv[1];
foreach ([1e4, 5e3, 2e3, 1e3, 500, 100, 50, 10, 5, 1] as $x)
@@ -132,8 +129,7 @@
$r[] = $x;
echo implode(&apos;, &apos;, $r ?? []);
- ?&gt;]</code>
- </pre>
+ ?&gt;]</code></pre>
</section>
<section id="section--_使用したテクニック">