submission_id
string
problem_id
string
status
string
code
string
input
string
output
string
problem_description
string
s968504129
p04045
Wrong Answer
N, K = map(int, input().split()) L = sorted(set(map(str, range(10))) - set(input().split())) import bisect ans ='' i = 0 while i < len(str(N)): x = str(N)[::-1][i] if x in L: ans += x i = i + 1 continue p = bisect.bisect_right(L, x) if p < len(L): ans += L[p] else: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s470389062
p04045
Wrong Answer
N, K = map(int, input().split()) D = [Di for Di in input().split()] for n in range(N, 10000): n = str(n) flag = True for i in range(len(str(n))): if n[i] in D: flag = False break if flag: print(n) exit()
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s921251792
p04045
Wrong Answer
n,k = map(int,raw_input().split()) arr = [0,1,2,3,4,5,6,7,8,9] r = map(int,raw_input().split()) for i in r: arr.remove(i) def count_digit(num): count = 0 t = num while t > 0 : count += 1 t /= 10 return count dc = count_digit(n) ans = float("inf") def dfs(s,i): global ans,n,dc if i == dc : ret = i...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s339605845
p04045
Wrong Answer
n,k = map(int,raw_input().split()) arr = [0,1,2,3,4,5,6,7,8,9] r = map(int,raw_input().split()) for i in r: arr.remove(i) print arr def count_digit(num): count = 0 t = num while t > 0 : count += 1 t /= 10 return count dc = count_digit(n) ans = float("inf") def dfs(s,i): global ans,n,dc if i == dc :...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s992615834
p04045
Wrong Answer
import itertools str_n, str_k = input().split() n = int(str_n) k = int(str_k) d = set([int(di) for di in input().split()]) opt = list({0,1,2,3,4,5,6,7,8,9} - d) res = [] for opts in itertools.product(opt, repeat=len(str_n)+1): r = 0 for i in range(0, len(str_n)+1): r += opts[i] * 10**i res.append...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s971965366
p04045
Wrong Answer
import itertools str_n, str_k = input().split() n = int(str_n) k = int(str_k) d = set([int(di) for di in input().split()]) opt = list({0,1,2,3,4,5,6,7,8,9} - d) res = [] for opts in itertools.product(opt, repeat=len(str_n)): r = 0 for i in range(0, len(str_n)): r += opts[i] * 10**i res.append(r) ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s021505146
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) N_str = str(N) N_str_rv = list(N_str)[::-1] i = 0 ans = [] while i<len(N_str_rv): flag = 1 for num in range(int(N_str_rv[i]),10): if not num in D: ans.append(num) N += (num-int(N_str_rv[i]))*(10**i) ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s816278138
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) N_str = str(N) N_str_rv = list(N_str)[::-1] i = 0 ans = [] while i<len(N_str_rv): flag = 1 for num in range(int(N_str_rv[i]),10): if not num in D: ans.append(num) N += (num-int(N_str_rv[i]))*(10**i) ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s774682577
p04045
Wrong Answer
import itertools, math n, k = map(int, input().split()) nums = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} - {x for x in input().split()} ans = float("inf") for cnt in range(10001): tmp = set(list(str(cnt))) if tmp <= nums and n <= cnt < ans: ans = cnt print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s141536893
p04045
Wrong Answer
import itertools, math n, k = map(int, input().split()) nums = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} - {x for x in input().split()} ans = float("inf") for cnt in range(10001): tmp = set(list(str(cnt))) print(tmp, cnt) if tmp <= nums and n <= cnt < ans: ans = cnt print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s685098438
p04045
Wrong Answer
import itertools, copy n, k = map(int, input().split()) array = set([int(x) for x in input().split()]) res = map(str, {1, 2, 3, 4, 5, 6, 7, 8, 9, 0} - array) res2 = list(res) array = itertools.product(res, repeat=len(str(n))+1) ans = float("inf") for i in array: tmp = int("".join(i)) if n <= tmp < ans: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s305450552
p04045
Wrong Answer
import itertools n, k = map(int, input().split()) array = set([int(x) for x in input().split()]) res = map(str, set([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) - array) array = itertools.product(res, repeat=len(str(n))+1) ans = float("inf") for i in array: tmp = int("".join(i)) if n <= tmp < ans: ans = tmp print...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s333956812
p04045
Wrong Answer
import itertools n, k = map(int, input().split()) array = set([int(x) for x in input().split()]) res = map(str, set([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) - array) array = itertools.product(res, repeat=len(str(n))) ans = float("inf") for i in array: tmp = int("".join(i)) if n <= tmp < ans: ans = tmp print(a...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s309921845
p04045
Wrong Answer
n,k=map(int,input().split()) d=list(map(int,input().split())) a=[0,1,2,3,4,5,6,7,8,9] for i in d: del a[a.index(i)] for i in a: for j in a: for k in a: for l in a: for m in a: p=int(i*10**4+j*10**3+k*10**2+l*10+m) if p>=n: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s712282616
p04045
Wrong Answer
n, k = list(map(int, input().split())) d = list(map(int, input().split())) n = str(n) ans = '' for i, nn in enumerate(n): while(True): if int(nn) in d: nn = str(int(nn)+1) else: ans += nn break print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s376078177
p04045
Wrong Answer
n,k = map(int, input().split()) d = list(map(int, input().split())) a = [] for i in range(10): if not i in d: a.append(str(i)) for i in range(n, 10000): tmp = str(i) ok = 0 for j in tmp: if j in a: ok += 1 if ok == len(tmp): break print(int(tmp))
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s804339099
p04045
Wrong Answer
n, k = map(int, raw_input().split()) d = map(int, raw_input().split()) res = '' while n > 0: b = n % 10 n = n / 10 plus = False while b in d: b += 1 if b == 10: plus = True b = 0 res = str(b) + res if plus: n += 1 print(res)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s252789660
p04045
Wrong Answer
N,K = map(int,input().split( )) Ds = list(map(int,input().split( ))) word = list(map(int,list(str(N)))) z = 0 while z in Ds: z += 1 for i in range(len(word)): for j in range(len(Ds)): if word[-i-1] in Ds: word[-i-1] += 1 if i > 0: word[-i:] = [z for i in range(i)] if word[-i-1]>=10:...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s270327943
p04045
Wrong Answer
n, k = map(int,input().split()) unlike = list(map(int,input().split())) like = [0] for i in range(1, 10): if i not in unlike: like.append(i) def func(arr): return list(map(int,list(str(arr)))) for i in range(n,80001): ans = func(i) if not(set(ans) - set(like)): print(''.join(map(str,a...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s601274318
p04045
Wrong Answer
n, k = map(int,input().split()) unlike = list(map(int,input().split())) like = [0] flg = False for i in range(1, 10): if i not in unlike: like.append(i) def func(arr): return list(map(int,list(str(arr)))) for i in range(n,10000): ans = func(i) if not(set(ans) - set(like)): print(''.joi...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s732345139
p04045
Wrong Answer
import itertools n, k = map(int,input().split()) unlike = list(map(int,input().split())) like = [0] ans = [] def _join(arr): num = 0 for i in range(len(str(n))): num += arr[i] * (10 ** (len(arr) - i - 1)) return num for i in range(1, 10): if i not in unlike: like.append(i) def rev(arr...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s455103431
p04045
Wrong Answer
n,k=map(int, input().split()) d=list(input().split()) ans=10000 for i in range(n,10000): for j in d: if str(i).count(j):break else: ans=i break print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s414616625
p04045
Wrong Answer
n,k=map(int, input().split()) d=list(input().split()) ans=10000 for i in range(n,10000): for j in d: if str(i).count(j):break else: ans=min(ans,i) break print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s236547223
p04045
Wrong Answer
n,k=map(int, input().split()) d=list(map(int, input().split())) ans=10000 for i in range(n,10001): for j in d: if str(i).count(str(j)):break else: ans=min(ans,i) print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s837771226
p04045
Wrong Answer
n, k = [i for i in input().split()] d = [i for i in input().split()] # OK 숫자의 집합을 구하고, # 각 자리수부터 들어가 NG 숫자를 OK숫자로 바꿔주면 되는 거 아냐? n = list(n) ng = set(d) for i in range(len(n)): # print(ng) ok = set([str(i) for i in range(10)]) - ng # print(ok) if i == 0 and '0' in ok: ok.remove('0') ng.a...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s379883206
p04045
Wrong Answer
n, k = [i for i in input().split()] d = [i for i in input().split()] # OK 숫자의 집합을 구하고, # 각 자리수부터 들어가 NG 숫자를 OK숫자로 바꿔주면 되는 거 아냐? n = list(n) ng = set(d) for i in range(len(n)): # print(ng) ok = set([str(i) for i in range(10)]) - ng # print(ok) if i == 0 and '0' in ok: ok.remove('0') if n[i] ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s925440318
p04045
Wrong Answer
n, k = map(int, input().split()) d = list(map(int, input().split())) for i in range(10*n+2): if i >= n: s = str(i) for j in range(len(s)): if int(s[j]) in d: break else: print(i)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s773042031
p04045
Wrong Answer
n, k = map(int, input().split()) d = list(map(int, input().split())) for i in range(10*n+2): if i >= n: s = str(i) for j in range(len(s)): if int(s[j]) in d: break print(i)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s430059534
p04045
Wrong Answer
n, k = map(int, input().split()) d = list(map(int, input().split())) for i in range(10*n+2): if i >= n: s = str(i) for j in range(len(s)): if int(s[j]) in d: break else: print(i)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s419750555
p04045
Wrong Answer
n, k = map(int, input().split()) d_list = list(map(int, input().split())) num_list = [0,1,2,3,4,5,6,7,8,9] for d in d_list: num_list.remove(d) final_price = '' def is_dislike_number(number, dislike_list): if number in dislike_list: return True else: return False for i, num in enumerate(str(n)): num ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s445476428
p04045
Wrong Answer
n, k = map(int, input().split()) d_list = list(map(int, input().split())) num_list = [0,1,2,3,4,5,6,7,8,9] for d in d_list: num_list.remove(d) final_price = '' def is_dislike_number(number, dislike_list): if number in dislike_list: return True else: return False for i, num in enumerate(str(n)): num ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s181941046
p04045
Wrong Answer
n, k = map(int, input().split()) d_list = list(map(int, input().split())) num_list = [0,1,2,3,4,5,6,7,8,9] for d in d_list: num_list.remove(d) final_price = '' def is_dislike_number(number, dislike_list): if number in dislike_list: return True else: return False for i, num in enumerate(str(n)): num ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s179027204
p04045
Wrong Answer
n,m = map(int,input().split()) num_list = list(map(int,input().split())) while(True): flag=True; num=n while(num!=0): for i in num_list: if(num//10 == i): flag=False num = num/10 if(flag==True): print(n) break else : n=n+1
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s279166392
p04045
Wrong Answer
N,K = map(int, input().split()) D = input().split() ans = N while True: ch_n = str(ans) for c in ch_n: if c in D: break print(ans) exit() ans += 1
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s988114629
p04045
Wrong Answer
N,K = map(int, input().split()) D = list(map(int, input().split())) while True: ch_n = str(N) for c in ch_n: if int(c) in D: break print(N) exit() N += 1
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s794339751
p04045
Wrong Answer
N,K = (int(i) for i in input().split()) D = [int(i) for i in input().split()] n = len(str(N)) for i in range(1,10): if i not in D: print(str(i)*(n+1))
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s152783021
p04045
Wrong Answer
n,k = map(int, input().split()) d = list(map(int, input().split())) check = [False]*10 for i in range(k): check[d[i]] = True def judge(x): while x > 0: if check[x%10]: return False x //= 10 return True if judge(n): ans = n else: min_allow = 0 for i in range(10): ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s087946204
p04045
Wrong Answer
n,k = map(int, input().split()) d = list(map(int, input().split())) check = [False]*10 for i in range(k): check[d[i]] = True def judge(x): while x > 0: if check[x%10]: return False x //= 10 return True if judge(n): ans = n else: min_allow = 0 for i in range(10): ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s778616021
p04045
Wrong Answer
N, K = map(int, input().split()) a = set(range(10)) d = set([int(i) for i in input().split()]) b = a - d k = {} c = 0 n = N while n: n, r = divmod(n, 10) k[c] = r c += 1 ans = 0 l = len(k.keys()) for i, j in enumerate(sorted(k.keys())): if j != (l-1) and not k[j] in b: ans += 10**j * min(b) ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s074254397
p04045
Wrong Answer
N, K = map(int, input().split()) a = set(range(10)) d = set([int(i) for i in input().split()]) b = a - d k = {} c = 0 n = N while n: n, r = divmod(n, 10) k[c] = r c += 1 ans = 0 l = len(k.keys()) for i, j in enumerate(sorted(k.keys())): if j != (l-1) and not k[j] in b: ans += 10**j * min(b) ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s633148507
p04045
Wrong Answer
N, K = map(int, input().split()) a = set(range(10)) d = set([int(i) for i in input().split()]) b = a - d k = {} c = 0 n = N while n: n, r = divmod(n, 10) k[c] = r c += 1 ans = 0 l = len(k.keys()) for i, j in enumerate(sorted(k.keys())): if j != (l-1) and not k[j] in b: ans += 10**j * min(b) ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s253207392
p04045
Wrong Answer
N, K = map(int, input().split()) a = set(range(10)) d = set([int(i) for i in input().split()]) b = a - d k = {} c = 0 n = N while n: n, r = divmod(n, 10) k[c] = r c += 1 ans = 0 l = len(k.keys()) for i, j in enumerate(sorted(k.keys())): if j != (l-1) and not k[j] in b: ans += 10**j * min(b) ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s037251728
p04045
Wrong Answer
n, k = map(int, input().split()) d = list(input().split()) num = n found = False while not found: for e in d: if e in set(str(num)): num += 1 break found = True print(num)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s422379422
p04045
Wrong Answer
n, k = map(int, input().split()) d = list(map(int, input().split())) num = n found = False while not found: for i in list(str(num)): for d_k in d: if i == d_k: num += 1 break found = True print(num)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s701069037
p04045
Wrong Answer
def main(): n, k = map(int, input().split()) d = set(map(int, input().split())) c = list(set(range(10)).difference(d)) c.sort() num, success = sup(n, c) if success: ans = num else: c_min = c[0] ans = c_min*10000 + c_min*1000 + c_min*100 + c_min*10 + c_min print...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s061294020
p04045
Wrong Answer
def find_next_valid_digit(d, bad_nums): next_digit = d while True: next_digit = next_digit + 1 valid = True for c in str(next_digit): if int(c) in bad_nums: valid = False break if valid: break return next_digit if __nam...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s691406476
p04045
Wrong Answer
n, k = (int(i) for i in input().split()) number = [int(i) for i in input().split()] answer = 0 list_n = str(n) count = list(map(int, list_n)) def check(true_number, answer): answer = str(answer) for i in true_number: if str(i) in answer: break else: return False re...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s920870425
p04045
Wrong Answer
n, k = (int(i) for i in input().split()) number = [int(i) for i in input().split()] answer = [] list_n = str(n) count = list(map(int, list_n)) true_number = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] for i in number: if i in true_number: true_number.remove(i) flag = 0 for j in count: for i in true_number: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s412913133
p04045
Wrong Answer
n, k = (int(i) for i in input().split()) number = [int(i) for i in input().split()] answer = [] list_n = str(n) count = list(map(int, list_n)) true_number = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] for i in number: if i in true_number: true_number.remove(i) flag = 0 for j in count: for i in true_number: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s798457901
p04045
Wrong Answer
n, k = (int(i) for i in input().split()) number = [int(i) for i in input().split()] answer = [] list_n = str(n) count = list(map(int, list_n)) true_number = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] for i in number: if i in true_number: true_number.remove(i) for j in count: for i in true_number: if j <= ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s408556039
p04045
Wrong Answer
import math l = list(map(int,input().split())) n = l[0] k = l[1] d = list(map(int,input().split())) hoge = list(range(10)) for i in d: hoge.remove(i) dig = math.ceil(math.log(n,10)) po = 0 for i in range(dig): po += hoge[len(hoge)-1]*(10**i) ans = 0 if po < n: if 0 in hoge: print(hoge[1]*(10**dig)) ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s245034338
p04045
Wrong Answer
def main(): N, K = map(int, input().split()) D = set(map(int, input().split())) for i in range(10): if i not in D: min_ = i break k = 10 ** (len(str(N)) - 1) ans = [] apnd = ans.append num, flag = N, 0 while k > 0: if not flag: while ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s950307528
p04045
Wrong Answer
def main(): N, K = map(int, input().split()) D = set(map(int, input().split())) ans = [] apnd = ans.append num = N while num > 0: while num % 10 in D: num += 1 num, m = divmod(num, 10) apnd(m) print(*ans[::-1], sep='') main()
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s727309719
p04045
Wrong Answer
def main(): N, K = map(int, input().split()) D = set(map(int, input().split())) k = len(str(N)) ans = [0] * k num = N for i in range(1, k + 1): while num % 10 in D: num += 1 num, ans[k-i] = divmod(num, 10) print(*ans, sep='') main()
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s346489713
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) shiharai = N l = [int(x) for x in list(str(N))] c = len(l) for i in range(len(l)): while l[i] in D: shiharai+=1 l = [int(x) for x in list(str(shiharai))] if len(l)==c+1: while l[c] in D: shiharai+=1 ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s809659370
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) shiharai=N l = [int(x) for x in list(str(N))] c=len(l) for i in range(len(l)): while l[i] in D: shiharai+=1 l = [int(x) for x in list(str(shiharai))] if len(l)!=c: for i in range(len(l)): while l[i] in D: sh...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s414265407
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) shiharai=N l = [int(x) for x in list(str(N))] c=len(l) for i in range(len(l)): while l[i] in D: shiharai+=1 l = [int(x) for x in list(str(shiharai))] if len(l)!=c: while l[len(l)-1] in D: shiharai+=1 l = [int(x)...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s600202062
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) shiharai=N l = [int(x) for x in list(str(N))] c=len(l) for i in range(len(l)): while l[i] in D: shiharai+=1 l = [int(x) for x in list(str(shiharai))] if len(l)!=c: while l[len(l)-1] in D: shiharai+=1 ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s065054745
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) shiharai=N l = [int(x) for x in list(str(N))] c=len(l) for i in range(len(l)): while l[i] in D: shiharai+=1 l = [int(x) for x in list(str(shiharai))] if len(l)!=c: while l[len(l)-1] in D: shiharai+=1
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s541966423
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) shiharai=N l = [int(x) for x in list(str(N))] for i in range(len(l)): while l[i] in D: shiharai+=1 l = [int(x) for x in list(str(shiharai))] print(shiharai)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s103039320
p04045
Wrong Answer
n, k = input().split() o = map(int, input().split()) nums = map(int, list(n)) l = [] for v in nums: while v in o: v += 1 l.append(v) print(''.join(map(str, l)))
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s195961352
p04045
Wrong Answer
# -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem C if __name__ == '__main__': n, k = list(map(str, input().split())) d = list(map(str, input().split())) numbers = [str(i) for i in range(0, 10)] like_numbers = set(numbers) - set(d) for i in like_numbers: for j in like_numbers: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s608475586
p04045
Wrong Answer
# -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem C if __name__ == '__main__': n, k = list(map(str, input().split())) d = list(map(str, input().split())) numbers = [str(i) for i in range(0, 10)] like_numbers = set(numbers) - set(d) for i in like_numbers: for j in like_numbers: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s328823200
p04045
Wrong Answer
n, k = list(map(int, input().split())) d = list(map(int, input().split())) if 0 in d: zero = True else: zero = False n_ok = {0} | set([0,1,2,3,4,5,6,7,8,9]) - set(d) n_oks = sorted(n_ok) #print(n_oks) def lowest(): for i in n_oks: for j in n_oks: for k in n_oks: for l i...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s954202219
p04045
Wrong Answer
N,K=map(int,input().split()) D=[int(i) for i in input().split()] T=[0 for i in range(10)] for i in D: T[i]=1 S=[] for i in range(10): if T[i]==0: S.append(i) import itertools L=list(itertools.product(S,S,S,S)) R=sorted([int(str(i[0])+str(i[1])+str(i[2])+str(i[3])) for i in L]) for i in R: if i>=N: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s866442311
p04045
Wrong Answer
N,K=map(int,input().split()) D=[int(i) for i in input().split()] T=[0 for i in range(10)] for i in D: T[i]=1 S=[] for i in range(10): if T[i]==0: S.append(i) import itertools L=list(itertools.product(S,S,S,S)) R=sorted([int(str(i[0])+str(i[1])+str(i[2])+str(i[3])) for i in L]) for i in R: if i>=N: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s628515290
p04045
Wrong Answer
N,K=map(int,input().split()) D=[int(i) for i in input().split()] T=[0 for i in range(10)] for i in D: T[i]=1 S=[] for i in range(10): if T[i]==0: S.append(i) import itertools L=list(itertools.product(S,S,S,S)) R=sorted([int(str(i[0])+str(i[1])+str(i[2])+str(i[3])) for i in L]) for i in R: if i>=N: ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s253102326
p04045
Wrong Answer
N,K=map(int,input().split()) D=[int(i) for i in input().split()] T=[0 for i in range(10)] for i in D: T[i]=1 S=[] for i in range(10): if T[i]==0: S.append(i) import itertools L=list(itertools.product(S,S,S,S)) R=[int(str(i[0])+str(i[1])+str(i[2])+str(i[3])) for i in L] for i in R: if i>=N: p...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s087985534
p04045
Wrong Answer
N, K = map(int, input().split()) a = input().split() for i in range(N-1, N*100): for j in str(i): if j in a: break else: print(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s835568973
p04045
Wrong Answer
n,k = (int(i) for i in input().split()) d = [int(i) for i in input().split()] for i in range(n,10000): a = str(i) if all(int(j) not in d for j in a): print(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s439874363
p04045
Wrong Answer
from functools import reduce def obsession(n, disliked): def nearest(digit): for i in range(digit, digit + 10): mod10 = i % 10 if mod10 not in disliked: return (mod10, i != mod10) will_pay = list(map(int, str(n))) index = 0 while index < len(will_pay): ...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s233853765
p04045
Wrong Answer
N, K = map(int, input().split()) D = input().split() for i in range(N, 10001): string = set(list(str(i))) for s in string: if s in D: break else: print(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s076697782
p04045
Wrong Answer
N, K = map(int, input().split()) D = set(input().split()) for i in range(N, 10001): string = set(list(str(i))) for s in string: if s in D: break else: print(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s608346041
p04045
Wrong Answer
N, K = map(int, input().split()) D = set(input().split()) for i in range(N, 10001): string = set(str(i)) for s in string: if s in D: break else: print(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s509466488
p04045
Wrong Answer
N, K = map(int, input().split()) D = set(input().split()) array = set(str(i) for i in range(10)) - D for i in range(N, 10001): string = set(str(i)) for s in string: if s in array: continue break else: print(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s527119790
p04045
Wrong Answer
n,k = map(int,input().split()) d = set(map(int,input().split())) x = len(str(n)) for i in range(x): while (n//(10**i))%10 in d: n += 10**i urad = {1,2,3,4,5,6,7,8,9} - d if len(str(n)) != x and 1 in d: n += (min(urad)-1)*(10**x) print(n)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s835981545
p04045
Wrong Answer
n,k = map(int,input().split()) d = set(map(int,input().split())) x = len(str(n)) for i in range(x): while (n//(10**i))%(10**(i+1)) in d: n += 10**i urad = {1,2,3,4,5,6,7,8,9} - d if len(str(n)) != x and 1 in d: n += (min(urad)-1)*(10**x) print(n)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s271085634
p04045
Wrong Answer
n,k = map(int,input().split()) d = set(map(int,input().split())) x = len(str(n)) for i in range(x): while (n//(10**i))%(10**(i+1)) in d: n += 10**i urad = {1,2,3,4,5,6,7,8,9} - d if len(str(n)) != x : n += (min(urad)-1)*(10**x) print(n)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s809412848
p04045
Wrong Answer
n,k = map(int,input().split()) d = set(map(int,input().split())) x = len(str(n)) for i in range(x): while (n//(10**i))%(10**(i+1)) in d: n += 10**i urad = {1,2,3,4,5,6,7,8,9} - d if len(str(n)) != x and 1 in d: n += (min(d)-1)*(10**x) print(n)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s043143616
p04045
Wrong Answer
n,k = map(int,input().split()) d = set(map(int,input().split())) x = len(str(n)) for i in range(x): while (n//(10**i))%(10**(i+1)) in d: n += 10**i urad = {1,2,3,4,5,6,7,8,9} - d if len(str(n)) != x and 1 in d: n += min(d)*(10**x) print(n)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s412947138
p04045
Wrong Answer
n,k = map(int,input().split()) d = set(map(int,input().split())) x = len(str(n)) for i in range(x): while (n//(10**i))%(10**(i+1)) in d: n += 10**i urad = {1,2,3,4,5,6,7,8,9} - d if 1 in d: n += min(d)*(10**x) print(n)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s387136463
p04045
Wrong Answer
import itertools N, K = [int(s) for s in input().split()] D = [int(s) for s in input().split()] U = [str(n) for n in range(10) if n not in D] ret = N * 10 for v in [int(''.join(T)) for T in itertools.product(U, repeat=4)]: if N <= v: ret = min(ret, v) print(ret)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s069613034
p04045
Wrong Answer
import itertools N, K = [int(s) for s in input().split()] D = [int(s) for s in input().split()] U = [str(n) for n in range(10) if n not in D] ret = N * 10 for v in [int(''.join(T)) for T in itertools.product(U, repeat=4)]: print(v) if N <= v: ret = min(ret, v) print(ret)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s325294702
p04045
Wrong Answer
def c_IrohaObsession(N, K, D): d = [str(i) for i in D] i = N while True: for c in str(i): if c in d: break else: return i i += 1
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s901070691
p04045
Wrong Answer
def c_IrohaObsession(N, K, D): d = [str(i) for i in D] for i in range(N, 10000): for c in str(i): if c in d: break else: break return i N,K = [int(i) for i in input().split()] D = [int(i) for i in input().split()] print(c_IrohaObsession(N, K, D))
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s007707784
p04045
Wrong Answer
(n, k), d = map(int, raw_input().split()), set(raw_input().split()) for _ in xrange(n, 10000): if not set(str(_)) & d: print _ break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s622547926
p04045
Wrong Answer
n, k = map(int, input().split()) num = input().split() for i in range(n, 10000): flug = True istr = str(i) for j in range(len(istr)): if istr[j] in num: flug = False break else: pass if flug: print(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s455392203
p04045
Wrong Answer
n=int(input().split()[0]) d=input() k=1 while k <= n: if str((n//k)%10) in d: n+=k else: k*=10 print(n)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s833185367
p04045
Wrong Answer
N,K=map(int,raw_input().split()) D=map(int,raw_input().split()) n=[0,1,2,3,4,5,6,7,8,9] a=[] #Allowed numbers for i in n: if i not in D: a.append(i) for i in range(N,10000): for j in D: if str(i).find(str(j))!=-1: break else: print str(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s330263505
p04045
Wrong Answer
N,K=map(int,raw_input().split()) D=map(int,raw_input().split()) n=[0,1,2,3,4,5,6,7,8,9] a=[] #Allowed numbers for i in n: if i not in D: a.append(i) for i in range(N,10001): for j in D: if str(i).find(str(j))!=-1: break else: print str(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s080903163
p04045
Wrong Answer
n, k = list(map(int, input().split(" "))) d = list(map(int, input().split(" "))) t = 1 while n >= t: digit = int((n / t) % 10) if digit not in d: t *= 10 continue while digit in d: n += t digit = int((n / t) % 10) t *= 10 print(n)
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s455430986
p04045
Wrong Answer
N, K = [int(n) for n in input().split()] D = set([int(n) for n in input().split()]) def digits(n): res = set() while n > 0: res = res.union(set([n%10])) n //= 10 return res n = 1 while True: if digits(N*n).isdisjoint(D): print(N*n) break n+=1
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s111397550
p04045
Wrong Answer
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """042-c""" import sys def solve(dislike_digits_table, first_like_digit, N): """Solve.""" for i, c in enumerate(N): while dislike_digits_table[int(c)]: if c == '9': if i == 0: return solve(dislike_digits_t...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s025045529
p04045
Wrong Answer
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """042-c""" import sys def solve(dislike_digits_table, first_like_digit, number): """Solve.""" if dislike_digits_table[int(number[0])]: while dislike_digits_table[int(number[0])]: if number[0] == '9': number = '10' + number[1:...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s017784026
p04045
Wrong Answer
import sys N,K = list(map(int,input().split())) D = input().split() while True: for i in range(len(str(N))): if str(N)[i] in D: break else: print(N) sys.exit() N += 1
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s118057344
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) L = [i for i in range(10) if i not in D] A = [i for i in L] for i in L: for j in L: A.append(10*i+j) for i in L: for j in L: for k in L: A.append(100*i+10*j+k) for i in L: for j in L: for k in L: for l in L: A...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s030270426
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) L = [i for i in range(10) if i not in D] A = [i for i in L] for i in L: for j in L: A.append(10*i+j) for i in L: for j in L: for k in L: A.append(100*i+10*j+k) for i in L: for j in L: for k in L: for l in L: A...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s353359937
p04045
Wrong Answer
N, K = map(int, input().split()) D = list(map(int, input().split())) L = [i for i in range(10) if i not in D] A = [i for i in L] for i in L: for j in L: A.append(10*i+j) for i in L: for j in L: for k in L: A.append(100*i+10*j+k) for i in L: for j in L: for k in L: for l in L: A...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s149473051
p04045
Wrong Answer
#! python3 import sys N, K = [int(x) for x in input().strip().split(' ')] dislikes = set([int(x) for x in input().strip().split(' ')]) for i in range(10): if i not in dislikes: m_like = i break N = str(N) if int(N[0]) == 9 and 9 in dislikes: N = '10'+N[1:] if 1 not in dislikes and 0 not i...
1000 8 1 3 4 5 6 7 8 9
2000
<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...
s048428434
p04045
Wrong Answer
#! python3 N, K = [int(x) for x in input().strip().split(' ')] dislikes = set([int(x) for x in input().strip().split(' ')]) for i in range(10): if i not in dislikes: m_like = i break N = str(N) if int(N[0]) == 9 and 9 in dislikes: N = '10'+N[1:] r = '' for i in range(len(N)): #print(N[i])...
1000 8 1 3 4 5 6 7 8 9
2000
<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...