题解 | #按照格式输入并交换输出#
按照格式输入并交换输出
http://www.nowcoder.com/practice/95eb723a3e854376a7eb6d116cc7d875
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String ystr=sc.nextLine(); String[] xstr=ystr.split("[=,]"); System.out.println("a="+xstr[3]+","+"b="+xstr[1]); } }