結果

問題 No.341 沈黙の期間
ユーザー yicodeyicode
提出日時 2023-05-22 14:47:51
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 89 ms / 5,000 ms
コード長 574 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 44,448 KB
最終ジャッジ日時 2023-08-23 23:26:09
合計ジャッジ時間 3,102 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
42,188 KB
testcase_01 AC 85 ms
42,288 KB
testcase_02 AC 85 ms
42,280 KB
testcase_03 AC 85 ms
42,180 KB
testcase_04 AC 85 ms
42,324 KB
testcase_05 AC 86 ms
42,356 KB
testcase_06 AC 87 ms
42,176 KB
testcase_07 AC 88 ms
44,448 KB
testcase_08 AC 88 ms
42,436 KB
testcase_09 AC 87 ms
42,360 KB
testcase_10 AC 86 ms
42,188 KB
testcase_11 AC 87 ms
42,376 KB
testcase_12 AC 89 ms
42,316 KB
testcase_13 AC 88 ms
42,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

process.stdin.resume();
process.stdin.setEncoding('utf8');
// 自分の得意な言語で
// Let's チャレンジ!!
var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  let s = lines[0];
  let count = 0;
  let ans = 0;
  for(let i = 0;i < s.length; i++) {
    if(s[i] == '…') {
      count++;
    }else {
      ans = Math.max(ans,count);
      count = 0;
    }
  }
  ans = Math.max(ans,count);
  console.log(ans);
});
0