結果

問題 No.784 「,(カンマ)」
ユーザー t.shibukit.shibuki
提出日時 2019-04-12 23:10:29
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 315 bytes
コンパイル時間 513 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 12,384 KB
最終ジャッジ日時 2023-10-13 09:07:04
合計ジャッジ時間 1,501 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
12,276 KB
testcase_01 AC 7 ms
12,272 KB
testcase_02 AC 7 ms
12,184 KB
testcase_03 AC 7 ms
12,260 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 8 ms
12,332 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$cnt=0;
$word=null;
$out=null;

fscanf(STDIN,"%d",$input);

$length=strlen($input);

for($i=0;$i<=$length-1;$i++){
    $word[]=substr($input,$i,1);
}

rsort($word);

for($i=$length-1;$i>=0;$i--){
    $out.=array_pop($word);
        if($i%3==0 && $i!=0){
            $out.=',';    
        }
}

echo $out;

?>
0