結果

問題 No.782 マイナス進数
ユーザー cielciel
提出日時 2020-02-22 01:34:16
言語 Crystal
(1.11.2)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 21,699 ms
コンパイル使用メモリ 265,228 KB
実行使用メモリ 5,948 KB
最終ジャッジ日時 2023-09-13 10:29:58
合計ジャッジ時間 23,280 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,376 KB
testcase_01 AC 3 ms
4,380 KB
testcase_02 AC 21 ms
5,876 KB
testcase_03 AC 21 ms
5,880 KB
testcase_04 AC 22 ms
5,940 KB
testcase_05 AC 20 ms
5,744 KB
testcase_06 AC 21 ms
5,896 KB
testcase_07 AC 23 ms
5,836 KB
testcase_08 AC 22 ms
5,920 KB
testcase_09 AC 19 ms
5,832 KB
testcase_10 AC 19 ms
5,880 KB
testcase_11 AC 22 ms
5,744 KB
testcase_12 AC 22 ms
5,888 KB
testcase_13 AC 26 ms
5,804 KB
testcase_14 AC 23 ms
5,932 KB
testcase_15 AC 23 ms
5,832 KB
testcase_16 AC 23 ms
5,884 KB
testcase_17 AC 26 ms
5,884 KB
testcase_18 AC 23 ms
5,828 KB
testcase_19 AC 24 ms
5,844 KB
testcase_20 AC 23 ms
5,948 KB
testcase_21 AC 26 ms
5,888 KB
testcase_22 AC 24 ms
5,936 KB
testcase_23 AC 22 ms
5,900 KB
testcase_24 AC 28 ms
5,904 KB
testcase_25 AC 22 ms
5,828 KB
testcase_26 AC 25 ms
5,912 KB
testcase_27 AC 24 ms
5,888 KB
testcase_28 AC 23 ms
5,804 KB
testcase_29 AC 2 ms
4,496 KB
testcase_30 AC 2 ms
4,444 KB
testcase_31 AC 3 ms
4,496 KB
testcase_32 AC 3 ms
4,500 KB
testcase_33 AC 3 ms
4,432 KB
testcase_34 AC 3 ms
4,476 KB
testcase_35 AC 2 ms
4,476 KB
testcase_36 AC 2 ms
4,496 KB
testcase_37 AC 2 ms
4,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a=ARGF.gets_to_end.split.map &.to_i
t,b=a.shift 2
a.each{|e|
	e<1&&(p 0;next)
	puts String.build{|s|
		while e!=0
			s<<(e%-b).to_s
			e//=-b
			e=-e
		end
	}.reverse
}
0