笔试题输入模板
import java.util.*;
public class Main{
public static void main(String[] args){
int[] nums = getNums();
}
public static int[] getNums(){
Scanner in = new Scanner(System.in);
String input = in.nextLine();
input = input.replace("[","").replace("]","");
String strs = input.split(",");
int[] nums = new int[strs.length];
for(int i=0;i<nums.length;++i){
nums[i] = Integer.parseInt(strs[i].trim());
}
return nums;
}
}