Created
January 21, 2019 15:47
-
-
Save narita1980/19ee5bcdbeff4abf5708978d6cba7d04 to your computer and use it in GitHub Desktop.
提出 #4065410
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Main { | |
public static void main(String[] args) throws Exception { | |
Scanner scanner = new Scanner(System.in); | |
String input = scanner.nextLine(); | |
if (input.matches("keyence.*")) {System.out.println("YES"); return;} | |
if (input.matches("keyenc.*e")) {System.out.println("YES"); return;} | |
if (input.matches("keyen.*ce")) {System.out.println("YES"); return;} | |
if (input.matches("keye.*nce")) {System.out.println("YES"); return;} | |
if (input.matches("key.*ence")) {System.out.println("YES"); return;} | |
if (input.matches("ke.*yence")) {System.out.println("YES"); return;} | |
if (input.matches("k.*eyence")) {System.out.println("YES"); return;} | |
if (input.matches(".*keyence")) {System.out.println("YES"); return;} | |
System.out.println("NO"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment