結果
| 問題 | 
                            No.342 一番ワロタww
                             | 
                    
| コンテスト | |
| ユーザー | 
                             worksapproval
                         | 
                    
| 提出日時 | 2018-10-26 13:24:45 | 
| 言語 | JavaScript  (node v23.5.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 640 bytes | 
| コンパイル時間 | 28 ms | 
| コンパイル使用メモリ | 6,692 KB | 
| 実行使用メモリ | 42,352 KB | 
| 最終ジャッジ日時 | 2024-10-13 00:51:43 | 
| 合計ジャッジ時間 | 1,691 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | RE * 3 | 
| other | RE * 14 | 
ソースコード
process.stdin.resume();
process.stdin.setEncoding('utf8');
// Your code here!
(() => {
    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]);
    }
})();
    
            
            
            
        
            
worksapproval