33OJ
登录 注册

#P17640. [ICPC 2019 Yinchuan R] Base62

    ID: 20145 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 显示难度普及 上传者: 标签>模拟数学高精度2019进制ICPC

[ICPC 2019 Yinchuan R] Base62

Problem Description

As we already know, base64 is a common binary-to-text encoding scheme. Here we define a special series of positional systems that represent numbers using a base (a.k.a. radix) of 22 to 6262. The symbols '00' -- '99' represent zero to nine, and 'A' -- 'Z' represent ten to thirty-five, and 'a' -- 'z' represent thirty-six to sixty-one. Now you need to convert some integer zz in base xx into base yy.

Input Format

The input contains three integers x,y (2≤x,y≤62)x, y~(2 \le x, y \le 62) and z (0≤z<x120)z~(0 \le z < x^{120}), where the integer zz is given in base xx.

Output Format

Output the integer zz in base yy.

16 2 FB
11111011