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
s332115309
p04045
u668503853
1564101735
Python
Python (3.4.3)
py
Accepted
74
3060
166
N,K=map(int,input().split()) D=list(map(int,input().split())) while True: for n in str(N): if int(n) in D: 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,417
s730071166
p04045
u063052907
1563759229
Python
Python (3.4.3)
py
Accepted
50
2940
184
N, K = map(int, input().split()) lst_D = input().split() while True: for c in str(N): if c in lst_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,418
s170683130
p04045
u591016708
1563489764
Python
Python (3.4.3)
py
Accepted
58
2940
240
def check(num, dislike_list): for n in num: if n in dislike_list: return False break return True N, K = map(int, input().split()) dislike_num = input().split() while not check(str(N), dislike_num): 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,419
s164030849
p04045
u169711213
1563488616
Python
Python (3.4.3)
py
Accepted
61
3060
252
import math inl = input().split(' ') length = len(inl[0]) n = int(inl[0]) hate = input().split(' ') def checkhate(n,hate): n_str = str(n) for c in n_str: if c in hate: return False return True while not checkhate(n,hate): 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,420
s092788160
p04045
u282657760
1563243340
Python
Python (3.4.3)
py
Accepted
69
3064
638
N, K = map(int, input().split()) L = input() def func1(N): if len(str(N)) == 5: if str(N)[0] in L or str(N)[1] in L or str(N)[2] in L or str(N)[3] in L or str(N)[4] in L: return False elif len(str(N)) == 4: if str(N)[0] in L or str(N)[1] in L or str(N)[2] in L or str(N)[3] in L: return False e...
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,421
s653417300
p04045
u201234972
1563242194
Python
Python (3.4.3)
py
Accepted
71
5504
522
#import sys #input = sys.stdin.readline from itertools import product def main(): N, K = map( int, input().split()) D = list( map( int, input().split())) NN = list( map( int, str(N))) A = [ i for i in range(10) if i not in D] ANS = [] for i in range(1,6): for p in product(A, repeat = 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,422
s994781977
p04045
u103341055
1563057476
Python
Python (3.4.3)
py
Accepted
74
2940
364
Num = [int(n) for n in input().rstrip().split()] D = [int(n) for n in input().rstrip().split()] # numbers = [ n for n in range(10) if not n in D] flag = 0 for i in range(Num[0],10*Num[0]+1): for j in str(i): if int(j) in D: flag = 1 break if flag == 0: 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,423
s393415619
p04045
u567434159
1562888853
Python
Python (3.4.3)
py
Accepted
76
2940
200
n, _ = map(int, input().split()) dislike = input().split() while True: flag = True for it in dislike: if it in str(n): flag = False break if flag: 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,424
s032833623
p04045
u502389123
1562640136
Python
Python (3.4.3)
py
Accepted
17
3064
721
N, K = map(int, input().split()) D = list(map(int, input().split())) A = [i for i in range(10)] A = set(A) - set(D) A = list(A) A.sort() S = str(N) s = '' for i in range(len(S)): for j in range(len(A)): if int(S[i]) == A[j]: s += str(A[j]) break if int(S[i]) < A[j]: ...
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,425
s446346819
p04045
u576712004
1562628157
Python
Python (3.4.3)
py
Accepted
60
2940
350
def main(): n, k = list(map(int, input().split())) d = input().split() pay = n while True: ok = True for d_i in d: if d_i in str(pay): ok = False break if ok: break else: pay += 1 print(pay) if __nam...
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,426
s031721277
p04045
u305781333
1562533080
Python
Python (3.4.3)
py
Accepted
89
2940
275
N, K = [int(i) for i in input().split()] D = [str(i) for i in input().split()] payment = N while True: count = 0 for i in D: if i in str(payment): break else: count += 1 if count == len(D): print(payment) exit() payment += 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,427
s407884046
p04045
u504562455
1562518992
Python
Python (3.4.3)
py
Accepted
18
3188
886
import bisect n, k = [int(i) for i in input().split()] d = [int(i) for i in input().split()] a = [int(i) for i in range(10) if i not in d] ans = "" next_d = 0 for i in range(len(str(n))-1, -1, -1): idx = bisect.bisect_left(a, int(str(n)[i])+next_d) if idx == len(a): next_d = 1 ans = str(a[0]) ...
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,428
s390970591
p04045
u787456042
1562456088
Python
Python (3.4.3)
py
Accepted
80
3068
217
n, k = list(map(int, input().split())) d = input().split() for i in range(n, 100000) : si = str(i) for j in range(len(si)) : if si[j] 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,429
s381183826
p04045
u077291787
1562187969
Python
Python (3.4.3)
py
Accepted
93
2940
317
# ABC042C - こだわり者いろはちゃん / Iroha's Obsession (ARC058C) def main(): n, k = list(map(int, input().rstrip().split())) D = set(map(int, input().rstrip().split())) ans = n while any(int(i) in D for i in str(ans)): ans += 1 print(ans) 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,430
s660250454
p04045
u970449052
1561944308
Python
Python (3.4.3)
py
Accepted
47
2940
185
n,k=map(int,input().split()) dl=set(input().split()) ans=n while True: for a in str(ans): if a in dl: break else: print(ans) break 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,431
s578472824
p04045
u728498511
1561854486
Python
Python (3.4.3)
py
Accepted
99
3064
215
def main(): n, k = input().split() d = set(input().split()) while True: if len(set(n) & d)==0: print(n) break n = str(int(n) + 1) 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,432
s202417397
p04045
u375823148
1561839177
Python
Python (3.4.3)
py
Accepted
43
3060
258
N, K = map(int, input().split()) d = list(map(int, input().split())) f = [] for i in range(10): f += [False] for i in range(K): f[d[i]] = True x=N-1 l=True while l: x+=1 l=False b=x while b>0: if f[b%10]: l=True break b//=10 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,433
s756955763
p04045
u223646582
1561671788
Python
Python (3.4.3)
py
Accepted
94
2940
132
N,K=map(int,input().split()) D=set([int(i) for i in input().split()]) while any(int(j) in D for j in 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,434
s104301598
p04045
u911575040
1561655381
Python
Python (3.4.3)
py
Accepted
92
2940
147
n,k=map(int,input().split()) d=set(input().split()) while True: if len(set(str(n))&d)>=1: n+=1 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,435
s069727361
p04045
u911575040
1561654940
Python
Python (3.4.3)
py
Accepted
91
2940
172
N, K = map(int, input().split()) D = set(input().split()) for i in range(10**6): if len(set(str(N)) & D) >= 1: N += 1 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,436
s970622332
p04045
u623349537
1561609773
Python
Python (3.4.3)
py
Accepted
42
3064
553
def good_number(D, n): if n < 10: return n % 10 not in D return n % 10 not in D and good_number(D, n // 10) N, K = input().split() digit_num = len(N) N = int(N) K = int(K) D = list(map(int, input().split())) ub = int(str(D[0]) * (digit_num + 1)) usable = [] for i in range(10): if i not in D: ...
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,437
s894171013
p04045
u537859408
1561594566
Python
Python (3.4.3)
py
Accepted
18
3064
1,117
N, K = input().split() D = input().split() E = [str(x) for x in range(10) if str(x) not in D] n = len(N) next_digit = [(str(d), 0) if str(d) not in D else None for d in range(10)] for i in range(9, -1, -1): if next_digit[i] is None: j = (i + 1) % 10 while next_digit[j] is None: j = (j +...
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,438
s637780941
p04045
u537859408
1561557712
Python
Python (3.4.3)
py
Accepted
72
2940
157
N, K = map(int, input().split()) D = input().split() for n in range(N, 10 * N): if all(map(lambda c: c not in D, str(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,439
s411201189
p04045
u471212175
1561447924
Python
Python (3.4.3)
py
Accepted
18
3188
1,078
N,K = map(int,input().split()) D = set(map(int,input().split())) A = {1,2,3,4,5,6,7,8,9,0} N_list = [int(c) for c in str(N)] use = sorted(list(A - D)) ans = [max(use) for i in range(len(N_list))] mapans = map(str,ans) x = int(''.join(mapans)) if N == x: print(x) elif N > x: if use[0]!= 0: ans = [use[...
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,440
s057392195
p04045
u263830634
1561404107
Python
Python (3.4.3)
py
Accepted
93
3060
408
N, K = map(int, input().split()) D = list(map(int, input().split())) d = [] for i in range(10): if i in D: pass else: d += [i] def check(i): I = str(i) n = len(I) for j in range(n): if int(I[j]) in d: pass else: return False return T...
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,441
s947545685
p04045
u263830634
1561404026
Python
Python (3.4.3)
py
Accepted
89
3060
820
N, K = map(int, input().split()) D = list(map(int, input().split())) #使うことのできるリストの作成 d = [] for i in range(10): if i in D: pass else: d += [i] def check(i): #数値iがdのリストだけで書くことができるかを判定 I = str(i) #文字列に変換 # print (I) n = len(I) #桁数の取得 for j in range(n): #全桁で確認 # print (I[j...
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,442
s019459799
p04045
u263830634
1561403798
Python
Python (3.4.3)
py
Accepted
93
3064
486
N, K = map(int, input().split()) D = list(map(int, input().split())) d = [] for i in range(10): if i in D: pass else: d += [i] def check(i): I = str(i) # print (I) n = len(I) for j in range(n): # print (I[j]) if int(I[j]) in d: pass else: ...
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,443
s990294694
p04045
u243699903
1561152199
Python
Python (3.4.3)
py
Accepted
59
3064
272
n, k = map(int, input().split()) dlist = [s for s in input().split()] ans = n while True: blnOk = True for d in str(ans): if d in dlist: blnOk = False break if blnOk: print(ans) exit() else: 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,444
s277344034
p04045
u494927057
1561086882
Python
Python (3.4.3)
py
Accepted
54
2940
230
N, K = map(int, input().split()) D = list(input().split()) for i in range(N, 100000): flag = True for j in str(i): if j in D: flag = False break if flag: 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,445
s015651275
p04045
u923712635
1561085256
Python
Python (3.4.3)
py
Accepted
54
2940
255
N,K = [int(x) for x in input().split()] D = [x for x in input().split()] ans = '' for i in range(N,N+110000): flag = True for j in str(i): if(j in D): flag = False break if(flag): 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,446
s409209937
p04045
u457423258
1561059100
Python
Python (3.4.3)
py
Accepted
79
2940
247
N,K=map(int,input().split()) D=list(input().split()) while N<100000: fr=False for j in D: if j in str(N): N+=1 fr=True break if fr: continue else: print(N) 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,447
s655351272
p04045
u648452607
1560873119
Python
Python (3.4.3)
py
Accepted
69
3188
246
[n,k]=[int(_) for _ in input().split()] d=[int(_) for _ in input().split()] dt=list({_ for _ in range(10)}-set(d)) def c(n,l): for _c in str(n): if int(_c) not in l: return False return True while True: if c(n,dt): 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,448
s885354409
p04045
u102461423
1560732433
Python
Python (3.4.3)
py
Accepted
17
3188
354
N,K = map(int,input().split()) D = set(int(x) for x in input().split()) safe = set(range(10)) - D def test(N): return set(int(x) for x in str(N)) <= safe def F(N): # 下の位から決める while N % 10: if test(N): return N N += 1 # N は 10の倍数 x = F(N//10) y = min(safe) return 10*x + y answer = F(N) pri...
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,449
s758033454
p04045
u196697332
1560722950
Python
Python (3.4.3)
py
Accepted
76
5472
561
N, K = map(int, input().split()) num_exclude = list(map(int, input().split())) dec_num = [i for i in range(0, 10)] able_use_num_lis = list(map(str, set(dec_num) - set(num_exclude))) num_len = len(str(N)) output_list = [] def dfs(cur, num, able_use_num_lis): if num != '': if int(num) >= 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,450
s013582688
p04045
u136811344
1560707381
Python
Python (3.4.3)
py
Accepted
93
2940
176
N, K = map(int, input().split()) D = set([str(x) for x in input().split()]) while True: if len( set(str(N)).intersection(D)) == 0: print(N) exit() 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,451
s347577853
p04045
u671455949
1560651482
Python
Python (3.4.3)
py
Accepted
19
3064
469
import itertools n, k = map(str, input().split()) ok = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} d = set(map(str, input().split())) ok.difference_update(d) ok_list = list(ok) ok_list.sort() ans = "" if ok_list[-1] * len(n) < n: ans = ok_list[0] * (len(n) + 1) if ok_list[0] != "0" else ok_list[1] + "0" * l...
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,452
s565993882
p04045
u941753895
1560327939
Python
Python (3.4.3)
py
Accepted
72
6304
509
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time sys.setrecursionlimit(10**7) inf=10**20 mod=10**9+7 def LI(): return list(map(int,input().split())) def I(): return int(input()) def LS(): return input().split() def S(): return input() def main(): n,k=LI() l=LS() 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,453
s886942275
p04045
u844005364
1560216927
Python
Python (3.4.3)
py
Accepted
85
2940
157
n, k = map(int, input().split()) dislikes = set(input().split()) price = set(str(n)) while price & dislikes: n += 1 price = set(str(n)) 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,454
s865921072
p04045
u203597140
1560059742
Python
Python (3.4.3)
py
Accepted
17
3064
1,519
def equal(n, available): return n in available def less(n, available): return n < sorted(available, reverse=True)[0] def greater(n, available): return n > sorted(available, reverse=True)[0] #less(n, available) == True であること def upper_next(n, available): for v in sorted(available): if n < v: r...
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,455
s866228374
p04045
u734548018
1560047356
Python
Python (3.4.3)
py
Accepted
35
3064
439
#!/usr/bin/python3 # -*- coding: utf-8 -*- Likes = set() def check(n): global Likes while n > 0: if n%10 not in Likes: return False else: n //= 10 return True def main(): global Likes N,K = map(int, input().split()) Dn = list(map(int, input().split())) Likes = set(range(10))-s...
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,456
s084469659
p04045
u365364616
1559854140
Python
Python (3.4.3)
py
Accepted
18
3064
656
def dfs(i, s, l): if i == len(s): return '' for j in l: if j == int(s[i]): ans = dfs(i + 1, s, l) if ans is not None: ans += str(j) return ans elif j > int(s[i]): ans = str(l[0]) * (len(s) - i - 1) + str(j) r...
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,457
s782216005
p04045
u374531474
1559797708
Python
Python (3.4.3)
py
Accepted
49
2940
284
N, K = map(int, input().split()) D = list(map(int, input().split())) ans = N while True: tmp = ans finish = True while tmp > 0: if tmp % 10 in D: finish = False break tmp //= 10 if finish: 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,458
s157311006
p04045
u057109575
1559414422
Python
Python (3.4.3)
py
Accepted
73
2940
143
N, K = map(int, input().split()) d = set(input().split()) for v in range(N, 10 * N): if not set(str(v)) & d: print(v) 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,459
s130031485
p04045
u278886389
1558996409
Python
Python (3.4.3)
py
Accepted
35
3064
436
N,K = map(int,input().split()) D = list(map(int,input().split())) D = [x for x in range(0,10) if x not in D] n = len(str(N)) K = 10 - K def bi(x): o = [0]*n c = 0 while x > 0: o[c] = x % K x //= K c += 1 return o m = int(str(min(filter(lambda x:x,D)))+str(min(D))*n) for i in r...
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,460
s061964979
p04045
u723180465
1558903014
Python
Python (3.4.3)
py
Accepted
73
3060
262
n, k = list(map(int, input().split())) ds = set(list(map(int, input().split()))) while True: ok = True for c in str(n): if int(c) in ds: ok = False break if ok: 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,461
s421670445
p04045
u369338402
1558832737
Python
Python (3.4.3)
py
Accepted
100
2940
229
n,k=map(int,input().split()) d=input().split() stopcode=False while stopcode==False: for i in range(len(str(n))): if str(n)[i] in d: n+=1 break elif i+1==len(str(n)): stopcode=True 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,462
s602011959
p04045
u524747996
1558625691
Python
Python (3.4.3)
py
Accepted
85
2940
111
N, K = map(int, input().split()) D = set(input().split()) 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,463
s077707920
p04045
u570545890
1558375516
Python
Python (3.4.3)
py
Accepted
81
2940
85
n = int(input().split()[0]) a = set(input()) while a&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,464
s848833780
p04045
u391731808
1558273640
Python
Python (3.4.3)
py
Accepted
68
2940
183
N,K = map(int,input().split()) *D, = map(int,input().split()) for i in range(N,100000): for n in str(i): if int(n) in D: break 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,465
s359068066
p04045
u756518877
1558238708
Python
Python (3.4.3)
py
Accepted
38
3316
1,249
# -*- coding: utf-8 -*- #mathをインポート import math #n円が金額、嫌いな数がk個。入力 n,k=map(int,input().split(" ")) #嫌いな文字リスト klist=input().split(" ") def hantei(n,kl): if len(str(n))==4: while math.floor(n/1000)==kl or \ math.floor(n/100)-10*math.floor(n/1000)==kl or \ math.floor(n/10)-10*math.floor(n/100)==...
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,466
s384738058
p04045
u569742427
1558227633
Python
Python (3.4.3)
py
Accepted
84
3060
205
n, k = [int(n) for n in input().split()] d = [n for n in input().split()] while(1): for l in list(str(n)): if l 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,467
s053743020
p04045
u903948194
1558007926
Python
Python (3.4.3)
py
Accepted
80
3060
202
n, k = [int(n) for n in input().split()] d = [n for n in input().split()] while(1): for l in list(str(n)): if l 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,468
s477908830
p04045
u442581202
1557853681
Python
Python (3.4.3)
py
Accepted
20
3188
460
import itertools n,k = map(int,input().split()) a = list(map(str,input().split())) d = [str(i) for i in range(10)] for c in a: d.remove(c) res = -1 for l in itertools.product(d,repeat=len(str(n))): x = int(''.join(l)) if x>=n and (res==-1 or x<res): res = x if res != -1: print(res) exit(0)...
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,469
s933224422
p04045
u606045429
1557830112
Python
Python (3.4.3)
py
Accepted
80
2940
102
N, _ = map(int, input().split()) D = set(input().split()) 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,470
s985264564
p04045
u606045429
1557829883
Python
Python (3.4.3)
py
Accepted
66
3060
215
N, K = [int(i) for i in input().split()] D = [int(i) for i in input().split()] for i in range(N, 10 * N + 1): for s in str(i): if int(s) in D: break else: print(i) quit()
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,471
s868633924
p04045
u379959788
1557798664
Python
Python (3.4.3)
py
Accepted
57
2940
281
#C問題 N, K = map(int, input().split()) D = list(map(str, input().split())) def check(n, d): n = str(n) for nstr in n: if nstr in d: return False return True 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,472
s472401025
p04045
u663230781
1557520407
Python
Python (3.4.3)
py
Accepted
41
3064
622
def get_greater_equals(number, target, exclude_digits): if number >= target: return number results = [] for i in range(10): if not i in exclude_digits: if i == 0 and number == 0: continue results.append( get_greater_equals(number * 10 +...
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,473
s701999413
p04045
u172386990
1557463440
Python
Python (3.4.3)
py
Accepted
29
3940
852
import itertools white_num_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] N, K = map(int, input().split()) black_num_list = list(map(int, input().split())) white_num_list = list(set(white_num_list).difference(set(black_num_list))) num_combination = list(itertools.product(white_num_list, repeat = len(str(N)))) num_list = [...
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,474
s566558142
p04045
u806855121
1557186644
Python
Python (3.4.3)
py
Accepted
53
3060
247
N, K = map(int, input().split()) D = set(map(str, input().split())) for i in range(N, 10*N+1): sn = str(i) flg = True for c in sn: if c 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,475
s070871522
p04045
u255943004
1557181080
Python
Python (3.4.3)
py
Accepted
50
3060
265
N,K = map(int,input().split()) D = set(map(str,input().split())) def check(n,d): n = str(n) for nstr in n: if nstr in d: return False return True while True: if check(N,D): print(N) break else: N = 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,476
s569810593
p04045
u315485238
1557176212
Python
Python (3.4.3)
py
Accepted
54
2940
178
N, K =list(map(int, input().split())) D = input().split() for n in range(N, 100000): s = str(n) for d in D: if d in s: break else: print(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,477
s479490943
p04045
u977193988
1557107588
Python
Python (3.4.3)
py
Accepted
92
5432
626
N,K=map(int,input().split()) D={int(i) for i in input().split()} C = {0,1,2,3,4,5,6,7,8,9} - D A=[] for i in range(9*N+1): if (N+i)%10 in C: if ((N+i)%100)//10 in C: if ((N+i)%1000)//100 in C: if ((N+i)%10000)//1000 in C: if (N+i)//10000 in 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,478
s709274763
p04045
u037430802
1557091452
Python
Python (3.4.3)
py
Accepted
71
5472
546
import sys N, K = map(int, input().split()) d = list(map(int, input().split())) d_set = set(d) num_set = set([1,2,3,4,5,6,7,8,9,0]) enable = num_set - d_set #print(type(enable)) #print(enable) def dfs(s): #print(s) global ans # すでにN以上の場合はこの先を探索しない if s != "": if int(s) >= N: #print(s) ans.a...
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,479
s227568968
p04045
u167751176
1557090364
Python
Python (3.4.3)
py
Accepted
19
3188
790
def main(): N, K = map(int, input().split()) D = list(map(int, input().split())) rec = 0 rec2 = 1 for d in D: if rec != d: break rec += 1 for d in D: if rec2 != d: break rec2 += 1 strN = str(N) carry = False ans = "" for i in range(len(strN)-1, -1, -1): cur = int(strN[i]) chanegd = False ...
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,480
s989745043
p04045
u335145501
1557022942
Python
Python (3.4.3)
py
Accepted
79
2940
282
def task_c(): """ https://atcoder.jp/contests/abc042/tasks/abc042_c """ n, k = map(int, input().split()) dd = input().split() while True: if any(d in dd for d in str(n)): n += 1 else: break print(n) task_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,481
s890693615
p04045
u131666536
1556990695
Python
Python (3.4.3)
py
Accepted
76
3316
268
# -*- coding: utf-8 -*- n, k = map(int, input().split()) nums = input().split() pay = n disLike = True while disLike: disLike = False for j in range(len(str(pay))): if str(pay)[j] in nums: disLike = True pay += 1 print(pay)
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,482
s461258680
p04045
u592248346
1556821772
Python
Python (3.4.3)
py
Accepted
88
2940
107
n,k = map(int,input().split()) ng = set(input().split()) while len(set(str(n))&ng): 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,483
s495978178
p04045
u017271745
1556739746
Python
Python (3.4.3)
py
Accepted
84
3060
272
N, K = map(int, input().split()) D = list(map(str, input().split())) for i in range(N, 100000): j = str(i) more = False for k in D: if j.count(k) > 0: more = True break if not more: 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,484
s039124101
p04045
u157887852
1556690323
Python
Python (3.4.3)
py
Accepted
70
2940
286
N, K = map(int, input().split()) l = input().split() result = N - 1 def hasNum(result, l): for num in l: if num in str(result): return False return True while True: result = result + 1 if hasNum(result, l): print(result) 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,485
s154966599
p04045
u589381719
1556593053
Python
Python (3.4.3)
py
Accepted
56
2940
237
N,_ = map(int,input().split()) lists=list(map(str,input().split())) for i in range(N,100000): flg=True for j in str(i): if j in lists: 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,486
s935205824
p04045
u442030035
1556516592
Python
Python (3.4.3)
py
Accepted
85
2940
182
N, K = map(int, input().split()) D = [i for i in input().split()] num = N while True: tmp = str(num) if all(i not in D for i in tmp): break num += 1 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,487
s145363833
p04045
u592248346
1556407598
Python
Python (3.4.3)
py
Accepted
85
2940
101
n,k = map(int,input().split()) ok = set(input().split()) while len(set(str(n))&ok): 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,488
s616461007
p04045
u641406334
1556164787
Python
Python (3.4.3)
py
Accepted
50
2940
155
N,K = map(int,input().split()) D = input().split() for i in range(N, 10*N+1): for j in str(i): if j in D: 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,489
s001745489
p04045
u619458041
1556163312
Python
Python (3.4.3)
py
Accepted
29
3700
673
import sys from itertools import product def main(): input = sys.stdin.readline N, K = map(str, input().split()) D = list(map(str, input().split())) nums = set([str(i) for i in range(10)]) safe = sorted(list(nums - set(D))) min_safe = safe[0] if min_safe == '0': min_safe = safe[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,490
s540435044
p04045
u609738635
1556130529
Python
Python (3.4.3)
py
Accepted
98
3064
478
# -*- coding: utf-8 -*- def solve(N, K, D): i = 0 while(True): test = N + i test_str = str(test) for j in range(K): index = -1 index = test_str.find(D[j]) if(index>=0): break if(index == -1): 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,491
s178086626
p04045
u969190727
1556072071
Python
Python (3.4.3)
py
Accepted
28
3572
413
import itertools n,k=map(int,input().split()) D=list(map(int,input().split())) N=set(i for i in range(10)) C=list(N-set(D)) ans=float("inf") for a in list(itertools.product(C,repeat=len(str(n)))): m=int("".join(map(str,a))) if m>=n: ans=min(ans,m) if ans==float("inf"): for a in list(itertools.product(C,repeat...
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,492
s918656672
p04045
u706695185
1556057566
Python
Python (3.4.3)
py
Accepted
18
3064
534
N,K=map(int, input().split()) D=list(map(int, input().split())) use=[] for i in range(10): if i not in D: use.append(i) ans = '' for n in list(map(int, list(str(N)))): if n > use[-1]: ans+=str(use[0]) else: for i in use: if i >= n: 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,493
s270348144
p04045
u428855582
1556017992
Python
Python (3.4.3)
py
Accepted
51
2940
161
N, K = map(int, input().split()) D=input().split() ans=N while True: for i in str(ans): if i in D: 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,494
s111881630
p04045
u428855582
1555985248
Python
Python (3.4.3)
py
Accepted
52
3060
161
N, K = map(int, input().split()) D=input().split() ans=N while True: for i in str(ans): if i in D: 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,495
s675461758
p04045
u428855582
1555985195
Python
Python (3.4.3)
py
Accepted
54
2940
313
N, K = map(int, input().split()) # 標準入力 D = map(int, input().split()) # 嫌いな数字のリスト D_str = list(map(str, D)) m = N while True: for n in str(m): if n in D_str: break else: # breakされなかったら実行される print(m) break m += 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,496
s008869271
p04045
u652081898
1555963661
Python
Python (3.4.3)
py
Accepted
53
2940
191
n, k = map(int, input().split()) d = input().split() ans = n while True: for i in str(ans): if i in d: 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,497
s635906829
p04045
u956571637
1555946401
Python
Python (3.4.3)
py
Accepted
53
3060
312
N, K = map(int, input().split()) # 標準入力 D = map(int, input().split()) # 嫌いな数字のリスト D_str = list(map(str, D)) m = N while True: for n in str(m): if n in D_str: break else: # breakされなかったら実行される print(m) break m += 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,498
s603219868
p04045
u885899351
1555446567
Python
Python (3.4.3)
py
Accepted
18
3064
522
import bisect n,k=map(int,input().split()) l=list(map(int,input().split())) nl=list(range(10)) for i in l:nl.remove(i) ch=int(str(nl[-1])*len(str(n)))<n if ch and nl[0]==0: print(int(str(nl[1])+"0"*(len(str(n))))) elif ch: print(int(str(nl[0])*(len(str(n))+1))) else: ans="" for i in range(len(str(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,499
s241196464
p04045
u136413513
1555192749
Python
Python (3.4.3)
py
Accepted
62
3060
287
n, _ = map(int, input().split(' ')) no_likes = list(map(int, input().split(' '))) numbers = sorted([i for i in range(10) if i not in no_likes]) for i in range(n, 100000): for b in str(i): if int(b) not in numbers: 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,500
s773343783
p04045
u619819312
1554836939
Python
Python (3.4.3)
py
Accepted
93
3188
261
n,k=map(int,input().split()) d=list(map(int,input().split())) j=[(True if i in d else False)for i in range(10)] for i in range(n,10**6): s=str(i) for h in range(len(s)): if j[int(s[h])]: break else: print(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,501
s089563773
p04045
u063052907
1554776014
Python
Python (3.4.3)
py
Accepted
50
3060
185
N, K = map(int, input().split()) list_D = input().split() while True: for c in str(N): if c in list_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,502
s124301987
p04045
u319818856
1554765565
Python
Python (3.4.3)
py
Accepted
18
3064
1,852
def irohas_obsession(N: int, K: int, D: list) -> int: # D に含まれない最小の値 min_not_d = min(d for d in range(10) if d not in D) min_not_d_and_not_zero = min(d for d in range(10) if d not in D and d != 0) # 数字を各桁に分解する。 nums = [] while N > 0: nums = [N % 10] + nums N //= 10 # 上位の桁から...
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,503
s998360720
p04045
u707498674
1554743254
Python
Python (3.4.3)
py
Accepted
73
6140
542
import sys sys.setrecursionlimit(1000000) N, K = map(int, input().split()) D = input().split() decimal = set(["0","1", "2", "3", "4", "5", "6", "7", "8", "9"]) - set(D) candidate = [] def dfs(s): if len(s) == 0: sub_d = decimal - set("0") for d in sub_d: dfs(s + d) elif len(s) <...
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,504
s435462817
p04045
u706695185
1554519722
Python
Python (3.4.3)
py
Accepted
17
3064
1,035
N, K = map(int, input().split()) D = list(map(int, input().split())) can_use = [] for i in range(10): if i not in D: can_use.append(i) ans = [] t = 0 for i, dig in enumerate(list(str(N))): m = 10 for cu in can_use: sa = cu - int(dig) if sa <= m and sa >= 0: m = sa ...
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,505
s118033173
p04045
u013408661
1554510120
Python
Python (3.4.3)
py
Accepted
79
2940
203
n,k=map(int,input().split()) d=list(map(int,input().split())) for i in range(n,10**6): flag=True for j in str(i): if int(j) in d: flag=False break if flag: 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,506
s273832684
p04045
u279493135
1554226667
Python
Python (3.4.3)
py
Accepted
71
3064
326
from sys import stdin input = stdin.readline N, K = [int(x) for x in input().rstrip().split()] D = [int(x) for x in input().rstrip().split()] ok = [x for x in range(10) if x not in D] tmp = N while 1: for y in str(tmp): if int(y) in ok: pass else: break else: # すべて使用可能 print(tmp) break tmp += 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,507
s646603437
p04045
u227082700
1554077624
Python
Python (3.4.3)
py
Accepted
56
2940
158
n,k=map(int,input().split());d=input().split() def judge(): global d,n for i in str(n): if i in d:return print(n) exit() while 1: judge() 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,508
s243108771
p04045
u603745966
1554072406
Python
Python (3.4.3)
py
Accepted
81
3572
848
from functools import reduce def main(): # 一文字のみを読み込み # s = input().rstrip().split(' ') # スペース区切りで標準入力を配列として読み込み # s = input().rstrip().split(' ') # 位置文字ずつ標準入力を配列として読み込み # s = list(input().rstrip()) slist = input().rstrip().split(' ') N = int(slist[0]) K = int(slist[1]) D ...
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,509
s857688320
p04045
u305965165
1553896327
Python
Python (3.4.3)
py
Accepted
60
2940
237
n, k = (int(i) for i in input().split()) d = [i for i in input().split()] for i in range(n,n*100): flg=True for j in str(i): if j 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,510
s189807609
p04045
u614314290
1553657760
Python
Python (3.4.3)
py
Accepted
91
2940
137
N, K = map(int, input().split()) D = input().split() for n in range(N, 100000): if all(d not in str(n) for d in D): print(n) 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,511
s399456607
p04045
u795630164
1553641740
Python
Python (3.4.3)
py
Accepted
55
2940
252
N, K = map(int, input().split()) D = [str(i) for i in input().split()] search = True while search: for i in str(N): if not i in D: search = False continue N += 1 search = True 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,512
s290803596
p04045
u179719532
1553390449
Python
Python (3.4.3)
py
Accepted
66
2940
311
# coding: UTF-8 N, _ = input().split() N = int(N) dislike_nums = input().split() def contains_dislike_number(num): for n in dislike_nums: if n in str(i): return True return False for i in range(N, 10*N+1): if not contains_dislike_number(i): 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,513
s937489161
p04045
u282228874
1553364545
Python
Python (3.4.3)
py
Accepted
84
2940
90
n,k = map(int,input().split()) d = set(input()) while len(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,514
s669995053
p04045
u661707952
1553289962
Python
Python (3.4.3)
py
Accepted
57
2940
292
#!/usr/bin/env python3.4 # -*- coding: utf-8 -*- # arc058_a # input N, K = map(int, input().split()) D = input().split() # getans def is_in_d(s): for d in D: if d in s: return True return False for i in range(100000): ans = str(N+i) if not is_in_d(ans): break # output 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,515
s274464992
p04045
u465422274
1553206775
Python
Python (3.4.3)
py
Accepted
95
2940
237
n , a = map(int, input().split()) X = list(map(int, input().split())) def detecter(n): A = list(str(n)) for i in A: if(int(i) in X): return False return True while(not(detecter(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,516