QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#153694 | #7042. So Easy | PetroTarnavskyi# | Compile Error | / | / | C++17 | 457b | 2023-08-30 19:08:20 | 2023-08-30 19:08:21 |
Judging History
answer
x, y, z = input().split()
x = int(x)
y = int(y)
n = 0
for c in z:
d = ord(c) - ord('0') if '0' <= c <= '9' else ord(c) - ord('A') + 10 if 'A' <= c <= 'Z' else ord(c) - ord('a') + 36
n = x * n + d
s = ""
if n == 0:
print(0)
exit(0)
while n != 0:
d = n % y
if d < 10:
s += str(d)
elif d < 36:
s += chr(ord('A') + 10)
else:
s += chr(ord('a') + 36)
n //= y
for i in range(len(s) - 1, -1, -1):
print(s[i], end='')
print()
詳細信息
answer.code:22:25: error: empty character constant 22 | print(s[i], end='') | ^~ answer.code:1:1: error: ‘x’ does not name a type 1 | x, y, z = input().split() | ^