結果

問題 No.313 π
ユーザー tomeruntomerun
提出日時 2016-07-17 02:43:04
言語 Ruby
(3.3.0)
結果
AC  
実行時間 190 ms / 5,000 ms
コード長 245 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 11,360 KB
実行使用メモリ 25,348 KB
最終ジャッジ日時 2023-08-05 18:03:14
合計ジャッジ時間 8,699 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 179 ms
25,164 KB
testcase_01 AC 179 ms
25,308 KB
testcase_02 AC 179 ms
25,112 KB
testcase_03 AC 186 ms
25,348 KB
testcase_04 AC 178 ms
25,292 KB
testcase_05 AC 179 ms
25,304 KB
testcase_06 AC 180 ms
25,332 KB
testcase_07 AC 188 ms
25,272 KB
testcase_08 AC 181 ms
25,148 KB
testcase_09 AC 178 ms
25,280 KB
testcase_10 AC 182 ms
25,240 KB
testcase_11 AC 183 ms
25,040 KB
testcase_12 AC 185 ms
25,276 KB
testcase_13 AC 182 ms
25,196 KB
testcase_14 AC 179 ms
25,044 KB
testcase_15 AC 181 ms
25,032 KB
testcase_16 AC 181 ms
25,144 KB
testcase_17 AC 185 ms
25,288 KB
testcase_18 AC 180 ms
25,048 KB
testcase_19 AC 182 ms
25,288 KB
testcase_20 AC 183 ms
25,244 KB
testcase_21 AC 181 ms
25,312 KB
testcase_22 AC 185 ms
25,036 KB
testcase_23 AC 178 ms
25,132 KB
testcase_24 AC 184 ms
25,144 KB
testcase_25 AC 190 ms
25,076 KB
testcase_26 AC 184 ms
25,236 KB
testcase_27 AC 183 ms
25,144 KB
testcase_28 AC 181 ms
25,292 KB
testcase_29 AC 181 ms
25,324 KB
testcase_30 AC 184 ms
25,148 KB
testcase_31 AC 182 ms
25,084 KB
testcase_32 AC 179 ms
25,160 KB
testcase_33 AC 180 ms
24,916 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