Submission #2972414


Source Code Expand

Copy
a,b=map(int,input().split())
s=input()
if '-' not in s or s.count('-')>1 or s[0]=='-' or s[-1]=='-':
    print('No')
    exit()

p=s.split('-')
print('No' if s[a]!='-' or len(p[0])!=a or len(p[1])!=b else 'Yes')

Submission Info

Submission Time
Task B - Postal Code
User nyon
Language Python3 (3.4.3)
Score 200
Code Size 218 Byte
Status
Exec Time 22 ms
Memory 3060 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt, sample_03.txt
All 200 / 200 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, 15.txt, 16.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
01.txt 17 ms 3060 KB
02.txt 17 ms 3060 KB
03.txt 17 ms 2940 KB
04.txt 17 ms 3060 KB
05.txt 17 ms 2940 KB
06.txt 17 ms 2940 KB
07.txt 17 ms 2940 KB
08.txt 22 ms 2940 KB
09.txt 17 ms 3060 KB
10.txt 17 ms 3060 KB
11.txt 17 ms 3060 KB
12.txt 17 ms 2940 KB
13.txt 17 ms 2940 KB
14.txt 17 ms 3060 KB
15.txt 17 ms 3060 KB
16.txt 17 ms 3060 KB
sample_01.txt 17 ms 2940 KB
sample_02.txt 17 ms 2940 KB
sample_03.txt 17 ms 3060 KB