結果

問題 No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1)
ユーザー tamura2004tamura2004
提出日時 2021-11-20 17:52:14
言語 Crystal
(1.11.2)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 19,970 ms
コンパイル使用メモリ 265,600 KB
実行使用メモリ 4,848 KB
最終ジャッジ日時 2023-09-02 13:30:36
合計ジャッジ時間 21,369 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,712 KB
testcase_01 AC 3 ms
4,704 KB
testcase_02 AC 2 ms
4,672 KB
testcase_03 AC 2 ms
4,764 KB
testcase_04 AC 3 ms
4,472 KB
testcase_05 AC 3 ms
4,796 KB
testcase_06 AC 3 ms
4,828 KB
testcase_07 AC 3 ms
4,716 KB
testcase_08 AC 3 ms
4,664 KB
testcase_09 AC 3 ms
4,712 KB
testcase_10 AC 3 ms
4,848 KB
testcase_11 AC 3 ms
4,548 KB
testcase_12 AC 3 ms
4,664 KB
testcase_13 AC 3 ms
4,736 KB
testcase_14 AC 3 ms
4,608 KB
testcase_15 AC 2 ms
4,632 KB
testcase_16 AC 3 ms
4,720 KB
testcase_17 AC 3 ms
4,660 KB
testcase_18 AC 2 ms
4,848 KB
testcase_19 AC 3 ms
4,700 KB
testcase_20 AC 3 ms
4,724 KB
testcase_21 AC 3 ms
4,476 KB
testcase_22 AC 3 ms
4,652 KB
testcase_23 AC 3 ms
4,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

require "big"

cnt = gets.to_s.to_big_i(16).to_s(8).chars.tally
max = cnt.values.max
ans = [] of Int32
cnt.each do |k,v|
  if v == max
    ans << k.to_i
  end
end

puts ans.sort.join(" ")

0