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/283/index.html | 71 +++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 archive/q/fizzbuzz/a/283/index.html (limited to 'archive/q/fizzbuzz/a/283/index.html') diff --git a/archive/q/fizzbuzz/a/283/index.html b/archive/q/fizzbuzz/a/283/index.html new file mode 100644 index 0000000..0b0c9d6 --- /dev/null +++ b/archive/q/fizzbuzz/a/283/index.html @@ -0,0 +1,71 @@ + + + + + 問題 #1 - 回答 #283 | Albatross.PHP + + + + + +
+ +
+
+

問題 #1 - 回答 #283

+ + +

FizzBuzz

+

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

+

回答 #283

+

+ shogogg が 2024-03-09 14:50:58 に投稿 +

+

コード

+

+ 74 byte +

+
<?$i=0;while($i++<100)echo(($i%3?Fizz:'').($i%5?Buzz:'').($i%15?'':$i)."
+");
+

実行結果

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

テストケース 1

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

標準出力

+

+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