大数送り変換
1181 ワード
36 (0-9,A-Z), 10 。
Input :36 , 0-9,A-Z ,A 10,Z 35。(A <= 100000)
Output : 10
Sample Input1AZ
Sample Output1691
考え方:javaのBig Integer類で解決します。コード:
import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
BigInteger a = in.nextBigInteger(36);//nextBigInteger , 10, 2-36。
System.out.println(a);
}
}
転載先:https://www.cnblogs.com/vocaloid01/p/9514192.html