結果
問題 |
No.784 「,(カンマ)」
|
ユーザー |
|
提出日時 | 2019-04-12 23:10:29 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 315 bytes |
コンパイル時間 | 6,046 ms |
コンパイル使用メモリ | 32,144 KB |
実行使用メモリ | 32,532 KB |
最終ジャッジ日時 | 2024-09-15 06:14:43 |
合計ジャッジ時間 | 3,441 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 2 WA * 8 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?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; ?>