結果

問題 No.341 沈黙の期間
ユーザー tottoripapertottoripaper
提出日時 2018-02-16 18:09:44
言語 Ruby
(3.2.2)
結果
AC  
実行時間 84 ms / 5,000 ms
コード長 226 bytes
コンパイル時間 463 ms
コンパイル使用メモリ 11,180 KB
実行使用メモリ 15,288 KB
最終ジャッジ日時 2023-09-02 19:11:01
合計ジャッジ時間 2,188 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,256 KB
testcase_01 AC 84 ms
15,116 KB
testcase_02 AC 82 ms
15,020 KB
testcase_03 AC 83 ms
15,048 KB
testcase_04 AC 82 ms
15,076 KB
testcase_05 AC 80 ms
15,248 KB
testcase_06 AC 81 ms
15,120 KB
testcase_07 AC 81 ms
15,136 KB
testcase_08 AC 82 ms
15,016 KB
testcase_09 AC 81 ms
15,020 KB
testcase_10 AC 83 ms
15,120 KB
testcase_11 AC 81 ms
15,044 KB
testcase_12 AC 82 ms
15,052 KB
testcase_13 AC 82 ms
15,288 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# coding: utf-8
s = gets.chomp
i = 0
j = 0
l = s.size
r = 0

while i < l do
  while j < l && s[j] == "…" do
    j += 1
  end
  r = [r, j - i].max
  if j == i then
    i += 1
    j = i
  else
    i = j
  end
end

puts "#{r}"
0