結果

問題 No.1908 Assault for Keys
ユーザー simansiman
提出日時 2022-04-28 07:50:42
言語 Ruby
(3.3.0)
結果
AC  
実行時間 461 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 11,496 KB
実行使用メモリ 17,392 KB
最終ジャッジ日時 2023-09-10 16:47:10
合計ジャッジ時間 9,666 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,036 KB
testcase_01 AC 79 ms
15,300 KB
testcase_02 AC 420 ms
17,192 KB
testcase_03 AC 437 ms
17,192 KB
testcase_04 AC 439 ms
17,392 KB
testcase_05 AC 423 ms
17,176 KB
testcase_06 AC 419 ms
17,124 KB
testcase_07 AC 434 ms
17,388 KB
testcase_08 AC 440 ms
17,144 KB
testcase_09 AC 438 ms
17,224 KB
testcase_10 AC 442 ms
17,240 KB
testcase_11 AC 424 ms
17,288 KB
testcase_12 AC 426 ms
17,168 KB
testcase_13 AC 416 ms
17,172 KB
testcase_14 AC 421 ms
17,232 KB
testcase_15 AC 431 ms
17,336 KB
testcase_16 AC 78 ms
15,292 KB
testcase_17 AC 80 ms
15,244 KB
testcase_18 AC 397 ms
17,368 KB
testcase_19 AC 461 ms
17,220 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N, M = gets.split.map(&:to_i)
S = N.times.map { gets.chomp }

counter = Hash.new(0)

S.each do |s|
  M.times do |i|
    if s[i] == 'o'
      counter[i] += 1
    end
  end
end

puts (N - counter.values.min + 1)
0