結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-30 10:14:01 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 1,000 ms |
| コード長 | 420 bytes |
| コンパイル時間 | 45 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-18 10:20:32 |
| 合計ジャッジ時間 | 3,154 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
コンパイルメッセージ
Syntax OK
ソースコード
class No203
def initialize
@str1 = gets.chomp.to_s.split("")
@str2 = gets.chomp.to_s.split("")
@continuity = Array.new
@count = 0
end
def x_or_o(strs)
strs.each do |str|
if str == "x"
@continuity << @count
@count = 0
else
@count += 1
end
end
@continuity << @count
end
def run
self.x_or_o(@str1)
self.x_or_o(@str2)
puts @continuity.max
end
end
no203 = No203.new
no203.run