QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#521713 | #7042. So Easy | chenyueshan | Compile Error | / | / | Python3 | 670b | 2024-08-16 14:07:44 | 2024-08-16 14:07:45 |
Judging History
answer
x, y, z = input().split()
x = int(x)
y = int(y)
n = 0
for c in z:
if 'a' <= c <= 'z':
d = ord(c) - ord('0')
elif 'A' <= c <= 'Z':
d = ord(c) - ord('A') + 10
else:
d = orc(c) - ord('a') + 36
n = x * n + d;
s = ""
if n == 0:
print(0)
else:
while n != 0:
d = n % y
if d < 10:
s += str(d)
elif d < 36:
s += chr(ord('A') + d - 10)
else:
s += chr(ord('a') + d - 36)
n //= y
for i in range(len(s) - 1, -1, -1):
print(s[i], end = '')
print()
详细
File "answer.code", line 6 if 'a' <= c <= 'z': ^ SyntaxError: invalid non-printable character U+00A0