s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
int64
0
100
memory
stringlengths
4
6
code_size
int64
15
14.7k
code
stringlengths
15
14.7k
problem_id
stringlengths
6
6
problem_description
stringlengths
358
9.83k
input
stringlengths
2
4.87k
output
stringclasses
807 values
__index_level_0__
int64
1.1k
1.22M
s365591903
p04045
u842964692
1586286108
Python
Python (3.4.3)
py
Accepted
81
5692
438
from collections import deque N,K=map(int,input().split()) D=list(map(int,input().split())) like=list(range(1,10)) dislike0=False for s in D: if s==0: dislike0=True else: like.remove(s) like.sort() q=deque(like) if dislike0==False: like.insert(0,0) while q: num=q.popleft() if n...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,117
s104615941
p04045
u598445703
1586202538
Python
Python (3.4.3)
py
Accepted
62
3060
297
# -*- coding: utf-8-*- strs = [] n,k = map(int,input().split()) hates = list(input().split()) give = n while(True): stri = str(give) hantei = True for hate in hates: if hate in stri: hantei = False break; if hantei: print(give) break; else: give = give + 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,118
s667493639
p04045
u244416763
1586186122
Python
Python (3.4.3)
py
Accepted
30
3700
407
import itertools n,k = map(int,input().split()) unlike = list(map(int,input().split())) like = [] for i in range(0,10): if not(i in unlike): like.append(i) i = 1 ans = 0 while(i < 99): current = list(itertools.product(like,repeat=i)) for j in range(len(current)): h = int("".join(map(str,(lis...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,119
s246674322
p04045
u230621983
1586147967
Python
Python (3.4.3)
py
Accepted
80
2940
92
n, k = map(int, input().split()) d = set(input()) while set(str(n))&d: n += 1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,120
s562389152
p04045
u114233208
1586134226
Python
Python (3.4.3)
py
Accepted
78
2940
237
def checkN(N,D): for each in N: if each in D: return False return True line1 = input().split(' ') N = line1[0] D = input().split(' ') i = -1 while not checkN(N, D): N = str(int(N)+1) # i -= print(N)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,121
s757011344
p04045
u133936772
1586031414
Python
Python (3.4.3)
py
Accepted
87
2940
78
n,_=map(int,input().split()) s=set(input()) while s&set(str(n)): n+=1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,122
s092919848
p04045
u133936772
1586026810
Python
Python (3.4.3)
py
Accepted
81
2940
86
n,_=map(int,input().split()) s=set(input().split()) while s&set(str(n)): n+=1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,123
s188842247
p04045
u133936772
1586022677
Python
Python (3.4.3)
py
Accepted
51
2940
125
n,k=map(int,input().split()) l=input().split() while 1: for i in str(n): if i in l: n+=1; break else: print(n); break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,124
s916920696
p04045
u181801282
1585877022
Python
Python (3.4.3)
py
Accepted
91
2940
187
N,_=map(int, input().split()) D=input().rstrip().split() n=N while True: flag=False s=list(str(n)) for i in s: if i in D: flag= True break if not flag: break n+=1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,125
s545285178
p04045
u242031676
1585779698
Python
Python (3.4.3)
py
Accepted
71
2940
115
n,k,*d=map(int,open(0).read().split()) while 1: for i in str(n): if int(i)in d: break else:print(n);break n+=1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,126
s213668048
p04045
u219197917
1585774340
Python
Python (3.4.3)
py
Accepted
81
2940
98
n=int(input().split()[0]);d=set(input());print(min(i for i in range(n,99999)if not d&set(str(i))))
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,127
s965608812
p04045
u219197917
1585774125
Python
Python (3.4.3)
py
Accepted
73
2940
130
n = int(input().split()[0]) d = set(input()) for i in range(n, 999999): if not set(str(i)) & d: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,128
s229439531
p04045
u867848444
1585760908
Python
Python (3.4.3)
py
Accepted
62
2940
163
n,k=map(int,input().split()) d=list(input()) while True: ns=str(n) for i in d: if i in ns:break else: print(ns) exit() n+=1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,129
s833498962
p04045
u867848444
1585760148
Python
Python (3.4.3)
py
Accepted
17
3064
575
n,k=map(int,input().split()) d=list(map(int,input().split())) num=[] for i in range(10): if i not in d: num.append(i) #print(num) num.sort() digit=len(str(n)) ns=str(n) ans='' cnt=0 while cnt<digit: for i in num: if int(ns[cnt])>i:continue if int(ns[cnt])==i: ans+=str(i) ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,130
s688705644
p04045
u576917603
1585755487
Python
Python (3.4.3)
py
Accepted
50
3060
292
n,k=map(int,input().split()) d=list(map(int,input().split())) possible=set() for i in range(0,10): if i not in d: possible.add(str(i)) for i in range(n,100000): i=str(i) for j in i: if j not in possible: break else: print(i) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,131
s107745782
p04045
u821432765
1585741321
Python
Python (3.4.3)
py
Accepted
54
3060
218
N, K = [int(i) for i in input().split()] D = set([i for i in input().split()]) while True: res = str(N) for v in D: if v in res: break else: print(res) quit() N += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,132
s243960614
p04045
u367965715
1585680935
Python
Python (3.4.3)
py
Accepted
49
3060
200
import itertools n, k = map(int, input().split()) d = input().split() for i in itertools.count(n): for k in str(i): if k in d: break else: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,133
s250198887
p04045
u055687574
1585629220
Python
Python (3.4.3)
py
Accepted
70
3060
207
N, K = list(map(int, input().split())) D = set(input().split()) num = {str(i) for i in range(10)} - D while True: if set(str(N)) <= num: ans = N break else: N += 1 print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,134
s745165780
p04045
u479638406
1585624428
Python
Python (3.4.3)
py
Accepted
73
2940
129
N, K = map(int, input().split()) D = set(input().split()) ans = N while not set(str(ans)).isdisjoint(D): ans += 1 print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,135
s760919029
p04045
u735654057
1585575558
Python
Python (3.4.3)
py
Accepted
85
2940
317
# https://atcoder.jp/contests/abc042/tasks/arc058_a def exist(target, array): for token in list(str(target)): if token in array: return True return False n, _ = map(int, input().split()) d = input().split() x = n while True: if not exist(x, d): break x += 1 print(x)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,136
s165716029
p04045
u550061714
1585574013
Python
Python (3.4.3)
py
Accepted
73
2940
128
N, K = map(int, input().split()) D = set(input().split()) ans = N while not set(str(ans)).isdisjoint(D): ans += 1 print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,137
s248592960
p04045
u947883560
1585565728
Python
Python (3.4.3)
py
Accepted
60
3064
657
#!/usr/bin/env python3 import sys sys.setrecursionlimit(10**8) INF = float("inf") def solve(N: int, K: int, D: "List[int]"): D = set([str(c) for c in D]) for ans in range(N, 10*N): if set(str(ans)).isdisjoint(D): print(ans) return return def main(): def iterate_tok...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,138
s169743773
p04045
u463775490
1585500661
Python
Python (3.4.3)
py
Accepted
45
3060
262
n, k = map(int, input().split()) d = list(map(str, input().split())) possible = [str(i) for i in range(10) if str(i) not in d] for i in range(n,10**5): for j in str(i): if j not in possible: break else: print(i) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,139
s879162161
p04045
u877415670
1585495890
Python
Python (3.4.3)
py
Accepted
34
3572
581
import itertools n, k = map(int, input().split()) d = list(map(int, input().split())) use = [i for i in range(10) if not i in d] p = list(itertools.product(use, repeat=len(str(n)))) ans = float('inf') for i in p: numlist = [] if i[0] != 0: for g in range(len(str(n))): numlist.append(str(i...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,140
s978340048
p04045
u040823151
1585476802
Python
Python (3.4.3)
py
Accepted
42
2940
250
N,K = [int(i) for i in input().split()] D = sorted([int(i) for i in input().split()],reverse=True) def is_ok(x): while x!=0: if x%10 in D: return False x //=10 return True while True: if is_ok(N): print(N) break N+=1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,141
s466035436
p04045
u813098295
1585469387
Python
Python (3.4.3)
py
Accepted
42
3060
270
n, k = map(int, input().split()) d = [ int(x) for x in input().split() ] def is_ok(x): while x != 0: if x % 10 in d: return False x //= 10 return True money = n while True: if is_ok(n): print(n) break n += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,142
s851504662
p04045
u787449825
1585430438
Python
Python (3.4.3)
py
Accepted
64
3060
237
numbers = {str(i) for i in range(10)} N, K = map(int, input().split()) D = list(map(str, input().split())) D = set(D) available = numbers - D for i in range(N, 100000): nums = set(str(i)) if nums <= available: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,143
s304997498
p04045
u253681061
1585421109
Python
Python (3.4.3)
py
Accepted
74
3060
288
n,k = [int(x) for x in input().split()] d = [int(x) for x in input().split()] for x in range(n, 100000): ans = 100000 tmp = True for y in str(x): if int(y) in d: tmp = False break if tmp: ans = min(ans,x) break print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,144
s453446778
p04045
u716660050
1585374187
Python
Python (3.4.3)
py
Accepted
98
3060
239
N,K=map(int,input().split()) D=list(input().split()) D.insert(0,0) n=0 while True: n+=1 ok=True for i in list(str(n)): if i in D: ok=False break if ok and N<=n: print(n) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,145
s014191901
p04045
u073866020
1585355275
Python
Python (3.4.3)
py
Accepted
76
2940
216
n,k=map(int,input().split()) d=list(input().split()) while True: ok = True for x in d: if x in str(n): ok = False break if ok: print(n) exit() n += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,146
s938429185
p04045
u955251526
1585281517
Python
Python (3.4.3)
py
Accepted
76
2940
220
n, k = map(int, input().split()) d = list(input().split()) while True: ok = True for x in d: if x in str(n): ok = False break if ok: print(n) exit() n += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,147
s383422064
p04045
u680851063
1585275410
Python
Python (3.4.3)
py
Accepted
61
9824
368
n, k = map(int,input().split()) l = set(map(str, input().split())) x = list(set(['0','1','2','3','4','5','6','7','8','9']) - l) y = len(str(n)) from itertools import product z = list(product(x, repeat = y)) z += list(product(x, repeat = y + 1)) for i in range(len(z)): z[i] = int(''.join(z[i])) z.sort() for j in ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,148
s662091906
p04045
u859364709
1585180224
Python
Python (3.4.3)
py
Accepted
100
3060
191
N,K = map(int,input().split()) D = list(map(str,input().split())) ind_f = lambda x:x in D for i in range(N,10*N): i_li = list(str(i)) if not any(map(ind_f, i_li)): print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,149
s754782540
p04045
u139112865
1585099322
Python
Python (3.4.3)
py
Accepted
45
3064
350
#042_C n, k = map(int, input().split()) d = set(map(int, input().split())) d_ = list({i for i in range(0, 10)} - d) inf = 10 ** 7 def dfs(frm, cur): if frm == cur == 0: return inf if cur >= n: return cur x = 10 ** 7 for k in d_: x = min(x, dfs(cur, cur * 10 + k)) ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,150
s071236452
p04045
u346812984
1585079913
Python
Python (3.4.3)
py
Accepted
54
3316
519
from collections import deque N, K = map(int, input().split()) D = input().split() nums = list("0123456789") for d in D: nums.remove(d) def dfs(N, nums): ans = 10 ** 9 if "0" in nums: queue = deque(nums[1:]) else: queue = deque(nums) while queue: tmp = queue.pop() ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,151
s273478224
p04045
u545368057
1584963909
Python
Python (3.4.3)
py
Accepted
17
3064
1,214
N,K = map(int, input().split()) Ds = list(map(int, input().split())) able = [] for i in range(10): if i in Ds:continue able.append(i) # print(able) sN = str(N) n = len(sN) m = able[0] #最小 if int(sN[0]) > max(able): if m == 0: ans = str(able[1]) + str(able[0]) * n else: ans = str(able...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,152
s976118409
p04045
u555688810
1584939198
Python
Python (3.4.3)
py
Accepted
63
2940
182
N,K = map(int,input().split()) d = set(map(str,input().split())) OK = {str(i) for i in range(10)} - d for i in range(N,100000): if set(str(i)) <= OK: print(i) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,153
s026801829
p04045
u292978925
1584826393
Python
Python (3.4.3)
py
Accepted
18
3064
1,005
""" kari1 = '2000 8' kari2 = '0 2 4 5 8 9' in1 = kari1.split() in2 = kari2 """ in1 = input().split() in2 = input() tukaeru = [] for num1 in range(10): if str(num1) not in in2: tukaeru.append(str(num1)) nedan = [] for num1 in range(len(in1[0])): nedan.append(in1[0][num1]) idx1 = 0 for item1 in nedan: ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,154
s763026049
p04045
u223663729
1584810240
Python
Python (3.4.3)
py
Accepted
59
2940
219
N, K, *D = open(0).read().split() N = int(N) for i in range(N, 10*N): S = str(i) flg = True for s in S: if s in D: flg = False break if flg: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,155
s933340728
p04045
u759518460
1584762483
Python
Python (3.4.3)
py
Accepted
17
3064
707
n, k = input().split() d = input().split() valid = [i for i in range(10) if str(i) not in d] ans = '' if valid[-1] < int(n[0]): if valid[0] == 0: ans += str(valid[1]) else: ans += str(valid[0]) ans += str(valid[0]) * len(n) elif valid[-1] == int(n[0]): for s in n: if s > str(val...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,156
s382499909
p04045
u328364772
1584725799
Python
Python (3.4.3)
py
Accepted
60
3188
250
n, k = map(int, input().split()) D = set(map(int, input().split())) num = set(i for i in range(10)) D = num - D for i in range(n, 100000): for _ in str(i): if int(_) not in D: break else: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,157
s272480751
p04045
u374815848
1584713494
Python
Python (3.4.3)
py
Accepted
80
3188
564
from sys import stdin lines = stdin.readlines() counter = [] each_line = [] for i, line in enumerate(lines): if i == 0: counter = [int(x) for x in (line.rstrip().split())] else: each_line = [str(x) for x in (line.rstrip().split())] str_n = str(counter[0]) digit = len(str_n) for num in range(c...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,158
s754664613
p04045
u861141787
1584705206
Python
Python (3.4.3)
py
Accepted
90
3060
195
n, K = map(int, input().split()) d = [x for x in input().split()] e = set(d) ans = n while True: q = set(str(ans)) if len(q&e) == 0: break else: ans += 1 print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,159
s447170923
p04045
u735654057
1584538000
Python
Python (3.4.3)
py
Accepted
67
3060
253
numbers = {str(i) for i in range(10)} N, K = map(int, input().split()) *D, = map(str, input().split()) D = set(D) available = numbers - D ans = 0 for i in range(N, 100000): nums = set(str(i)) if nums <= available: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,160
s509214438
p04045
u920621778
1584503041
Python
Python (3.4.3)
py
Accepted
97
3060
256
n, k = map(int, input().split()) num_list=list(map(int,input().split())) flag = False num = n while flag == False: str_num = str(num) flag = True for ban_num in num_list: if str(ban_num) in str_num: num = num + 1 flag = False break print(num)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,161
s301032126
p04045
u053404471
1584489968
Python
Python (3.4.3)
py
Accepted
48
3060
197
n, k = map(int,input().split()) ds = set(input().split()) for i in range(n, n + 100000): ok = True for j in str(i): if j in ds: ok = False break if ok: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,162
s667911895
p04045
u350997995
1584487861
Python
Python (3.4.3)
py
Accepted
60
2940
219
N,K = map(int,input().split()) D = list(input().split()) for i in range(N,N+100000): n = str(i) k = 1 for j in n: if j in D: k=0 break if k: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,163
s652219315
p04045
u788703383
1584460492
Python
Python (3.4.3)
py
Accepted
79
2940
136
n,k =map(int,input().split()) D = set(str(x) for x in input().split()) safe = set(range(10)) - D while D & set(str(n)): n+=1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,164
s955763969
p04045
u788703383
1584459500
Python
Python (3.4.3)
py
Accepted
18
3064
746
import sys sys.setrecursionlimit(10**6) n_price,k = map(str,input().split()) k = int(k) n_length = len(n_price) d_ng_list = list(input()) restrict = True answer = "" for s in range(10): if str(s) not in d_ng_list: min_number = str(s) break def find_number(i): global restrict if not restrict: return min_numbe...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,165
s923125347
p04045
u798316285
1584331591
Python
Python (3.4.3)
py
Accepted
57
3060
220
n,k=map(int,input().split()) D=input().split() for i in range(n,10**5): flag=True S=str(i) for s in S: if s in D: flag=False break if flag: ans=i break print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,166
s585850574
p04045
u046592970
1584150210
Python
Python (3.4.3)
py
Accepted
73
2940
257
n, k = map(int,input().split()) d = list(map(int,input().split())) for i in range(n,100001): x = 0 for j in str(i): if int(j) in d: x = 1 break if x == 1: pass else: break print(i)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,167
s183226518
p04045
u274080981
1584132358
Python
Python (3.4.3)
py
Accepted
76
2940
123
n,k=map(int,input().split()) d=set(input()) for i in range(n, 10000000): if len(set(str(i))&d)==0: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,168
s210887471
p04045
u764401543
1584003387
Python
Python (3.4.3)
py
Accepted
71
2940
209
n, k = map(int, input().split()) out_list = input().split() ans = n while True: for min in out_list: if min in str(ans): ans += 1 break else: break print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,169
s311132908
p04045
u867826040
1583951899
Python
Python (3.4.3)
py
Accepted
85
2940
169
n,k = map(int,input().split()) d = input().split() f = True while(f): for s in d: if s in str(n): _ = n n += 1 break else: break print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,170
s409026110
p04045
u930705402
1583951805
Python
Python (3.4.3)
py
Accepted
71
3060
216
N,K=map(int,input().split()) s=''.join(list(map(str,input().split()))) while True: t=str(N) for l in t: if l in s: N+=1 break if(N==int(t)): print(t) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,171
s188276669
p04045
u079022693
1583938186
Python
Python (3.4.3)
py
Accepted
93
3188
521
from sys import stdin def check(n,s): n=str(n) for i in range(len(n)): if int(n[i]) not in s: return False else: return True def main(): #入力 readline=stdin.readline N,K=map(int,readline().split()) D=list(map(int,readline().split())) s=set([0,1,2,3,4,5,6,7,8,...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,172
s524825393
p04045
u738898077
1583904917
Python
Python (3.4.3)
py
Accepted
54
3060
199
n,k = map(int,input().split()) dls = list(map(str,input().split())) while 1: s = str(n) for i in dls: if i in s: break else: print(n) exit() n += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,173
s982508234
p04045
u762420987
1583901074
Python
Python (3.4.3)
py
Accepted
70
2940
271
def check(num, ng): for c in str(num): if int(c) in ng: return False return True N, K = map(int, input().split()) D = set(list(map(int, input().split()))) while True: if check(N, D): print(N) break else: N += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,174
s166478182
p04045
u350997995
1583900826
Python
Python (3.4.3)
py
Accepted
57
2940
217
N,K = map(int,input().split()) D = list(input().split()) for i in range(N,100001): n = str(i) k = 1 for j in n: if j in D: k=0 break if k: print(n) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,175
s535682563
p04045
u841623074
1583887206
Python
Python (3.4.3)
py
Accepted
96
3060
186
N,K=map(int,input().split()) D=[x for x in input().split()] E=set(D) ans=N while True: q=set(str(ans)) if (q&E)==set(): break else: ans+=1 print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,176
s659460753
p04045
u841623074
1583887131
Python
Python (3.4.3)
py
Accepted
91
3060
180
N,K=map(int,input().split()) D=[x for x in input().split()] E=set(D) ans=N while True: q=set(str(ans)) if len(q&E)==0: break else: ans+=1 print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,177
s150083348
p04045
u050087249
1583883040
Python
Python (3.4.3)
py
Accepted
18
3064
845
yen, num = list(map(int, input().split())) dislike = list(map(int, input().split())) dislike.sort() a = [1]*10 ans = [] yenstr = list(str(yen)) for i in range(num): a[dislike[i]] = 0 for i in range(10): if a[i] != 0: ans.append(i) for i in reversed(range(len(yenstr))): if ans[len(ans)-1]<int(yenstr[i]): ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,178
s718063059
p04045
u771538568
1583786919
Python
Python (3.4.3)
py
Accepted
93
2940
149
N,K=map(int,(input().split())) li=[] m=set(input()) for j in range(N,100000): if len(set(m & set(str(j))))==0: print(j) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,179
s184683780
p04045
u210440747
1583755155
Python
Python (3.4.3)
py
Accepted
91
2940
256
#!/usr/bin/python3 # -*- coding:utf-8 -*- def main(): n, k = map(int, input().split()) ds = set(input().split()) for x in range(n, 10*n+1): if len(set(list(str(x))) & ds) == 0: print(x) break if __name__=='__main__': main()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,180
s072989091
p04045
u620238824
1583624148
Python
Python (3.4.3)
py
Accepted
85
2940
293
N,K = list(map(int, input().split())) D = set(input()) #print(D) #print(set(str(N))) #&はどちらも満たすとき #N&Dは、NとDのどちらのリストにもある要素 #print(set(str(N))&D) #NとDの共通要素がある間はNに数字を足す while set(str(N))&D: N+=1 print(N)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,181
s414336204
p04045
u723583932
1583567837
Python
Python (3.4.3)
py
Accepted
19
3064
521
#abc 042 c def dfs(i,s): if i==n_keta: if s>=n: kouho.append(s) return 0 for j in range(len(like)): dfs(i+1,s+like[j]) return 0 n,k=input().split() d=list(map(int,input().split())) like=[] for i in range(10): if i not in d: like.append(str(i)) kouho=[] n_keta...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,182
s162628826
p04045
u644972721
1583467088
Python
Python (3.4.3)
py
Accepted
88
3060
257
n, k = map(int, input().split()) d = list(map(str, input().split())) for i in range(n, 10 ** 5 + 1): s = list(str(i)) c = 0 for j in s: if j in d: c = 1 break if c == 0: print("".join(s)) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,183
s848963387
p04045
u422272120
1583387113
Python
Python (3.4.3)
py
Accepted
67
2940
185
n,k = map(int, input().split()) d = list(input().split()) for i in range(n,100000): for j in d: if j in str(i): break else: print (i) exit ()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,184
s694709532
p04045
u422272120
1583387032
Python
Python (3.4.3)
py
Accepted
67
2940
189
n,k = map(int,input().strip().split()) d = list(input().split()) for x in range(n,100000): for y in d: if y in str(x): break else: print(x) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,185
s495637941
p04045
u126887629
1583380079
Python
Python (3.4.3)
py
Accepted
68
2940
198
n,k = map(int,input().strip().split()) d = list(input().split()) for x in range(n,100000): for y in d: if y in str(x): break else: print(x) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,186
s855337982
p04045
u738341948
1583233987
Python
Python (3.4.3)
py
Accepted
67
2940
190
n,k = map(int,input().strip().split()) d = list(input().split()) for x in range(n,100000): for y in d: if y in str(x): break else: print(x) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,187
s931876230
p04045
u738322459
1583202307
Python
Python (3.4.3)
py
Accepted
67
2940
187
N, K = map(int, input().split()) D = list(input().split()) for x in range(N, 100000): for y in D: if y in str(x): break else: print(x) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,188
s542300363
p04045
u961674365
1583128603
Python
Python (3.4.3)
py
Accepted
62
2940
182
n,k=map(int,input().split()) d=list(input().split()) while True: s=str(n) cnt=0 for x in d: if x in s: cnt+=1 break if cnt==0: print(n) exit() n+=1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,189
s852422102
p04045
u620084012
1582926573
Python
Python (3.4.3)
py
Accepted
38
3060
387
import sys, math def input(): return sys.stdin.readline()[:-1] def main(): N, K = map(int,input().split()) D = set(input().split()) for ans in range(N,1000000): f = 0 for e in str(ans): if e in D: f = 1 break if f == 0: pr...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,190
s909646257
p04045
u561231954
1582745358
Python
Python (3.4.3)
py
Accepted
72
3060
366
def main(): n,k=map(int,input().split()) d=set(map(str,input().split())) while True: s=set(str(n)) flag=True for i in s: if i in d: flag=False break if flag: break else: n+=1 print(n) ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,191
s407462076
p04045
u964299793
1582676329
Python
Python (3.4.3)
py
Accepted
50
3060
210
import sys n,k=map(int,input().split()) d=set(input().split()) for i in range(n,99999+1): flag=True s=str(i) for j in s: if j in d: flag=False break if flag: print(i) sys.exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,192
s410423080
p04045
u734936991
1582409977
Python
Python (3.4.3)
py
Accepted
54
3064
351
#!/use/bin/env python3 (n, k) = [int(s) for s in input().split()] a = [int(s) for s in input().split()] like = [] ans = n b = n while (1): c = True b = n while (b != 0): d = b % 10 b = b // 10 if d in a: c = False break if (c): ans = n ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,193
s486766328
p04045
u431981421
1582332834
Python
Python (3.4.3)
py
Accepted
91
3060
212
import sys N, K = map(int, input().split()) D = list(map(int, input().split())) for n in range(N, 10**9): li = list(str(n)) for i in li: if int(i) in D: break else: print(n) sys.exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,194
s405676126
p04045
u810066979
1582261821
Python
Python (3.4.3)
py
Accepted
84
3060
231
import bisect n,k=map(int,input().split()) num_list=[i for i in range(10)] d=list(input().split()) ans=n while(True): n_digit=str(ans) for i in range(len(d)): if d[i] in n_digit : break else: print(ans) exit() ans+=1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,195
s809019992
p04045
u020390084
1581825295
Python
Python (3.4.3)
py
Accepted
59
3064
651
#!/usr/bin/env python3 import sys def solve(N: int, K: int, D: "List[int]"): D = list(map(str,D)) while True: for d in D: if d in str(N): N += 1 break else: print(N) break return def main(): def iterate_tokens()...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,196
s897190139
p04045
u007263493
1581815962
Python
Python (3.4.3)
py
Accepted
44
2940
188
n , k = map(int,input().split()) d = set(input().split()) while True: for c in str(n): if c in d: break else: print(n) exit() n +=1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,197
s753916849
p04045
u534450736
1581710970
Python
Python (3.4.3)
py
Accepted
57
2940
185
n, k = map(int, input().split()) l = list(input().split()) ans = n while 1: for i in str(ans): if i in l: break else: break ans += 1 print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,198
s588386474
p04045
u953794676
1581707916
Python
Python (3.4.3)
py
Accepted
64
3060
260
numbers = [str(e) for e in range(10)] n, k = map(int, input().split()) hate_list = [e for e in input().split()] available = set(numbers) - set(hate_list) for i in range(n, 100000): nums = set(str(i)) if nums <= available: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,199
s316140397
p04045
u068595072
1581481729
Python
Python (3.4.3)
py
Accepted
59
3060
318
n, k = list(map(int, input().rstrip().split())) d = list(map(int, input().rstrip().split())) ans = n while (True): x = ans flag = 1 while x > 0: r = x % 10 x = x // 10 if r in d: ans += 1 flag = 0 break if flag == 1: break print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,200
s208518526
p04045
u595289165
1581452291
Python
Python (3.4.3)
py
Accepted
22
3064
487
n, k = map(int, input().split()) d = set(map(int, input().split())) inf = 10 * n + 1 stop = len(str(n)) num = [] for i in range(10): if i in d: pass else: num.append(i) def dfs(pos, x): if pos == stop: if x >= n: return x else: return inf ret = ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,201
s159008260
p04045
u242031676
1581414156
Python
Python (3.4.3)
py
Accepted
66
3188
167
n, k, *d = map(int, open(0).read().split()) d = set(d) while 1: for i in str(n): if int(i) in d: break else: print(n) break n += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,202
s725944929
p04045
u103902792
1581391609
Python
Python (3.4.3)
py
Accepted
58
2940
201
n,_ = map(int,input().split()) ds = list(input().split()) amount = n while 1: s_amount = str(amount) for d in s_amount: if d in ds: break else: break amount += 1 print(amount)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,203
s830307008
p04045
u298297089
1581391121
Python
Python (3.4.3)
py
Accepted
52
2940
189
n,k = map(int, input().split()) d = input().split() for i in range(n,10**6+1): s = str(i) for j in d: if j in s: break else: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,204
s044541102
p04045
u721970149
1581283176
Python
Python (3.4.3)
py
Accepted
93
2940
264
# 入力 : 横並びの数字N個(リスト内包表記で) N, K = map(int, input().split()) set_D = {str(int(x)) for x in input().split()} ans = N while True : if set(str(ans)).intersection(set_D) : ans += 1 else : break print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,205
s969784382
p04045
u118050510
1581134110
Python
Python (3.4.3)
py
Accepted
60
3060
263
s = input().split(" ") n = int(s[0]) numbers = [ i for i in input() if i != " "] for i in range(n, 100001): found = False snum = str(i) for num in numbers: if num in snum: found = True break if found == False: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,206
s329780587
p04045
u732412551
1581017354
Python
Python (3.4.3)
py
Accepted
20
3060
310
from itertools import product N, K = map(int, input().split()) D = set(map(int, input().split())) C = set(i for i in range(10)) C -= D B = sorted(str(c) for c in C) for i in range(1, 10): for p in product(B, repeat=i): s = "".join(p) if int(s) >= N: print(s) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,207
s155280833
p04045
u677121387
1580939424
Python
Python (3.4.3)
py
Accepted
52
2940
212
n,k = map(int,input().split()) d = [i for i in input().split()] flag = True while flag: for c in str(n): if c in d: n += 1 break else: flag = False print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,208
s335280853
p04045
u047816928
1580918438
Python
Python (3.4.3)
py
Accepted
65
2940
131
N, K = map(int, input().split()) D = set(input().split()) for n in range(N, 100000): if set(str(n)).isdisjoint(D): break print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,209
s581839809
p04045
u416223629
1580896307
Python
Python (3.4.3)
py
Accepted
28
3316
549
import itertools N,K=map(int,input().split()) D=list(map(int,input().split())) default=[0,1,2,3,4,5,6,7,8,9] for i in D: if i in default: default.remove(i) price=[] for cost in itertools.product(default, repeat=len(str(N))): price.append(int(''.join(list(map(str,list(cost)))))) price.sort() price=[...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,210
s438752960
p04045
u572142121
1580766086
Python
Python (3.4.3)
py
Accepted
76
2940
138
N,K=map(int,input().split()) D=list(input().split()) A=set(D) for i in range(N,10*N+1): if len(set(str(i))&A)==0: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,211
s341448333
p04045
u686230543
1580701214
Python
Python (3.4.3)
py
Accepted
58
2940
224
n, k = map(int, input().split()) dislike = input().split() while True: flag = True n_str = str(n) for i in n_str: if i in dislike: flag = False break if flag: print(n) break else: n += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,212
s646807643
p04045
u754022296
1580680888
Python
Python (3.4.3)
py
Accepted
77
3188
185
n, k = map(int, input().split()) A = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} - set(input().split()) while True: s = set(str(n)) if s <= A: print(n) break n += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,213
s475214199
p04045
u506858457
1580665586
Python
Python (3.4.3)
py
Accepted
86
2940
157
N,K=map(int,input().split()) D=list(input().split()) while True: l=list(str(N)) for i in l: if i in D: break else: break N+=1 print(N)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,214
s261024669
p04045
u506858457
1580665510
Python
Python (3.4.3)
py
Accepted
79
2940
156
N,K=map(int,input().split()) D=set(input().split()) while True: l=list(str(N)) for i in l: if i in D: break else: break N+=1 print(N)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,215
s295374149
p04045
u572373398
1580564920
Python
Python (3.4.3)
py
Accepted
94
3060
224
nk = list(map(int, input().split())) N = nk[0] K = nk[1] d = input().split() a = True for i in range(N, 90001): a = True for j in d: if str(i).count(j) > 0: a = False break if a: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,216