結果

問題 No.342 一番ワロタww
ユーザー LayCurseLayCurse
提出日時 2016-02-12 23:16:25
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 614 bytes
コンパイル時間 2,406 ms
コンパイル使用メモリ 32,080 KB
実行使用メモリ 32,472 KB
最終ジャッジ日時 2023-10-22 03:28:22
合計ジャッジ時間 3,853 ms
ジャッジサーバーID
(参考情報)
judge9 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

<?php

mb_language("japanese");
mb_internal_encoding("UTF-8");

$str = file_get_contents("php://stdin");
$doit = "";
$w = "w";

while(mb_substr($str,0,1)===$w){
  $str = mb_substr($str,1);
  continue;
}

if(mb_strlen($str)) exit(0);

for(;;){
  $chk = mb_strpos($str, $doit.$w);
  if($chk===false) break;
  $doit .= $w;
}

for(;mb_strlen($str);){
  if(mb_substr($str,0,1)===$w){
    $str = mb_substr($str,1);
    continue;
  }
  $pos1 = mb_strpos($str, $w);
  $pos2 = mb_strpos($str, $doit);
  if($pos2===false) break;
  if($pos1===$pos2) echo mb_substr($str,0,$pos1)."\n";
  $str = mb_substr($str,$pos1);
}

?>
0