結果

問題 No.341 沈黙の期間
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-02-04 00:15:26
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 155 bytes
コンパイル時間 395 ms
コンパイル使用メモリ 11,872 KB
実行使用メモリ 16,096 KB
最終ジャッジ日時 2023-10-19 15:51:59
合計ジャッジ時間 2,008 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
16,032 KB
testcase_01 AC 81 ms
16,032 KB
testcase_02 AC 80 ms
16,032 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 81 ms
16,032 KB
testcase_06 AC 80 ms
16,032 KB
testcase_07 AC 81 ms
16,032 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 81 ms
16,028 KB
testcase_11 AC 81 ms
16,032 KB
testcase_12 AC 79 ms
16,032 KB
testcase_13 AC 80 ms
16,032 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = gets.chomp
ans = cnt = 0

s.chars.each do |si|
  if si == '…'
    cnt += 1
  elsif cnt > ans
    ans = cnt
    cnt = 0
  end
end

puts [ans, cnt].max
0