結果

問題 No.164 ちっちゃくないよ!!
ユーザー 👑 horiesinitihoriesiniti
提出日時 2018-03-16 08:22:03
言語 Ruby
(3.3.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 260 ms
コンパイル使用メモリ 11,460 KB
実行使用メモリ 15,468 KB
最終ジャッジ日時 2023-08-23 11:36:26
合計ジャッジ時間 2,142 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,248 KB
testcase_01 AC 78 ms
15,068 KB
testcase_02 AC 81 ms
15,160 KB
testcase_03 AC 79 ms
15,160 KB
testcase_04 AC 77 ms
15,268 KB
testcase_05 AC 98 ms
15,440 KB
testcase_06 AC 101 ms
15,468 KB
testcase_07 AC 88 ms
15,212 KB
testcase_08 AC 98 ms
15,428 KB
testcase_09 AC 99 ms
15,192 KB
testcase_10 AC 80 ms
15,156 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n=gets.to_i
ans=[]
STDIN.each_line{|e|
	e=e.chomp.downcase
	i=1
	m=1
	"0123456789abcdefghijklmnopqrstuvwxyz".split("").each{|e2|
		if e.index(e2)!=nil
			m=i
		end
		i+=1
	}
	m2=0
	e.chars{|e2|
		if e2 =~ /[0-9]/
			m2=m2*m+e2.to_i
		else
			m2=m2*m+e2.ord-"a".ord+10
		end
	}
	ans<<m2
}
puts ans.min
0