結果

問題 No.164 ちっちゃくないよ!!
ユーザー 小指が強い人小指が強い人
提出日時 2015-11-23 13:34:56
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 11,208 KB
実行使用メモリ 15,480 KB
最終ジャッジ日時 2023-10-11 18:20:08
合計ジャッジ時間 2,075 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,140 KB
testcase_01 AC 83 ms
15,156 KB
testcase_02 WA -
testcase_03 AC 79 ms
15,020 KB
testcase_04 AC 81 ms
15,292 KB
testcase_05 AC 87 ms
15,460 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
a = Array.new
max_c = "1"
n.times do
    s = gets
    s.each_char do |x|
        max_c = x if x.ord > max_c.ord
    end
    a.push(s)
end
base = 2
if max_c.ord >= "1".ord && max_c.ord <= "9".ord
    base = max_c.ord - 48 + 1
else
    base = max_c.ord - 55 + 1
end
min = 10 ** 50
a.each do |x|
    b = x.to_i(base)
    min = b if b < min
end
puts min
0