結果
| 問題 | No.203 ゴールデン・ウィーク(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-30 10:14:01 |
| 言語 | Ruby (4.0.6 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 50 ms / 1,000 ms |
| + 440µs | |
| コード長 | 420 bytes |
| 記録 | |
| コンパイル時間 | 47 ms |
| コンパイル使用メモリ | 9,816 KB |
| 実行使用メモリ | 14,592 KB |
| 最終ジャッジ日時 | 2026-09-25 18:55:26 |
| 合計ジャッジ時間 | 2,976 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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