結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー 👑 horiesinitihoriesiniti
提出日時 2016-05-25 19:51:55
言語 Ruby
(3.3.0)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 177 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 12,672 KB
最終ジャッジ日時 2024-04-16 16:44:32
合計ジャッジ時間 1,233 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
12,416 KB
testcase_01 AC 91 ms
12,288 KB
testcase_02 AC 167 ms
12,544 KB
testcase_03 AC 165 ms
12,672 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

# your code goes here

n=STDIN.gets.chomp
cs=[0,0,0,0,0,0,0,0,0,0]

n.size.times do |i|
	cs[n[i].to_i]+=1
end
for i in 0..9
	j=9-i
	cs[j].times do |k|
		print j
	end
end
puts ""
0