結果

問題 No.1159 Sashiming String
ユーザー yuruhiyayuruhiya
提出日時 2020-08-12 09:08:54
言語 Ruby
(3.3.0)
結果
AC  
実行時間 191 ms / 2,000 ms
コード長 149 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 27,264 KB
最終ジャッジ日時 2024-04-18 00:14:41
合計ジャッジ時間 2,532 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
12,288 KB
testcase_01 AC 80 ms
12,032 KB
testcase_02 AC 126 ms
20,480 KB
testcase_03 AC 166 ms
27,264 KB
testcase_04 AC 124 ms
19,840 KB
testcase_05 AC 153 ms
24,704 KB
testcase_06 AC 124 ms
19,584 KB
testcase_07 AC 143 ms
21,376 KB
testcase_08 AC 165 ms
21,376 KB
testcase_09 AC 191 ms
22,272 KB
testcase_10 AC 81 ms
12,160 KB
testcase_11 AC 80 ms
12,032 KB
testcase_12 AC 78 ms
12,160 KB
testcase_13 AC 82 ms
12,032 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

cnt = 0
p gets.chomp.gsub('ing', '>').gsub('S', '<').chars.select {
		'<>'.include? _1
  }.sum { |c|
		cnt += 1 if c == '<'
		c == '>' ? cnt : 0
  }
0