给出代码:
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String s1 = sc.nextLine();
String s2 = sc.nextLine();
输入:
2
heads are better than
1 head
输出将是:
n="2"
s1=""
s2="heads are better than"
我的问题是如何使所需的输出为:
n="2"
s1="heads are better than"
s2="1 head"