結果

問題 No.784 「,(カンマ)」
ユーザー t.shibukit.shibuki
提出日時 2019-04-12 22:50:43
言語 PHP
(8.2.11)
結果
WA  
実行時間 -
コード長 296 bytes
コンパイル時間 819 ms
コンパイル使用メモリ 12,036 KB
実行使用メモリ 12,320 KB
最終ジャッジ日時 2023-10-13 08:45:20
合計ジャッジ時間 1,706 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 7 ms
12,256 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 7 ms
12,272 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);
}

//print_r($word);

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

echo $out;

?>
0