結果

問題 No.782 マイナス進数
ユーザー tailstails
提出日時 2019-01-22 16:49:42
言語 Bash
(Bash 5.1.16)
結果
AC  
実行時間 1,985 ms / 2,000 ms
コード長 94 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 5,340 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-13 17:42:35
合計ジャッジ時間 24,900 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,352 KB
testcase_01 AC 3 ms
4,352 KB
testcase_02 AC 416 ms
4,352 KB
testcase_03 AC 523 ms
4,352 KB
testcase_04 AC 640 ms
4,356 KB
testcase_05 AC 454 ms
4,348 KB
testcase_06 AC 409 ms
4,348 KB
testcase_07 AC 924 ms
4,348 KB
testcase_08 AC 514 ms
4,348 KB
testcase_09 AC 417 ms
4,348 KB
testcase_10 AC 420 ms
4,352 KB
testcase_11 AC 920 ms
4,352 KB
testcase_12 AC 778 ms
4,352 KB
testcase_13 AC 1,985 ms
4,348 KB
testcase_14 AC 782 ms
4,352 KB
testcase_15 AC 897 ms
4,348 KB
testcase_16 AC 778 ms
4,352 KB
testcase_17 AC 1,407 ms
4,348 KB
testcase_18 AC 779 ms
4,348 KB
testcase_19 AC 1,187 ms
4,348 KB
testcase_20 AC 813 ms
4,352 KB
testcase_21 AC 1,262 ms
4,352 KB
testcase_22 AC 851 ms
4,352 KB
testcase_23 AC 675 ms
4,352 KB
testcase_24 AC 1,925 ms
4,348 KB
testcase_25 AC 764 ms
4,348 KB
testcase_26 AC 1,039 ms
4,352 KB
testcase_27 AC 907 ms
4,352 KB
testcase_28 AC 736 ms
4,352 KB
testcase_29 AC 3 ms
4,348 KB
testcase_30 AC 3 ms
4,348 KB
testcase_31 AC 5 ms
4,352 KB
testcase_32 AC 11 ms
4,348 KB
testcase_33 AC 3 ms
4,352 KB
testcase_34 AC 4 ms
4,348 KB
testcase_35 AC 3 ms
4,348 KB
testcase_36 AC 3 ms
4,348 KB
testcase_37 AC 4 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

read t b
while read n r;do
	for((;d=(n%-b-b)%-b,n;n=(n-d)/b)){
		r=$d$r
	}
	echo ${r:-0}
done
0