結果

問題 No.313 π
ユーザー tomeruntomerun
提出日時 2016-07-17 02:43:04
言語 Ruby
(3.3.0)
結果
AC  
実行時間 168 ms / 5,000 ms
コード長 245 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 22,656 KB
最終ジャッジ日時 2024-04-23 14:51:13
合計ジャッジ時間 7,505 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 161 ms
22,656 KB
testcase_01 AC 161 ms
22,528 KB
testcase_02 AC 165 ms
22,400 KB
testcase_03 AC 163 ms
22,400 KB
testcase_04 AC 163 ms
22,400 KB
testcase_05 AC 161 ms
22,528 KB
testcase_06 AC 164 ms
22,528 KB
testcase_07 AC 160 ms
22,656 KB
testcase_08 AC 162 ms
22,528 KB
testcase_09 AC 160 ms
22,400 KB
testcase_10 AC 165 ms
22,656 KB
testcase_11 AC 164 ms
22,400 KB
testcase_12 AC 164 ms
22,400 KB
testcase_13 AC 164 ms
22,656 KB
testcase_14 AC 163 ms
22,400 KB
testcase_15 AC 167 ms
22,400 KB
testcase_16 AC 166 ms
22,656 KB
testcase_17 AC 161 ms
22,528 KB
testcase_18 AC 160 ms
22,528 KB
testcase_19 AC 161 ms
22,656 KB
testcase_20 AC 162 ms
22,400 KB
testcase_21 AC 168 ms
22,400 KB
testcase_22 AC 159 ms
22,400 KB
testcase_23 AC 166 ms
22,528 KB
testcase_24 AC 166 ms
22,656 KB
testcase_25 AC 161 ms
22,528 KB
testcase_26 AC 167 ms
22,528 KB
testcase_27 AC 166 ms
22,528 KB
testcase_28 AC 167 ms
22,528 KB
testcase_29 AC 163 ms
22,400 KB
testcase_30 AC 162 ms
22,528 KB
testcase_31 AC 163 ms
22,656 KB
testcase_32 AC 162 ms
22,400 KB
testcase_33 AC 168 ms
22,656 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

hist = [20104,20063,19892,20011,19874,20199,19898,20163,19956,19841]

str = gets.chars
before = after = ''
0.upto(9) { |c|
	cnt = str.count(c.to_s)
	if hist[c] < cnt
		before = c
	elsif hist[c] > cnt
		after = c
	end
}
puts "#{before} #{after}"
0