結果

問題 No.342 一番ワロタww
ユーザー worksapproval
提出日時 2018-10-26 13:19:08
言語 JavaScript
(node v23.5.0)
結果
WA  
実行時間 -
コード長 583 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 6,948 KB
実行使用メモリ 42,300 KB
最終ジャッジ日時 2024-10-13 00:51:28
合計ジャッジ時間 2,152 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

process.stdin.resume();
process.stdin.setEncoding('utf8');
// Your code here!
let S = "wwそれなww";
S = S.match(/[^w]+.*/)[0];
let ar = S.split(/(w+)/);
let longest = 0;
let resultIndex = [];
console.log(ar);
for(let i=0;i<ar.length;i++){
    let p = /[w]+/;
    if(p.test(ar[i])){
        if(ar[i].length>longest){
            longest = ar[i].length;
            resultIndex=[];
            resultIndex.push(i);
        }else if(ar[i].length==longest){
            resultIndex.push(i);
        }
    }
}
for(i of resultIndex){
    console.log(ar[i-1]);
}
return ar;
0