输入样例:
it is so 666 really 6666 what else can I say 6666666666
输出样例:
it is so 666 really 9 what else can I say 27
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
System.out.println(new Scanner(System.in).nextLine().replaceAll("6{10,}", "27").replaceAll("6{4,}", "9"));
}
}