結果

問題 No.717 ファッションへのこだわり
ユーザー 0w10w1
提出日時 2018-08-29 11:33:52
言語 Ruby
(3.3.0)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 227 bytes
コンパイル時間 545 ms
コンパイル使用メモリ 11,568 KB
実行使用メモリ 16,016 KB
最終ジャッジ日時 2023-10-11 05:16:30
合計ジャッジ時間 3,254 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,084 KB
testcase_01 AC 81 ms
15,224 KB
testcase_02 AC 82 ms
15,124 KB
testcase_03 AC 82 ms
15,128 KB
testcase_04 AC 81 ms
15,232 KB
testcase_05 AC 83 ms
15,064 KB
testcase_06 AC 85 ms
15,144 KB
testcase_07 AC 89 ms
15,568 KB
testcase_08 AC 96 ms
16,016 KB
testcase_09 AC 95 ms
16,004 KB
testcase_10 AC 90 ms
15,768 KB
testcase_11 AC 89 ms
15,500 KB
testcase_12 AC 89 ms
15,568 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Main.rb:1: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

n, m = gets.split.map &:to_i
s = gets.strip
t = gets.strip
puts [s.chars.select { |i| i == ?A } .size, t.chars.select { |i| i == ?A } .size].min + [s.chars.select { |i| i == ?B } .size, t.chars.select { |i| i == ?B } .size].min
0