From fbd4f2129ce8fe106391302896dd86e05b2f331b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 5 Dec 2025 04:08:22 +0900 Subject: add files --- archive/q/fizzbuzz/a/210/index.html | 75 +++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 archive/q/fizzbuzz/a/210/index.html (limited to 'archive/q/fizzbuzz/a/210/index.html') diff --git a/archive/q/fizzbuzz/a/210/index.html b/archive/q/fizzbuzz/a/210/index.html new file mode 100644 index 0000000..2dea46a --- /dev/null +++ b/archive/q/fizzbuzz/a/210/index.html @@ -0,0 +1,75 @@ + + + + + 問題 #1 - 回答 #210 | Albatross.PHP + + + + + +
+ +
+
+

問題 #1 - 回答 #210

+ + +

FizzBuzz

+

+ いわゆる「FizzBuzz」を実装してください。 +1から100までの数字について、その数が3の倍数なら「Fizz」、5の倍数なら「Buzz」、15の倍数なら「FizzBuzz」、それ以外ならその数そのものを出力してください。それぞれの出力は改行で区切ってください。 +

+

回答 #210

+

+ k-kuwata が 2024-03-09 08:30:11 に投稿 +

+

コード

+

+ 57 byte +

+
<?while($i++<100)echo$i%3?'':Fizz,$i%5?$i%3?$i:'':Buzz,"
+";
+

実行結果

+
+
+
+ ステータス: 失敗 +
+
+

テストケース 1

+
+ ステータス: 実行時エラー +
+

標準出力

+

+Warning: Undefined variable $i in php.wasm code on line 6
+1
+2
+
+Fatal error: Uncaught Error: Undefined constant "Fizz" in php.wasm code:6
+Stack trace:
+#0 {main}
+  thrown in php.wasm code on line 6
+
+
+

標準エラー出力

+

+
+
+ +
+ + + -- cgit v1.2.3-70-g09d2