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
s661532363
p04045
u968166680
1594891574
Python
Python (3.8.2)
py
Accepted
52
9112
558
import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines sys.setrecursionlimit(10 ** 9) INF = 1 << 60 MOD = 1000000007 def main(): N, K, *D = map(int, read().split()) ng = [False] * 10 for d in D: ng[d] = True for n in range(N, 10 ** 5): n = str...
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,215,917
s915807817
p04045
u968166680
1594891391
Python
PyPy3 (7.3.0)
py
Accepted
73
73504
558
import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines sys.setrecursionlimit(10 ** 9) INF = 1 << 60 MOD = 1000000007 def main(): N, K, *D = map(int, read().split()) ng = [False] * 10 for d in D: ng[d] = True for n in range(N, 10 ** 5): n = str...
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,215,918
s535418278
p04045
u543373102
1594870678
Python
Python (3.8.2)
py
Accepted
98
9172
149
N , K = map(int, input().split()) Dk = input().split() for i in range(N,10*N+1): if set(str(i))&set(Dk) == set(): 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,215,919
s059857809
p04045
u759412327
1594867221
Python
Python (3.8.2)
py
Accepted
74
9152
99
N,K = map(int,input().split()) D = set(input().split()) 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,215,920
s400317375
p04045
u759412327
1594867160
Python
Python (3.8.2)
py
Accepted
77
9152
133
N,K = map(int,input().split()) D = set(input().split()) for n in range(N,100000): if len(set(str(n))&D)==0: 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,215,921
s843669443
p04045
u747703115
1594823531
Python
Python (3.8.2)
py
Accepted
78
9052
152
n, k = map(int, input().split()) D = set(list(input().split())) for i in range(n, n*10+1): if set(str(i))&D == set(): 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,215,922
s704323956
p04045
u711539583
1594780157
Python
Python (3.8.2)
py
Accepted
49
9156
198
n, k = map(int, input().split()) a = list(map(str, input().split())) a = set(a) while True: f = 1 for c in str(n): if c in a: f = 0 break if f: 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,215,923
s797800764
p04045
u323045245
1594694197
Python
Python (3.8.2)
py
Accepted
58
9164
199
n,k = map(int, input().split()) d = list(map(int,input().split())) for i in range(n,10**5+1): for j in str(i): if int(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,215,924
s403723476
p04045
u587589241
1594589890
Python
PyPy3 (7.3.0)
py
Accepted
92
73112
251
n,k=map(int,input().split()) d=list(map(str,input().split())) flg=False while True: nn=str(n) flg=True for i in range(len(nn)): if nn[i] in d: flg=False if flg: 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,215,925
s165985532
p04045
u188827677
1594569412
Python
Python (3.8.2)
py
Accepted
34
8964
337
from itertools import product n,k = map(int, input().split()) d = list(map(int, input().split())) nums = [] for i in range(10): if i not in d: nums.append(i) m = str(n) for i in range(len(m), len(m)+2): for j in product(nums, repeat=i): ans = "" for k in j: ans += str(k) if int(ans) >= n: print(...
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,215,926
s457076196
p04045
u594803920
1594530472
Python
Python (3.8.2)
py
Accepted
80
9408
314
from collections import defaultdict dd = defaultdict(lambda:0) n, k = map(int, input().split()) li = list(map(str, input().split())) for i in li: dd[i] = 1 while True: n = str(n) b = True for i in n: if dd[i]==1: b = False break n = int(n) if b: print(n) break exit() n+=1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,927
s922497505
p04045
u266014018
1594453687
Python
Python (3.8.2)
py
Accepted
80
9168
411
def main(): import sys def input(): return sys.stdin.readline().rstrip() n, k = map(int, input().split()) d = list(map(int, input().split())) s = [i for i in range(10) if i not in d] for i in range(n, 10*n+1): for j in map(int, list(str(i))): if j in d: 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,215,928
s545172085
p04045
u586639900
1594452060
Python
Python (3.8.2)
py
Accepted
81
9092
253
import sys N, K = map(int, input().split()) D = set(map(int, input().split())) def check(n): m = set(str(n)) for c in m: if int(c) in D: return False return True for i in range(999999): if check(N+i): print(N+i) sys.exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,929
s607853108
p04045
u767797498
1594368249
Python
Python (3.8.2)
py
Accepted
74
9128
1,180
# -*- coding: utf-8 -*- import io import sys import math def format_multi_line_answer(lst): ans = "" ans += f"{len(lst)}\n" # Line count for y in lst: ans += f"{y}\n" return ans def solve(n,k_set): # implement process for i in range(n, sys.maxsize): s = set(str(i)) # ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,930
s724208863
p04045
u163783894
1594357270
Python
Python (3.8.2)
py
Accepted
98
9184
547
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline in_n = lambda: int(readline()) in_nn = lambda: map(int, readline().split()) in_nl = lambda: list(map(int, readline().split())) in_na = lambda: map(int, read().split()) in_s = lambda: readline().rstrip().decode('utf-8') def main(): N, K...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,931
s649309223
p04045
u625046108
1594353021
Python
PyPy3 (7.3.0)
py
Accepted
63
73200
204
N, K = map(int, input().split()) Ds = set(input().split()) i = N while 1: S = str(i) flag = 1 for s in S: if s in Ds: flag = 0 break if flag == 1: print(i) exit() i += 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,215,932
s844519146
p04045
u359573942
1594352315
Python
Python (3.8.2)
py
Accepted
47
9096
172
n,_=map(int,input().split()) m=set(input().split()) while True: for i in str(n): if i in m: n+=1 break else: break print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,933
s307175024
p04045
u081149041
1594257399
Python
Python (3.8.2)
py
Accepted
44
9100
320
def has_no(s, digits): for ch in s: if ch in digits: return False return True def digit(): N, K = [int(n) for n in input().split()] digits = input().split() for i in range(N, N*10): s = str(i) if has_no(s, digits): print(s) break digit()
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,215,934
s879855431
p04045
u252160635
1594256841
Python
Python (3.8.2)
py
Accepted
100
9076
292
# 入力 N,K = list(map(int, input().split())) D = list(map(int, input().split())) availbale_numbers = [0,1,2,3,4,5,6,7,8,9] for i in D: availbale_numbers.remove(i) for i in range(N,99999): if(set(str(i)) <= set([str(a) for a in availbale_numbers])): 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,215,935
s192457038
p04045
u252160635
1594178598
Python
Python (3.8.2)
py
Accepted
37
9236
1,284
# 入力 N,K = list(map(int, input().split())) D = list(map(int, input().split())) availbale_numbers = [0,1,2,3,4,5,6,7,8,9] for i in D: availbale_numbers.remove(i) for item1 in availbale_numbers: if(N <= int(('').join([str(item1)]))): print(('').join([str(item1)])) exit() for item1 in availba...
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,215,936
s541365566
p04045
u786020649
1594177461
Python
Python (3.8.2)
py
Accepted
27
9192
991
n,k=map(int,input().split()) hate_list=list(map(int,input().split())) p_list=[] ok_list=[] hate_list.append(10) s=0 for x in hate_list: while x>s: ok_list.append(s) s+=1 s+=1 ok_list.append(10) # print(ok_list) # nの桁をリスト化 ndgts=[] while n>0: ndgts.append(n%10) n//=10 flag=0 #necess...
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,215,937
s276032799
p04045
u474561976
1594161156
Python
Python (3.8.2)
py
Accepted
78
9180
482
import io,sys sys.setrecursionlimit(10**6) def main(): n,k = map(int,input().split()) D = list(map(int,input().split())) while True: temp = n num = [] while temp > 0: num.append(temp%10) temp//=10 flag = True for i in 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,215,938
s303263296
p04045
u551857719
1594074474
Python
Python (3.8.2)
py
Accepted
70
9108
393
#!/usr/bin/python # -*- coding: UTF-8 -*- import sys def input(): return sys.stdin.readline().strip() def _main(): n, k = input().split() x = set(input()) n_s = set(n) n_i = int(n) while True: if x & n_s: n_i += 1 n_s = set(str(n_i)) 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,215,939
s669028794
p04045
u007381711
1594070542
Python
Python (3.8.2)
py
Accepted
64
13928
772
# -*- coding: utf-8 -*- import sys,math,itertools input = sys.stdin.readline n, k = map(int, input().split()) d = [int(_) for _ in input().split()] d_set = set(d) d_all = set(range(10)) d_use = [str(a) for a in list(d_all - d_set)] keta = int(math.log10(n))+1 # l1 = [int(''.join(list(a))) if int(''.join(list(a)))>=n el...
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,215,940
s835835399
p04045
u007381711
1594070372
Python
Python (3.8.2)
py
Accepted
77
16476
535
# -*- coding: utf-8 -*- import sys,math,itertools input = sys.stdin.readline n, k = map(int, input().split()) d = [int(_) for _ in input().split()] d_set = set(d) d_all = set(range(10)) d_use = [str(a) for a in list(d_all - d_set)] keta = int(math.log10(n))+1 l1 = [int(''.join(list(a))) if int(''.join(list(a)))>=n 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,215,941
s909775373
p04045
u361381049
1593906504
Python
PyPy3 (7.3.0)
py
Accepted
96
73364
245
N,K = map(int,input().split()) D = list(map(int,input().split())) while True: flg = True lis = list(str(N)) for i in lis: if int(i) in D: flg = False if flg == True: print(N) exit() N += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,942
s802599503
p04045
u557750361
1593828945
Python
PyPy3 (7.3.0)
py
Accepted
74
73404
410
import sys n, k = map(int, input().split()) d = list(map(int, input().split())) nums = [i for i in range(10)] canuse = [] for i in nums: if i not in d: canuse.append(i) for i in range(n,n*10): x = 0 for j in str(i): if int(j) not in canuse: break else: 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,215,943
s113330058
p04045
u479835943
1593826728
Python
PyPy3 (7.3.0)
py
Accepted
79
73696
263
n, k = [int(i) for i in input().split()] d = [int(i) for i in input().split()] ans = n f = False while True: for dd in d: if str(dd) in str(ans): f = True break if not f: break f = False 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,215,944
s236892707
p04045
u858645668
1593748037
Python
Python (3.8.2)
py
Accepted
57
16228
213
def check(s,l): for i in s: if i in l: return False return True n,k = map(int,input().split()) l = "".join(input().split()) for s in [str(i) for i in range(n,100000)]: if check(s,l): 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,215,945
s582890218
p04045
u061361273
1593726122
Python
Python (3.8.2)
py
Accepted
56
16012
337
def has_no2(s, digits): for ch in s: if ch in digits: return False return True def main2(): N, K = [int(x) for x in input().split()] digits = ''.join(input().split()) for s in [str(i) for i in range(N, 100000)]: if has_no2(s, digits): print(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,215,946
s015295283
p04045
u061361273
1593725797
Python
Python (3.8.2)
py
Accepted
54
16012
348
def has_no(s, digits): for ch in s: if digits.get(ch): return False return True def main(): N, K = [int(x) for x in input().split()] digits = {str(x): True for x in input().split()} for s in [str(i) for i in range(N, 100000)]: if has_no(s, digits): print(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,215,947
s518440433
p04045
u339199690
1593695022
Python
Python (3.8.2)
py
Accepted
95
9108
228
import sys N, K = map(int, input().split()) D = list(map(int, sys.stdin.readline().rsplit())) for i in range(N, 100000): for d in D: if str(d) in str(i): break else: print(i) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,948
s591501199
p04045
u917558625
1593664960
Python
Python (3.8.2)
py
Accepted
79
9188
268
N,K=map(int,input().split()) D=list(map(int,input().split())) dp=[0]*10 for i in range(K): dp[D[i]]=1 for i in range(N,10**6+1): a=str(i) flag=True for j in range(len(a)): if dp[int(a[j])]==1: 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,215,949
s992723961
p04045
u043048943
1593603207
Python
PyPy3 (7.3.0)
py
Accepted
70
68284
357
def main(): from collections import deque N,K = map(int,input().split()) D = list(set(range(10)) - set(map(int,input().split()))) D.sort() targets = deque(D) while True: t = targets.popleft() if N <= t: print(t) return t *= 10 for d 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,215,950
s873974865
p04045
u819135704
1593532652
Python
Python (3.8.2)
py
Accepted
65
9160
186
N, K = map(int, input().split()) D = list(input().split()) for i in range(N, 100000): for j in D: if j in str(i): break else: print(i) 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,215,951
s398327507
p04045
u393881437
1593500946
Python
Python (3.8.2)
py
Accepted
65
9076
191
n, k = list(map(int, input().split())) d = list(input().split()) for i in range(n, 100000): for j in d: if j in str(i): break else: print(i) 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,215,952
s732051246
p04045
u131881594
1593481554
Python
Python (3.8.2)
py
Accepted
43
9104
249
n,k=map(int,input().split()) d=set(map(int,input().split())) i=n while True: temp=i flag=1 while temp>0: if temp%10 in d: flag=0 break temp//=10 if flag: print(i) break i+=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,215,953
s506150983
p04045
u913973350
1593457785
Python
Python (3.8.2)
py
Accepted
75
9068
243
n,k = map(int,input().split()) t = list(map(int,input().split())) for j in range(n,100000): h = str(j) u=0 for s in h: if int(s) in t: u+=1 break if u==0: print(h) 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,215,954
s606087754
p04045
u867848444
1593454900
Python
Python (3.8.2)
py
Accepted
63
9136
186
n, k = map(int,input().split()) d = set(map(int,input().split())) for i in range(n, 100000): for j in str(i): if int(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,215,955
s154609401
p04045
u831294922
1593443021
Python
Python (3.8.2)
py
Accepted
45
9828
370
import collections import heapq import math import random import sys input = sys.stdin.readline n, k = map(int, input().split()) d = list(map(int, input().split())) d = set(d) while True: found = True cur = n while cur: if cur % 10 in d: found = False break cur //= 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,215,956
s401891910
p04045
u279005807
1593388405
Python
Python (3.8.2)
py
Accepted
28
9244
623
n, k = (input().split()) n = list(map(int, n)); dSet = set(map(int, input().split())) okList = [i for i in range(10) if i not in dSet] i = len(n) while i >= 0: i -= 1 if n[i] in okList: continue for y in okList: if n[i] < y: n[i] = y j = i+1 while j < len(...
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,215,957
s284241593
p04045
u261103969
1593370162
Python
PyPy3 (7.3.0)
py
Accepted
76
76556
537
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): from collections import deque n, k = map(int, readline().split()) d = list(map(int, readline().split())) e = [str(i) for i in range(10) if i not in d] que = deque([i for i in...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,958
s753328463
p04045
u896004073
1593311767
Python
Python (3.8.2)
py
Accepted
24
9132
919
N, K = input().split() dislike = set(list(map(int, input().split()))) next_map = {} min_digit = 0 for i in range(10): for j in range(i,10): if j not in dislike: if i == 0: min_digit = j next_map.update({ i : j }) break next_map.update({ i : min_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,215,959
s856364912
p04045
u699522269
1593309229
Python
Python (3.8.2)
py
Accepted
90
9184
256
a = input().split() tg = a[0] ok_nums = set(["1","2","3","4","5","6","7","8","9","0"]) ng_nums = set(input().split()) ok_nums = ok_nums - ng_nums rt = 0 i = int(tg) while True: if ok_nums >= set(d for d in str(i)): print(i) break else: i+=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,215,960
s370050116
p04045
u699522269
1593309055
Python
Python (3.8.2)
py
Accepted
85
9172
254
a = input().split() tg = a[0] ok_nums = set(str(i) for i in range(10)) ng_nums = set(i for i in input().split()) ok_nums = ok_nums - ng_nums rt = 0 i = int(tg) while True: if ok_nums >= set(d for d in str(i)): print(i) break else: i+=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,215,961
s354049996
p04045
u699522269
1593307990
Python
Python (3.8.2)
py
Accepted
88
9184
270
a = input().split() tg = a[0] ok_nums = set(str(i) for i in range(10)) ng_nums = set(i for i in input().split()) ok_nums = ok_nums - ng_nums rt = 0 i = int(tg) intg = int(tg) while intg > rt: if ok_nums >= set(d for d in str(i)): rt = i else: i+=1 print(rt)
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,215,962
s377508501
p04045
u699522269
1593307895
Python
Python (3.8.2)
py
Accepted
95
9052
270
a = input().split() tg = a[0] ok_nums = set(str(i) for i in range(10)) ng_nums = set(i for i in input().split()) ok_nums = ok_nums - ng_nums rt = 0 i = int(tg) intg = int(tg) while intg > rt: if ok_nums >= set(d for d in str(i)): rt = i else: i+=1 print(rt)
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,215,963
s126365594
p04045
u017050982
1593304894
Python
PyPy3 (7.3.0)
py
Accepted
84
67664
344
D = [i for i in range(10)] N,K = map(int,input().rstrip().split(" ")) A = list(map(int,input().rstrip().split(" "))) flag = True for i in range(N,10 ** 6 + 1): flag = True for i2 in range(6): if i >= 10 ** i2 and (i // (10 ** i2)) % 10 in A: flag = False break if flag: ...
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,215,964
s809860664
p04045
u073549161
1593274663
Python
PyPy3 (7.3.0)
py
Accepted
78
73076
239
n, k = map(int, input().split()) dat = list(map(str,input().split())) for i in range(n, 1000001): s = str(i) did = True for j in range(len(s)): if s[j] in dat: did = False if did: 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,215,965
s334469638
p04045
u697615293
1593074814
Python
Python (3.8.2)
py
Accepted
68
9160
177
n,k=map(int,input().split()) s=set(input().split()) while True: l=list(str(n)) for i in l: if i in s: break else: break n+=1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,966
s532052674
p04045
u014333473
1592968542
Python
Python (3.8.2)
py
Accepted
68
8988
133
N,K=map(int,input().split()) D = set(input().split()) while True: if not set(str(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,215,967
s107800552
p04045
u345710188
1592967693
Python
Python (3.8.2)
py
Accepted
96
9080
199
N, K = map(int, input().split()) D = [str(i) for i in input().split()] answer = 0 while True: if not set(str(N)) & set(D): answer = N break else: N += 1 print(answer)
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,215,968
s993724080
p04045
u820195841
1592939945
Python
Python (3.8.2)
py
Accepted
37
9668
737
N, K = map(int, input().split()) P = list(map(int, input().split())) numbers = [0,1,2,3,4,5,6,7,8,9] use = [] for i in numbers: if not i in P: use.append(i) ul = [] if 0 in use: for u5 in [0,use[1]]: for u4 in use: for u3 in use: for u2 in use: for u1 in use: ul.append(u...
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,215,969
s898694942
p04045
u867408000
1592938425
Python
Python (3.8.2)
py
Accepted
53
9068
184
N, K = map(int,input().split()) d = list(input().split()) for n in range(N, N*10): for s in str(n): if s in d: 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,215,970
s567278667
p04045
u974792613
1592917629
Python
PyPy3 (7.3.0)
py
Accepted
68
67820
250
n, k = map(int, input().split()) d = list(input().split()) while True: s_n = str(n) for num in d: flag = True if num in s_n: flag = False break if flag is True: 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,215,971
s045645659
p04045
u888092736
1592880901
Python
Python (3.8.2)
py
Accepted
91
9132
197
N, K = map(int, input().split()) D = {i for i in range(10)} - set(map(int, input().split())) for i in range(N, 100000): if all(j in D for j in map(int, str(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,215,972
s344991990
p04045
u793430793
1592847531
Python
Python (3.8.2)
py
Accepted
96
9120
270
# ABC042C N,K=map(int,input().split()) out=N N=str(N) a = list(map(int, input().split())) while 1<2: N1=N i=0 for i in range(len(a)): if str(a[i]) in N: N=int(N) N+=1 N=str(N) if N1==N: 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,215,973
s639842836
p04045
u790012205
1592739214
Python
Python (3.8.2)
py
Accepted
74
9016
267
import sys N, K = map(int, input().split()) d = list(map(str, input().split())) D = set(d) for i in range(N, 1000000): S = set(str(i)) T = True for s in S: if s in D: T = False break if T: 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,215,974
s329888294
p04045
u188827677
1592667372
Python
Python (3.8.2)
py
Accepted
36
9180
355
from itertools import product n,k = map(int, input().split()) d = list(map(int, input().split())) nums = [] for i in range(10): if i not in d: nums.append(i) for i in range(len(str(n)), 6): for j in product(nums, repeat=i): t = "" if j[0] != 0: for k in j: t += str(k) if int(t) >= 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,215,975
s175005079
p04045
u131411061
1592657824
Python
Python (3.8.2)
py
Accepted
71
9116
205
N,K = map(int,input().split()) D = input().split() for i in range(N,10*N): tmp = list(str(i)) for j in tmp: if j in D: break else: print(''.join(tmp)) 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,215,976
s703217076
p04045
u875769753
1592572967
Python
Python (3.8.2)
py
Accepted
80
9028
224
N , L = map(int,input().split()) nols = list(map(str,input().split())) for i in range(10*N): pri = N + i pri = str(pri) if any(x in pri for x in nols): continue else: print(pri) 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,215,977
s431352444
p04045
u372102441
1592444403
Python
Python (3.4.3)
py
Accepted
24
3692
689
import sys input = sys.stdin.readline #n = int(input()) #l = list(map(int, input().split())) ''' a=[] b=[] for i in range(): A, B = map(int, input().split()) a.append(A) b.append(B)''' a=list(map(str, [0,1,2,3,4,5,6,7,8,9])) n,k=map(int, input().split()) d=list(map(str, input().split())) for item 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,215,978
s584768700
p04045
u372102441
1592442646
Python
Python (3.4.3)
py
Accepted
25
3692
707
import sys input = sys.stdin.readline #n = int(input()) #l = list(map(int, input().split())) ''' a=[] b=[] for i in range(): A, B = map(int, input().split()) a.append(A) b.append(B)''' a=list(map(str, [0,1,2,3,4,5,6,7,8,9])) n,k=map(int, input().split()) d=list(map(str, input().split())) for item 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,215,979
s087743975
p04045
u922487073
1592279362
Python
Python (3.4.3)
py
Accepted
19
3192
1,197
N,K = map(int, input().split()) D_list = set(list(map(int, input().split()))) bn = sorted(list((set([0,1,2,3,4,5,6,7,8,9]) - D_list))) res = 0 for v4 in bn: money = v4 if money >= N: print(money) exit() for i3 in bn: v3 = i3 * 10 for v4 in bn: money = v3+v4 if money >= ...
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,215,980
s594959190
p04045
u371686382
1592170185
Python
Python (3.4.3)
py
Accepted
87
2940
181
N, K = list(map(int, input().split())) D = set(map(str, input().split())) ans = N while True: ans_set = set(str(ans)) if ans_set & D: ans += 1 else: break print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,981
s460206341
p04045
u434966508
1592113408
Python
Python (3.4.3)
py
Accepted
65
2940
294
amount, num = map(int, input().split()) hated_digit = list(map(str, input().split())) while True: check = 0 for hd in hated_digit: if hd not in str(amount): check += 1 else: amount += 1 if check == num: print(amount) 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,215,982
s247495655
p04045
u951289777
1592089782
Python
Python (3.4.3)
py
Accepted
63
2940
294
amount, num = map(int, input().split()) hated_digit = list(map(str, input().split())) while True: check = 0 for hd in hated_digit: if hd not in str(amount): check += 1 else: amount += 1 if check == num: print(amount) 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,215,983
s146233221
p04045
u697658632
1592027779
Python
Python (3.4.3)
py
Accepted
97
2940
178
n, k = map(int, input().split()) d = list(map(int, input().split())) for i in range(n, 100000): for j in d: if str(j) in str(i): 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,215,984
s965074556
p04045
u939026953
1592012489
Python
Python (3.4.3)
py
Accepted
56
3060
185
n,k=map(int,input().split()) D = list(map(str,input().split())) x = n while True: y = str(x) for i in y: if i in D: break else: ans = x break x += 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,215,985
s496548696
p04045
u134019875
1591955165
Python
Python (3.4.3)
py
Accepted
78
2940
225
n, k = map(int, input().split()) d = list(map(str, input().split())) for i in range(n, 10**5): num = str(i) for j in range(len(num)): if num[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,215,986
s411048812
p04045
u860002137
1591935753
Python
Python (3.4.3)
py
Accepted
82
3060
242
n, _ = map(int, input().split()) arr = list(map(str, input().split())) can_use = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} can_use -= set(arr) price = set(str(n)) while price - can_use: 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,215,987
s403191835
p04045
u939026953
1591925819
Python
Python (3.4.3)
py
Accepted
83
3060
200
n,k=map(int,input().split()) D = list(map(str,input().split())) x = n while True: y = str(x) for i in range(len(y)): if y[i] in D: break else: ans = x break x += 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,215,988
s409883657
p04045
u145145077
1591708826
Python
Python (3.4.3)
py
Accepted
37
5400
324
n,k=map(int,input().split()) d=list(map(int,input().split())) suki =list({0,1,2,3,4,5,6,7,8,9} - set(d)) suki.sort() result=[] pay=0 def dfs(pos, pay): if pay >= n: result.append(pay) return result elif pos >= 5: return '99999' for i in suki: dfs(pos+1, pay*10+i) dfs(0, 0) print(min(result...
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,215,989
s749323477
p04045
u775681539
1591384318
Python
Python (3.4.3)
py
Accepted
23
3820
735
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines from collections import deque def main(): n, k = map(int, readline().split()) d = {int(i) for i in readline().split()} dq = deque() cnd = [] for i in range(10): if i 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,215,990
s936422904
p04045
u373047809
1591383122
Python
Python (3.4.3)
py
Accepted
82
2940
74
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,215,991
s618316776
p04045
u373047809
1591383057
Python
Python (3.4.3)
py
Accepted
99
2940
103
n,_,*d=open(0).read().split() n=int(n) while 1: if all(d not in str(n)for d in d):exit(print(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,215,992
s520972767
p04045
u373047809
1591383000
Python
Python (3.4.3)
py
Accepted
80
2940
99
n,_,*d=open(0).read().split() n,d=int(n),set(d) while 1: if not d&set(str(n)):exit(print(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,215,993
s223695575
p04045
u373047809
1591382948
Python
Python (3.4.3)
py
Accepted
84
2940
103
n,k=input().split() n=int(n) d=set(input().split()) while 1: if not d&set(str(n)):exit(print(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,215,994
s076676305
p04045
u373047809
1591382869
Python
Python (3.4.3)
py
Accepted
80
2940
121
n, k, *d = open(0).read().split() n, d = int(n), set(d) while True: if not d & set(str(n)): exit(print(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,215,995
s265472300
p04045
u496821919
1591374884
Python
Python (3.4.3)
py
Accepted
51
3060
189
n,k = map(int,input().split()) D = list(map(str,input().split())) for i in range(n,10**7): for j in str(i): if 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,215,996
s268825705
p04045
u496821919
1591374842
Python
Python (3.4.3)
py
Accepted
44
3060
188
n,k = map(int,input().split()) D = set(map(str,input().split())) for i in range(n,10**7): for j in str(i): if 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,215,997
s418437934
p04045
u974935538
1591360129
Python
Python (3.4.3)
py
Accepted
86
2940
162
N, K = map(int, input().split()) D = set(input().split()) tmp = set(['0','1','2','3','4','5','6','7','8','9']) while len(D&set(str(N))) != 0: 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,215,998
s898813146
p04045
u493520238
1591323022
Python
Python (3.4.3)
py
Accepted
54
3060
255
N, K = map(int, input().split()) dl = list(map(str, input().split())) curr_num = N while True: n_str = str(curr_num) for d in dl: if d in n_str: curr_num += 1 break else: print(curr_num) 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,215,999
s242661368
p04045
u405660020
1591239049
Python
Python (3.4.3)
py
Accepted
91
3188
227
n,k=map(int, input().split()) d=set(input().split()) candidate_num=set(['0','1','2','3','4','5','6','7','8','9'])-d while True: if set(list(str(n)))<=candidate_num: 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,000
s690488901
p04045
u146597538
1591236718
Python
Python (3.4.3)
py
Accepted
88
3064
161
N, K = map(int, input().split()) D = set(input().split()) tmp = set(['0','1','2','3','4','5','6','7','8','9']) while len(D&set(str(N))) != 0: 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,001
s112490926
p04045
u579508806
1591212138
Python
Python (3.4.3)
py
Accepted
41
3064
448
def ret_num(num, val): for i in num: if i > val: return i def check(num, val): while val > 0: if val % 10 not in num: return False val//=10 return True all_num=[0,1,2,3,4,5,6,7,8,9] (val, dis)=[int(x) for x in input().split()] dis_num=[int(x) for x in input().split()] num=[] for i in...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,002
s052144905
p04045
u029000441
1591147974
Python
Python (3.4.3)
py
Accepted
38
3316
1,446
import sys input = sys.stdin.readline sys.setrecursionlimit(10**7) from collections import Counter, deque from collections import defaultdict from itertools import combinations, permutations, accumulate, groupby, product from bisect import bisect_left,bisect_right from heapq import heapify, heappop, heappush from math ...
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,003
s554647540
p04045
u503111914
1591064970
Python
Python (3.4.3)
py
Accepted
98
2940
239
N,K = map(int,input().split()) D = list(input().split()) for i in range(N,10*N+1): ans = True for j in D: if str(i).count(j) > 0: ans = False break if ans == True: 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,004
s053126409
p04045
u581142892
1591056973
Python
Python (3.4.3)
py
Accepted
18
3192
2,173
class A: def solve(self): [a, b, c] = sorted([int(x) for x in input().split(" ")]) if a == 5 and b == 5 and c == 7: print("YES") else: print("NO") class B: def solve(self): [n, l] = [int(x) for x in input().split(" ")] strings = [] for ...
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,005
s375629707
p04045
u442877951
1591054591
Python
Python (3.4.3)
py
Accepted
21
3064
446
from itertools import * N,K = map(int,input().split()) D = list(map(int,input().split())) num = [] for i in range(10): if i not in D: num.append(str(i)) ans = 10**18 for i in product(num,repeat=len(str(N))): money = int(''.join(list(i))) if N <= money : ans = min(ans,money) if ans == 10**18: for i in ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,006
s976378148
p04045
u922449550
1591049500
Python
Python (3.4.3)
py
Accepted
19
3188
291
N, K = map(int, input().split()) D = list(map(int, input().split())) available = [i for i in range(10) if i not in D] values = [0] idx = 0 while True: base = values[idx] * 10 for a in available: n = base + a if n >= N: print(n) quit() values.append(n) idx += 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,007
s947163039
p04045
u215630013
1591045197
Python
Python (3.4.3)
py
Accepted
58
3064
317
from itertools import product n, k = input().split() a = list(input().split()) l = set([str(i) for i in range(10)]).difference(a) ni = int(n) ans = int('99'+n) for j in range(len(n), len(n)+2): for i in product(l, repeat=j): t = int(''.join(i)) if t >= ni: ans = min(t, ans) 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,008
s936786148
p04045
u759412327
1591027926
Python
Python (3.4.3)
py
Accepted
86
2940
101
N,K = map(int,input().split()) D = set(input().split()) while len(set(str(N))&D)>0: 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,009
s301343254
p04045
u953110527
1590972433
Python
Python (3.4.3)
py
Accepted
36
5620
307
from collections import deque n,k = map(int,input().split()) d = set(list(map(int,input().split()))) a = list({0,1,2,3,4,5,6,7,8,9} - d) a.sort() que = deque() que.append(0) while que: ans = que.popleft() if ans >= n: print(ans) exit() for i in a: que.append(ans*10 + 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,010
s680202127
p04045
u920103253
1590902000
Python
Python (3.4.3)
py
Accepted
20
3572
1,188
def s0():return input() def s1():return input().split() def s2(n):return [input() for x in range(n)] def s3(n):return [input().split() for _ in range(n)] def s4(n):return [[x for x in s] for s in s2(n)] def n0():return int(input()) def n1():return [int(x) for x in input().split()] def n2(n):return [int(input()) for _ ...
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,011
s224116168
p04045
u203843959
1590712991
Python
Python (3.4.3)
py
Accepted
82
3060
259
N,K=map(int,input().split()) dset=set(map(int,input().split())) def contain(n): ns=list(str(n)) for c in ns: if int(c) in dset: return True return False for i in range(N,100000): if not contain(i): print(i) break else: print(-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,012
s552490231
p04045
u936985471
1590646280
Python
Python (3.4.3)
py
Accepted
55
3060
162
n,k=map(int,input().split()) d=list(input().split()) for i in range(n,n*10+1): s=str(i) for p in d: if p in s: break else: print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,216,013
s385573827
p04045
u982591663
1590596033
Python
Python (3.4.3)
py
Accepted
63
2940
248
N, K = map(int, input().split()) D = list(input().split()) for i in range(N, 10**18): str_i = str(i) flag = True for d in D: if d in str_i: 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,014
s708500930
p04045
u497952650
1590586492
Python
Python (3.4.3)
py
Accepted
60
2940
227
N,K = map(int,input().split()) D = list(input().split()) for i in range(N,100000): flag = True for n in str(i): if n 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,015
s761791414
p04045
u883866798
1590460821
Python
Python (3.4.3)
py
Accepted
78
3064
354
K, N = map(int, input().split()) liked_num = [0,1,2,3,4,5,6,7,8,9] disliked_num = list(map(int, input().split())) for s in disliked_num: liked_num.remove(s) cnt = K flag = 1 while flag: not_n = 1 for i in str(cnt): if not int(i) in liked_num: not_n = 0 break if not_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,016