結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー Ruizi_Luigi
提出日時 2015-07-24 10:52:41
言語 PHP
(8.5.4)
コンパイル:
php -l _filename_
実行:
php _filename_
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 260 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 258 ms
コンパイル使用メモリ 37,756 KB
実行使用メモリ 38,420 KB
最終ジャッジ日時 2026-03-30 06:47:15
合計ジャッジ時間 694 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
PHP Deprecated:  Non-canonical cast (integer) is deprecated, use the (int) cast instead in Main.php on line 4

Deprecated: Non-canonical cast (integer) is deprecated, use the (int) cast instead in Main.php on line 4
No syntax errors detected in Main.php

ソースコード

diff #
raw source code

<?php
    $n = trim(fgets(STDIN));
    
    for ($i = 1; $i <= (integer)$n; $i++) {
    	if ($i > 1) echo "\n";
    	$tmp = "";
    	if ($i%3 === 0) $tmp .= "Fizz";
    	if ($i%5 === 0) $tmp .= "Buzz";
    	echo (strlen($tmp) > 0 ? $tmp : (string)$i);
    }
?>
0