結果

問題 No.782 マイナス進数
ユーザー maspymaspy
提出日時 2020-02-03 21:43:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 11,784 KB
実行使用メモリ 10,964 KB
最終ジャッジ日時 2023-10-19 10:37:12
合計ジャッジ時間 5,452 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,040 KB
testcase_01 AC 31 ms
10,040 KB
testcase_02 AC 69 ms
10,892 KB
testcase_03 AC 80 ms
10,892 KB
testcase_04 AC 91 ms
10,892 KB
testcase_05 AC 72 ms
10,892 KB
testcase_06 AC 71 ms
10,892 KB
testcase_07 AC 112 ms
10,892 KB
testcase_08 AC 78 ms
10,892 KB
testcase_09 AC 70 ms
10,892 KB
testcase_10 AC 69 ms
10,892 KB
testcase_11 AC 109 ms
10,964 KB
testcase_12 AC 100 ms
10,964 KB
testcase_13 AC 196 ms
10,964 KB
testcase_14 AC 101 ms
10,964 KB
testcase_15 AC 112 ms
10,964 KB
testcase_16 AC 98 ms
10,964 KB
testcase_17 AC 147 ms
10,964 KB
testcase_18 AC 104 ms
10,964 KB
testcase_19 AC 128 ms
10,964 KB
testcase_20 AC 100 ms
10,964 KB
testcase_21 AC 140 ms
10,964 KB
testcase_22 AC 107 ms
10,964 KB
testcase_23 AC 91 ms
10,964 KB
testcase_24 AC 192 ms
10,964 KB
testcase_25 AC 97 ms
10,964 KB
testcase_26 AC 120 ms
10,964 KB
testcase_27 AC 110 ms
10,964 KB
testcase_28 AC 96 ms
10,964 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

T,B,*nums = map(int,read().split())

for n in nums:
    rep = []
    while n:
        r = n % (-B)
        n = (n - r) // B
        rep.append(r)
    print(''.join(map(str,reversed(rep))))
0