結果

問題 No.342 一番ワロタww
ユーザー papinianuspapinianus
提出日時 2016-09-27 00:47:49
言語 PHP
(8.3.4)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 380 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 32,404 KB
実行使用メモリ 32,916 KB
最終ジャッジ日時 2024-05-01 05:36:22
合計ジャッジ時間 1,665 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 37 ms
31,232 KB
testcase_02 AC 37 ms
31,372 KB
testcase_03 AC 34 ms
31,488 KB
testcase_04 AC 34 ms
31,212 KB
testcase_05 AC 35 ms
31,188 KB
testcase_06 AC 34 ms
31,192 KB
testcase_07 AC 34 ms
31,184 KB
testcase_08 AC 34 ms
31,320 KB
testcase_09 AC 32 ms
31,236 KB
testcase_10 AC 36 ms
31,028 KB
testcase_11 AC 36 ms
31,164 KB
testcase_12 AC 33 ms
31,140 KB
testcase_13 AC 33 ms
31,416 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 34 ms
31,228 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$str = trim(fgets(STDIN));
$pattern = "([^w]+?)([w]+)";
$str = mb_convert_encoding($str, "UTF-8");
mb_regex_encoding('UTF-8');
mb_ereg_search_init($str, $pattern);
while(($match = mb_ereg_search_regs()) !== false)
{
    $len = mb_strlen($match[2]);
    $lens[] = $len;
    $substrs[$len][] = $match[1];
}
$max = max($lens);
echo implode(PHP_EOL, $substrs[$max]).PHP_EOL;
0