二进制转十进制 java版

import java.lang.Byte;
import java.util.Scanner;

public class Main{
	public static void main(String[] argc){
		Scanner cin = new Scanner(System.in);
		int n = cin.nextInt();
		String s;
		while(n!=0){
			s = cin.next();
			System.out.println(Integer.parseInt(s,2));
			n--;
		}
	}
}

    原文作者:进制转换
    原文地址: https://blog.csdn.net/QQ2472322319/article/details/11021179
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞