結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー gmm_teagmm_tea
提出日時 2021-01-22 22:01:10
言語 Ruby
(3.3.0)
結果
AC  
実行時間 238 ms / 1,000 ms
コード長 163 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 11,384 KB
実行使用メモリ 43,324 KB
最終ジャッジ日時 2023-08-27 19:07:19
合計ジャッジ時間 7,800 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,148 KB
testcase_01 AC 77 ms
15,132 KB
testcase_02 AC 77 ms
15,176 KB
testcase_03 AC 77 ms
15,172 KB
testcase_04 AC 77 ms
15,260 KB
testcase_05 AC 76 ms
15,244 KB
testcase_06 AC 76 ms
15,120 KB
testcase_07 AC 78 ms
15,092 KB
testcase_08 AC 77 ms
15,288 KB
testcase_09 AC 77 ms
15,076 KB
testcase_10 AC 77 ms
15,224 KB
testcase_11 AC 77 ms
15,268 KB
testcase_12 AC 77 ms
15,088 KB
testcase_13 AC 157 ms
36,384 KB
testcase_14 AC 146 ms
34,620 KB
testcase_15 AC 90 ms
17,212 KB
testcase_16 AC 116 ms
24,888 KB
testcase_17 AC 181 ms
38,584 KB
testcase_18 AC 139 ms
28,076 KB
testcase_19 AC 225 ms
42,392 KB
testcase_20 AC 157 ms
30,692 KB
testcase_21 AC 132 ms
28,304 KB
testcase_22 AC 149 ms
35,820 KB
testcase_23 AC 202 ms
43,324 KB
testcase_24 AC 235 ms
43,312 KB
testcase_25 AC 219 ms
43,204 KB
testcase_26 AC 218 ms
43,168 KB
testcase_27 AC 195 ms
43,296 KB
testcase_28 AC 203 ms
43,176 KB
testcase_29 AC 235 ms
43,232 KB
testcase_30 AC 229 ms
43,096 KB
testcase_31 AC 235 ms
43,180 KB
testcase_32 AC 225 ms
43,120 KB
testcase_33 AC 238 ms
43,080 KB
testcase_34 AC 193 ms
43,228 KB
testcase_35 AC 77 ms
15,064 KB
testcase_36 AC 77 ms
15,316 KB
testcase_37 AC 76 ms
15,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s=gets.chomp.chars
a=0
(s.size-1).times do |i|
  if s[i+1]!=s[i]
    a=i+1
    break
  end
end
if a==1
  if s[1]==s[2]
    a=0
  end
end
puts [a+1,s[a]].join(" ")
0