結果

問題 No.104 国道
ユーザー rkyrky
提出日時 2017-11-07 13:23:18
言語 Ruby
(3.3.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 115 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 11,560 KB
実行使用メモリ 15,324 KB
最終ジャッジ日時 2023-08-15 20:06:51
合計ジャッジ時間 2,520 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,236 KB
testcase_01 AC 72 ms
15,128 KB
testcase_02 AC 69 ms
15,084 KB
testcase_03 AC 70 ms
15,236 KB
testcase_04 AC 69 ms
15,128 KB
testcase_05 AC 70 ms
15,244 KB
testcase_06 AC 69 ms
14,992 KB
testcase_07 AC 71 ms
15,316 KB
testcase_08 AC 72 ms
15,124 KB
testcase_09 AC 70 ms
15,324 KB
testcase_10 AC 72 ms
15,244 KB
testcase_11 AC 72 ms
15,048 KB
testcase_12 AC 70 ms
15,064 KB
testcase_13 AC 70 ms
15,244 KB
testcase_14 AC 71 ms
15,136 KB
testcase_15 AC 70 ms
15,252 KB
testcase_16 AC 73 ms
15,292 KB
testcase_17 AC 70 ms
15,032 KB
testcase_18 AC 71 ms
15,288 KB
testcase_19 AC 72 ms
15,144 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

direction = gets.chomp.split("")
count = 1
direction.each{|str| count += str == "R" ? count + 1 : count}
puts count
0