結果
問題 | No.341 沈黙の期間 |
ユーザー |
|
提出日時 | 2023-05-22 14:47:51 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 85 ms / 5,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 99 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 40,320 KB |
最終ジャッジ日時 | 2024-12-22 10:29:28 |
合計ジャッジ時間 | 4,128 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
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);});