Submission #816264


Source Code Expand

Copy
n, k = map(int, raw_input().split())
d = map(int, raw_input().split())
def use_d(n):
    for i in list(str(n)):
        if int(i) in d:
            return True
    else:
        return False
while n < 100000:
    if use_d(n):
        n += 1
    else:
        print n
        sys.exit()

Submission Info

Submission Time
Task C - Iroha's Obsession
User kaixiang
Language Python (2.7.6)
Score 0
Code Size 298 Byte
Status RE
Exec Time 225 ms
Memory 2568 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status AC
RE × 10
Set Name Test Cases
Sample
All subtask0_sample_01.txt, subtask0_sample_02.txt, subtask1_X_01.txt, subtask1_X_02.txt, subtask1_X_03.txt, subtask1_X_04.txt, subtask1_X_05.txt, subtask1_X_06.txt, subtask1_X_07.txt, subtask1_X_08.txt
Case Name Status Exec Time Memory
subtask0_sample_01.txt RE 27 ms 2568 KB
subtask0_sample_02.txt RE 25 ms 2568 KB
subtask1_X_01.txt RE 43 ms 2568 KB
subtask1_X_02.txt RE 225 ms 2568 KB
subtask1_X_03.txt RE 35 ms 2568 KB
subtask1_X_04.txt RE 25 ms 2568 KB
subtask1_X_05.txt RE 25 ms 2568 KB
subtask1_X_06.txt RE 46 ms 2568 KB
subtask1_X_07.txt RE 26 ms 2568 KB
subtask1_X_08.txt RE 25 ms 2568 KB