PAT刷题笔记——1010 Radix
题目
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes \fbox{\color{red}yes} yes, if 6 is a decimal number and 110 is a binary number.
Now for any pair of positive integers N 1 N_{1} N1 and N 2 N_{2} N2, your task is to find the radix of one number while that of the other is given.
Input Specification:
Each input file contains one test case. Each case occupies a line which contains 4 positive integers:
N1 N2 tag radix \fbox{N1 N2 \textbf{tag} \color{red}radix} N