L1-035 情人节 (15 分)
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
String str1[]=new String[2];
int i=0;
// str1[0]=""
while(s.hasNext()) {
String str=s.nextLine();
if(str.equals(".")) {
break;
}
if(i==1) {
str1[0]=str;
}
if(i==13) {
str1[1]=str;
}
i++;
}
if(i<=1) {
System.out.print("Momo... No one is for you ...");
}else if(i<=13){
System.out.print(str1[0]+" is the only one for you...");
}else {
System.out.print(str1[0]+" and "+str1[1]+" are inviting you to dinner...");
}
}
}