結果

問題 No.342 一番ワロタww
コンテスト
ユーザー LayCurse
提出日時 2016-02-12 23:16:25
言語 PHP
(8.5.9)
コンパイル:
php -l _filename_
実行:
php _filename_
結果
WA  
実行時間 -
コード長 614 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 795 ms
コンパイル使用メモリ 38,396 KB
実行使用メモリ 38,652 KB
最終ジャッジ日時 2026-09-02 04:42:01
合計ジャッジ時間 1,873 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 3 WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #
raw source code

<?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