結果

問題 No.782 マイナス進数
ユーザー vwxyz
提出日時 2024-04-06 05:51:21
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 195 bytes
コンパイル時間 138 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-01 03:44:06
合計ジャッジ時間 6,878 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 27 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

T,B=map(int,input().split())
for t in range(T):
    N=int(input())
    ans_lst=[]
    while N:
        ans_lst.append(N%(-B))
        N-=ans_lst[-1]
        N//=B
    print(*ans_lst[::-1],sep="")
0