QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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()
Details
File "answer.code", line 6 if 'a' <= c <= 'z': ^ SyntaxError: invalid non-printable character U+00A0