結果

問題 No.1032 数数え
ユーザー gemmarogemmaro
提出日時 2020-10-03 17:47:19
言語 Ruby
(3.3.0)
結果
AC  
実行時間 361 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 11,324 KB
実行使用メモリ 44,564 KB
最終ジャッジ日時 2023-09-25 05:32:07
合計ジャッジ時間 2,597 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,236 KB
testcase_01 AC 77 ms
15,168 KB
testcase_02 AC 78 ms
14,988 KB
testcase_03 AC 77 ms
15,236 KB
testcase_04 AC 78 ms
15,120 KB
testcase_05 AC 83 ms
15,128 KB
testcase_06 AC 83 ms
15,252 KB
testcase_07 AC 361 ms
44,564 KB
testcase_08 AC 78 ms
15,228 KB
testcase_09 AC 87 ms
15,676 KB
testcase_10 AC 80 ms
14,988 KB
testcase_11 AC 78 ms
15,056 KB
testcase_12 AC 329 ms
36,840 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# frozen_string_literal: true

def solve
  l = L.tally
  (1..M).map do |i|
    %(#{i} #{l[i] || 0})
  end
end

N, M = gets.split.map(&:to_i)
L = gets.split.map(&:to_i)

puts solve
0