【蓝桥杯】进制转换

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;

public class Main {
//	static int[] weight= {7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};
//	static char[] ch= {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
//	static char[] ch= {'z','y','x','w','v','u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a'};
	static LinkedList list=new LinkedList();
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
//		Scanner sc=new Scanner(System.in);
//		BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
		InputReader sc=new InputReader(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int n=sc.nextInt();
		while(n-->0) {
			String str=sc.nextLine();
			StringBuffer s=new StringBuffer();
			for(int i=0;i=snumChars) {
			curChar=0;
			try {
				snumChars=stream.read(buf);
			}catch (IOException e) {
				// TODO: handle exception
				throw new InputMismatchException();
			}
			if(snumChars<=0)
				return -1;
		}
		return buf[curChar++];
	}
	public int nextInt() {
		int c=read();
		while(isSpaceChar(c)) {
			c=read();
		}
		int sgn=1;
		if(c=='-') {
			sgn=-1;
			c=read();
		}
		int res=0;
		do {
			res*=10;
			res+=c-'0';
			c=read();
		}while(!isSpaceChar(c));
		return res*sgn;
	}
	public long nextLong() {
		int c=read();
		while(isSpaceChar(c)) {
			c=read();
		}
		int sgn=1;
		if(c=='-') {
			sgn=-1;
			c=read();
		}
		int res=0;
		do {
			res*=10;
			res+=c-'0';
			c=read();
		}while(!isSpaceChar(c));
		return res*sgn;
	}
	public int[] nextIntArray(int n) {
		int a[]=new int[n];
		for(int i=0;i

 

你可能感兴趣的:(蓝桥杯)