結果

問題 No.782 マイナス進数
ユーザー cielciel
提出日時 2019-01-13 15:39:19
言語 Ruby
(3.3.0)
結果
AC  
実行時間 166 ms / 2,000 ms
コード長 133 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 11,464 KB
実行使用メモリ 16,260 KB
最終ジャッジ日時 2023-08-26 21:01:00
合計ジャッジ時間 6,157 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
15,316 KB
testcase_01 AC 71 ms
15,356 KB
testcase_02 AC 98 ms
15,908 KB
testcase_03 AC 104 ms
15,924 KB
testcase_04 AC 104 ms
16,176 KB
testcase_05 AC 99 ms
16,152 KB
testcase_06 AC 94 ms
16,108 KB
testcase_07 AC 117 ms
16,156 KB
testcase_08 AC 97 ms
16,016 KB
testcase_09 AC 98 ms
15,932 KB
testcase_10 AC 100 ms
16,212 KB
testcase_11 AC 114 ms
15,992 KB
testcase_12 AC 111 ms
16,260 KB
testcase_13 AC 166 ms
16,260 KB
testcase_14 AC 114 ms
16,140 KB
testcase_15 AC 114 ms
16,072 KB
testcase_16 AC 107 ms
16,036 KB
testcase_17 AC 138 ms
16,216 KB
testcase_18 AC 108 ms
16,008 KB
testcase_19 AC 133 ms
16,052 KB
testcase_20 AC 111 ms
15,960 KB
testcase_21 AC 136 ms
16,216 KB
testcase_22 AC 111 ms
16,056 KB
testcase_23 AC 109 ms
16,056 KB
testcase_24 AC 162 ms
16,192 KB
testcase_25 AC 110 ms
15,964 KB
testcase_26 AC 126 ms
15,932 KB
testcase_27 AC 119 ms
16,160 KB
testcase_28 AC 113 ms
16,164 KB
testcase_29 AC 72 ms
15,124 KB
testcase_30 AC 71 ms
15,148 KB
testcase_31 AC 71 ms
15,204 KB
testcase_32 AC 72 ms
15,168 KB
testcase_33 AC 70 ms
15,164 KB
testcase_34 AC 71 ms
15,256 KB
testcase_35 AC 75 ms
15,128 KB
testcase_36 AC 73 ms
15,284 KB
testcase_37 AC 73 ms
15,280 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - t
Syntax OK

ソースコード

diff #

t,b,*a=`dd`.split.map &:to_i
a.each{|e|
	e<1&&(puts ?0;next)
	s=''
	while e!=0
		s<<(e%-b).to_s
		e/=-b
		e=-e
	end
	puts s.reverse
}
0