結果

問題 No.164 ちっちゃくないよ!!
ユーザー char134217728char134217728
提出日時 2017-09-06 22:44:49
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 277 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 13,056 KB
最終ジャッジ日時 2024-04-24 15:24:20
合計ジャッジ時間 2,192 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
12,160 KB
testcase_01 AC 91 ms
12,160 KB
testcase_02 WA -
testcase_03 AC 93 ms
12,032 KB
testcase_04 AC 90 ms
12,288 KB
testcase_05 AC 107 ms
13,056 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
v = (0...n).map{gets.chomp}
h = ([*?0..?9] + [*?A..?Z]).each_with_index.map{|a, b|[a, b]}.to_h
_h = h.invert
d = v.join.chars.map{|c|h[c]}.uniq.sort[-1] + 1
v.map! do |s|
  a = 0
  (0...(s.length)).each do |j|
    a *= d
    a += h[s[j]]
  end
  a
end
p v.sort[0]
0