結果
| 問題 |
No.782 マイナス進数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-11 15:01:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 306 bytes |
| コンパイル時間 | 299 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 65,280 KB |
| 最終ジャッジ日時 | 2024-07-19 20:04:14 |
| 合計ジャッジ時間 | 5,290 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 36 |
ソースコード
#!/usr/bin/env python3
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)
t, b = map(int, readline().split())
for _ in range(t):
n = int(readline())
s = ''
while n != 0:
r = n % (-b)
s += chr(48 + r)
n = (n - r) / b
print(s.reversed())