Submission #4001942
Source Code Expand
S = input()
#N = int(input())
#N = list(map(int, input().split()))
# a = list(map(int, input().split()))
# X = [int(input()) for _ in range(N)]
ans = 'YES'
keyence = 'keyence'
for i in range(len(S)):
if i == 7:
S = S[0:7]
break
if keyence[i] == S[i]:
continue
else:
S = S[0:i] + S[len(S) - 1 - 6 + i :]
break
if S == keyence:
print('YES')
else:
print('NO')
Submission Info
| Submission Time | |
|---|---|
| Task | B - KEYENCE String |
| User | atsu_c |
| Language | Python (3.4.3) |
| Score | 200 |
| Code Size | 445 Byte |
| Status | AC |
| Exec Time | 17 ms |
| Memory | 3060 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | s1.txt, s2.txt, s3.txt, s4.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, s1.txt, s2.txt, s3.txt, s4.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | AC | 17 ms | 2940 KiB |
| 02.txt | AC | 17 ms | 2940 KiB |
| 03.txt | AC | 17 ms | 2940 KiB |
| 04.txt | AC | 17 ms | 2940 KiB |
| 05.txt | AC | 17 ms | 2940 KiB |
| 06.txt | AC | 17 ms | 2936 KiB |
| 07.txt | AC | 17 ms | 2940 KiB |
| 08.txt | AC | 17 ms | 2940 KiB |
| 09.txt | AC | 17 ms | 2940 KiB |
| 10.txt | AC | 17 ms | 2940 KiB |
| 11.txt | AC | 16 ms | 2940 KiB |
| 12.txt | AC | 17 ms | 2940 KiB |
| 13.txt | AC | 17 ms | 2940 KiB |
| 14.txt | AC | 17 ms | 2940 KiB |
| s1.txt | AC | 17 ms | 2940 KiB |
| s2.txt | AC | 17 ms | 3060 KiB |
| s3.txt | AC | 17 ms | 2940 KiB |
| s4.txt | AC | 17 ms | 2940 KiB |