結果

問題 No.341 沈黙の期間
ユーザー ontama_12
提出日時 2016-09-26 18:09:21
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 728 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 42,192 KB
最終ジャッジ日時 2024-10-12 23:51:01
合計ジャッジ時間 1,678 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

    /////////////////////////No.394 ハーフパイプ(1)
    //入力文字読み取り
    process.stdin.resume();
    process.stdin.setEncoding('utf8');
    process.stdin.on('data', function (chunk) {

        var str = chunk.split("")

        // …の一時的なカウント用
        var count = 0

        // …の最終的な結果を表示
        var result = 0


        for(var i=0;i<str.length;i++){
            if(str[i] == "…"){
                count++
            }else{
                if(result<count){
                    result=count
                }
                count=0
            }
        }
        if (result < count) {
            result = count
        }
        console.log(result)
    });
0