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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s851453973 | p04045 | u593590006 | 1571364330 | Python | Python (3.4.3) | py | Accepted | 53 | 2940 | 221 |
n,k=map(int,input().split())
l=input().split()
def check(s):
for i in s:
if i in l:
return 0
return 1
for x in range(n,10**9):
if check(str(x)):
print(x)
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,317 |
s197439984 | p04045 | u413165887 | 1571197058 | Python | Python (3.4.3) | py | Accepted | 89 | 3060 | 289 | def main():
n, k = map(int, input().split())
d = set(list(map(str, input().split())))
checker = 1
while checker:
if set(list(str(n))).isdisjoint(d):
print(n)
checker = 0
else:
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,318 |
s752128258 | p04045 | u281610856 | 1571012351 | Python | Python (3.4.3) | py | Accepted | 67 | 3060 | 235 | n, k = map(int, input().split())
d = set(map(str, input().split()))
num = {str(i) for i in range(10)}
available = num - d
ans = 0
for i in range(n, 10**5):
nums = set(str(i))
if nums <= available:
print(i)
break | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,319 |
s527187266 | p04045 | u716529032 | 1570974323 | Python | Python (3.4.3) | py | Accepted | 88 | 2940 | 143 | N, K = map(int, input().split())
l = set(input().split())
i = N
while(True):
if(len(l & set(str(i))) == 0):
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,216,320 |
s735622207 | p04045 | u970197315 | 1570934192 | Python | Python (3.4.3) | py | Accepted | 63 | 3060 | 290 | # ABC042 C Iroha's Obsession
N,K = map(int,input().split())
D = tuple(map(str,input().split()))
for i in range(N,1000000):
S = str(i)
is_iroha = True
for s in S:
if s in D:
is_iroha = False
break
if is_iroha:
print(S)
exit()
| p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,321 |
s508018936 | p04045 | u026537738 | 1570918339 | Python | Python (3.4.3) | py | Accepted | 37 | 2940 | 228 | N,K = map(int,input().split())
D = set(list(map(int,input().split())))
for i in range(N,100001):
tmp = i
while tmp > 0 and tmp % 10 not in D:
tmp = tmp // 10
if tmp == 0:
print(i)
break
| p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,322 |
s562036834 | p04045 | u045909335 | 1570840038 | Python | Python (3.4.3) | py | Accepted | 87 | 3060 | 226 | N, K = map(int, input().split())
D = set(input().split())
n = set(str(N))
ans = N
while True:
for t in n:
if t in D:
break
else:
print(ans)
exit()
ans += 1
n = set(str(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,323 |
s150811885 | p04045 | u891635666 | 1570702342 | Python | Python (3.4.3) | py | Accepted | 61 | 3316 | 313 | import collections
n, k = map(int, input().split())
counter = collections.Counter(list(map(int, input().split())))
for i in range(n, 100000):
ok = True
x = i
while x > 0:
ok = counter[x % 10] == 0
x //= 10
if not ok:
break
if ok:
print(i)
break | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,324 |
s429547589 | p04045 | u690781906 | 1570625560 | Python | Python (3.4.3) | py | Accepted | 54 | 3060 | 256 | def check(x, d):
str_x = str(x)
for s in str_x:
if s in d:
return False
return True
n, k = map(int, input().split())
d = list(input().split())
for x in range(n, 10**10):
if check(x, d):
print(x)
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,325 |
s087318452 | p04045 | u271934630 | 1570592177 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 509 | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
def main():
n, k = map(int, input().split())
d = set(map(int, 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):
... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,326 |
s929094410 | p04045 | u386819480 | 1570423177 | Python | Python (3.4.3) | py | Accepted | 76 | 3064 | 705 | #!/usr/bin/env python3
import sys
def solve(N: int, K: int, D: "List[int]"):
d = set(map(str, D))
while set(str(N))&d:
N += 1
print(N)
return
# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,327 |
s542924089 | p04045 | u606878291 | 1570384359 | Python | Python (3.4.3) | py | Accepted | 68 | 2940 | 360 | def check(price, disabled_digits):
price = int(price)
disabled_digits = set(disabled_digits)
while not set(str(price)).isdisjoint(disabled_digits):
price += 1
return price
def main():
price, k = input().split()
disabled_digits = input().split()
print(check(price, disabled_digits))
... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,328 |
s107832313 | p04045 | u606878291 | 1570383843 | Python | Python (3.4.3) | py | Accepted | 18 | 3188 | 2,332 | class Price:
ALL_DIGITS = set(list(map(str, range(10))))
def __init__(self, required_price, disabled_digits):
self.required_price = '0' + str(required_price)
self.disabled_digits = set(disabled_digits)
self.available_digits = sorted(
list(self.ALL_DIGITS - self.disabled_digi... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,329 |
s711612704 | p04045 | u830054172 | 1570369553 | Python | Python (3.4.3) | py | Accepted | 84 | 2940 | 154 | N, K = list(map(int, input().split()))
D = set(input().split())
for i in range(N,100000):
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,216,330 |
s584895563 | p04045 | u063052907 | 1570323115 | Python | Python (3.4.3) | py | Accepted | 45 | 3316 | 356 | def main():
N, K = map(int, input().split())
lst_D = list(input().split())
cost = N
while True:
for c in str(cost):
if c in lst_D:
break
else: # break しなかったときのみ実行される
print(cost)
break
cost += 1
if __name__ == "__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,331 |
s554188017 | p04045 | u063052907 | 1570322876 | Python | Python (3.4.3) | py | Accepted | 50 | 3316 | 389 | def judge(lst_D, number):
str_number = str(number)
for d in lst_D:
if d in str_number:
return False
return True
def main():
N, K = map(int, input().split())
lst_D = list(input().split())
cost = N
while True:
if judge(lst_D, cost):
print(cost)
... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,332 |
s257196242 | p04045 | u901180556 | 1570293350 | Python | Python (3.4.3) | py | Accepted | 66 | 3060 | 174 | N, K = map(int, input().split())
D = {str(i) for i in range(0,10)} - set(input().split())
for i in range(N, 10 * N):
num = set(str(i))
if num <= D:
print(i)
break | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,333 |
s050271191 | p04045 | u945181840 | 1570127990 | Python | Python (3.4.3) | py | Accepted | 22 | 3064 | 536 | K, N = map(int, input().split())
D = list(map(int, input().split()))
L = [i for i in range(10) if i not in D]
if int(len(str(K)) * str(L[-1])) < K:
if L[0] != 0:
print(str(L[0]) * (len(str(K)) + 1))
else:
print(str(L[1]) + len(str(K)) * str(L[0]))
else:
for i in range(10 ** (len(str(K)) - 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,334 |
s790975266 | p04045 | u873059840 | 1570126337 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 1,063 | N, K = map(int,input().split())
num_list =[]
num_list = input().split()
use_num = [s for s in ["0","1","2","3","4","5","6","7","8","9"] if s not in num_list]
flag = False
answer = []
for i in range(1,len(str(N))+1):
tmp = str(N)[-i]
if(flag):
flag=False
if(tmp==str(9)):
answer.inser... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,335 |
s512581333 | p04045 | u322354465 | 1569905140 | Python | Python (3.4.3) | py | Accepted | 100 | 2940 | 538 | # ダサい解き方だが桁上がり等を考えてややこしい実装をして間違うよりは良い
# def check_digit(v, d):
# if v in d:
# # if v == '9':
# return check_digit(str(int(v) + 1), d)
# else:
# return v
n, k = input().split()
d = input().split()
ans = []
while True:
if all(map(lambda x: x not in d, 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,336 |
s474078263 | p04045 | u854175276 | 1569719075 | Python | Python (3.4.3) | py | Accepted | 60 | 3060 | 227 | n, k = map(int, input().split())
num_list = list(map(str, input().split()))
ans = n
flg = False
while flg == False:
flg = True
for i in str(ans):
if i in num_list:
flg = False
ans += 1
break
print(ans) | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,337 |
s017054676 | p04045 | u062484507 | 1569615250 | Python | Python (3.4.3) | py | Accepted | 70 | 3060 | 198 | N, K = map(int, input().split())
D = set(input().split())
OK = {str(x) for x in range(10)} - D
while True:
if set(str(N)) <= OK:
ans = N
break
else:
N += 1
print(ans) | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,338 |
s206989906 | p04045 | u952708174 | 1569477270 | Python | Python (3.4.3) | py | Accepted | 77 | 3060 | 435 | def c_iroha_obsession():
# 1種しか使えない場合でも、Nの桁数+1だけ並べればいい。2種以上ならより小さい
N, K = [int(i) for i in input().split()]
D = set(input().split())
for ans in range(N, 10 * N + 1):
if set(str(ans)) & D == set():
return ans # ansが含む数字の集合とDの合併が空集合なら条件を満たす
return None
print(c_iroha_obsession()) | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,339 |
s435397313 | p04045 | u893063840 | 1569444465 | Python | Python (3.4.3) | py | Accepted | 93 | 2940 | 262 | n, k = map(int, input().split())
d = list(input().split())
pay = n
while True:
dislike = False
for ele in d:
if ele in str(pay):
dislike = True
break
if dislike:
pay += 1
else:
break
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,340 |
s282832613 | p04045 | u993622994 | 1569422986 | Python | Python (3.4.3) | py | Accepted | 85 | 2940 | 149 | N, K = map(int, input().split())
D = set(input().split())
for i in range(N, 10**5):
if set(str(i)) & D == set():
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,341 |
s111760973 | p04045 | u994988729 | 1569377896 | Python | Python (3.4.3) | py | Accepted | 66 | 3060 | 238 | n, k = map(int, input().split())
d = set(input().split())
like = set(["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]) - d
for i in range(n, 100000):
used = set(str(i))
if used <= like:
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,342 |
s563233137 | p04045 | u752907799 | 1569202817 | Python | Python (3.4.3) | py | Accepted | 39 | 3060 | 269 | N, K = map(int, input().split())
ok = [True]*10
d = [int(s) for s in input().split()]
for i in d:
ok[i] = False
ans = 0
for i in range(N, 10*N+1):
j = i
while j > 0 and ok[j%10]:
j //= 10
if j == 0:
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,343 |
s361268843 | p04045 | u404794295 | 1569162495 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 885 | inp=input().split(" ")
N=int(inp[0])
K=int(inp[1])
dislike=input().split(" ")
like=[]
for i in range(0,10):
if str(i) not in dislike:
like.append(str(i))
def search_min(n,like):
n=str(n)
if len(n)==1:
for i in like:
if i>=n:
return i
else:
if n[0] in 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,344 |
s582066643 | p04045 | u186838327 | 1569112654 | Python | Python (3.4.3) | py | Accepted | 29 | 3444 | 602 | n, k = map(int, input().split())
l = list(map(int, input().split()))
use_d = []
for i in range(10):
if i not in l:
use_d.append(i)
use_d.sort()
m = str(n)
ds = []
import itertools
for i in itertools.product(use_d, repeat=len(m)):
d = int("".join(str(x) for x in i))
ds.append(d)
ds.sort()
import bisect
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,345 |
s067329556 | p04045 | u480138356 | 1569033730 | Python | Python (3.4.3) | py | Accepted | 100 | 3060 | 310 | import sys
input = sys.stdin.readline
def main():
N, K = map(int, input().split())
d = set(input().strip().split())
tmp = N
while True:
s = set(list(str(tmp)))
if len(s & d) == 0:
print(tmp)
break
tmp += 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,346 |
s257761061 | p04045 | u141786930 | 1569030984 | Python | Python (3.4.3) | py | Accepted | 72 | 3060 | 217 | n, k = map(int, input().split())
d = {str(x) for x in input().split()}
a = {str(x) for x in range(10)}
l = a - d
while True:
if all(j in l for j in str(n)):
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,347 |
s981308579 | p04045 | u347640436 | 1568961036 | Python | Python (3.4.3) | py | Accepted | 84 | 2940 | 169 | N, K = map(int, input().split())
D = list(map(int, input().split()))
d = list(map(str, D))
while True:
if all(c not in d for c in str(N)):
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,348 |
s800271980 | p04045 | u141786930 | 1568947918 | Python | Python (3.4.3) | py | Accepted | 98 | 3064 | 275 | n, k = map(int, input().split())
d = {str(x) for x in input().split()}
a = {int(x) for x in range(10)}
l = a - d
for i in range(n,100000+1):
i2 = str(i)
for j in range(len(i2))[::-1]:
if i2[j] in d:
break
else:
print(i2)
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,349 |
s076403181 | p04045 | u617515020 | 1568856138 | Python | Python (3.4.3) | py | Accepted | 93 | 3060 | 176 | n,k=map(int,input().split())
d=list(map(int,input().split()))
for i in range(n,10*n):
str_i=str(i)
if all(int(j) not in d for j in str_i):
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,350 |
s544685265 | p04045 | u027929618 | 1568778146 | Python | Python (3.4.3) | py | Accepted | 66 | 3060 | 175 | n, k = map(int, input().split())
D = set(map(int, input().split()))
while True:
for i in str(n):
if int(i) 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,351 |
s801028367 | p04045 | u228223940 | 1568775040 | Python | Python (3.4.3) | py | Accepted | 50 | 3060 | 356 | n,k = map(int,input().split())
d = [int(i) for i in input().split()]
ans = 10**6
for i in range(10**6):
if ans != 10**6:
break
cnt = i
if n > cnt:
continue
while cnt != 0:
if cnt % 10 in d:
break
if cnt < 10:
ans = i
break
cnt... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,352 |
s197685504 | p04045 | u760767494 | 1568599137 | Python | Python (3.4.3) | py | Accepted | 96 | 3060 | 282 | c = 0
f = True
N, K = map(int, input().split())
ld = list(map(str, input().split()))
while f:
i = 0
N_str = str(N)
for i in range(K):
# print(i)
if ld[i] in N_str:
N += 1
break
elif i == K-1:
f = False
print(N) | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,353 |
s692215154 | p04045 | u533039576 | 1568562948 | Python | Python (3.4.3) | py | Accepted | 62 | 2940 | 247 | n, k = map(int, input().split())
d = input().split()
possible = False
while not possible:
n_str = str(n)
possible = True
for di in d:
if di in n_str:
possible = False
n += 1
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,354 |
s788240765 | p04045 | u063073794 | 1568513073 | Python | Python (3.4.3) | py | Accepted | 83 | 3060 | 371 | n, k = map(int,input().split())
d = list(map(str,input().split()))
ans=0
# ans を用意する
for i in range (n,100000):
s= str(i)
#文字列にする
pay=True
#フラグ
for j in range (len(s)):
if s[j] in d:
pay = False
break
#各桁がd にあるか調べて、あったら break
if pay:
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,355 |
s626271589 | p04045 | u063073794 | 1568512441 | Python | Python (3.4.3) | py | Accepted | 85 | 3060 | 277 | n, k = map(int,input().split())
d = list(map(str,input().split()))
ans = 0
for i in range(n,100000):
s = str(i)
pay = True
for j in range(len(s)):
if s[j] in d:
pay = False
break
if pay:
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,356 |
s746711703 | p04045 | u631299617 | 1568508591 | Python | Python (3.4.3) | py | Accepted | 19 | 3060 | 346 | n,k=map(int,input().split())
d=input().split()
while 1:
t=0
p=list(str(n))
q=len(p)
for c in range(q):
if t==1:
break
for b in range(k):
if p[c]==d[b]:
r=10**(q-c-1)
n=int(n/r+1)*r
t=1
break
if 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,357 |
s906468833 | p04045 | u214122599 | 1568427334 | Python | Python (3.4.3) | py | Accepted | 72 | 3064 | 341 | n,k =map(int, input().split())
#d = list(map(int, input().split()))
d = list(input().split())
#print(d)
def check(kakaku, negative_number):
check_sum = 1
for i in negative_number:
if i in str(kakaku):
#print(i)
check_sum = 0
break
else:
pass
return check_sum
while check(n, 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,358 |
s635061168 | p04045 | u728566015 | 1568249207 | Python | Python (3.4.3) | py | Accepted | 68 | 3060 | 203 | N, K = map(int, input().split())
D = set(map(int, input().split()))
while True:
for i in str(N):
if int(i) 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,359 |
s707996288 | p04045 | u469254913 | 1568159701 | Python | Python (3.4.3) | py | Accepted | 78 | 2940 | 286 | N,K = map(int,input().split())
D = list(map(int,input().split()))
isNotMin = True
temp = N * 1
while isNotMin:
for i in str(temp):
if int(i) in D:
temp += 1
isNotMin = True
break
else:
isNotMin = False
print(temp)
| p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,360 |
s553159748 | p04045 | u128908475 | 1568086185 | Python | Python (3.4.3) | py | Accepted | 72 | 3060 | 175 | N, K = map(int, input().split())
D = list(map(int, input().split()))
while True:
for i in str(N):
if int(i) 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,361 |
s674736883 | p04045 | u759412327 | 1568058808 | Python | Python (3.4.3) | py | Accepted | 89 | 2940 | 118 | N,K = input().split()
D = set(input().split())
while not set(N).isdisjoint(D):
N=str(int(N)+1)
else:
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,362 |
s909124790 | p04045 | u187516587 | 1567969239 | Python | Python (3.4.3) | py | Accepted | 74 | 3064 | 195 | N,K=map(int,input().split())
D=set(input().split())
while 1:
l=str(N)
for i in range(len(l)):
if l[i] in D:
break
else:
print(N)
break
N+=1 | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,363 |
s722894227 | p04045 | u598229387 | 1567968634 | Python | Python (3.4.3) | py | Accepted | 92 | 2940 | 278 | n,k=map(int,input().split())
d=[i for i in input().split()]
while True:
s=str(n)
s=list(s)
check=0
for i in s:
if i in d:
break
check+=1
if check==len(s):
print(''.join(s))
exit()
n+=1
| p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,364 |
s926808340 | p04045 | u060455496 | 1567952212 | Python | Python (3.4.3) | py | Accepted | 57 | 2940 | 247 | def main():
n,k=map(int,input().split())
a=input()
for i in range(n,100000):
bl = 1
for j in str(i):
if j in a:
bl=0
continue
if bl:
return i
print(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,365 |
s599513285 | p04045 | u592248346 | 1567876604 | Python | Python (3.4.3) | py | Accepted | 86 | 2940 | 151 | n,k = map(int,input().split())
ng = set(list(input().split()))
while True:
if len(set(str(n))&ng)==0:
break
else:
n+=1
print(n) | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,366 |
s673794601 | p04045 | u976225138 | 1567831736 | Python | Python (3.4.3) | py | Accepted | 89 | 2940 | 122 | n, k = input().split()
d = set(input().split())
while not set(n).isdisjoint(d):
n = str(int(n) + 1)
else:
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,367 |
s556760773 | p04045 | u976225138 | 1567831459 | Python | Python (3.4.3) | py | Accepted | 90 | 2940 | 157 | n, k = input().split()
d = set(input().split())
while True:
if set(n).isdisjoint(d):
print(n)
break
else:
n = str(int(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,368 |
s154682709 | p04045 | u177411511 | 1567792132 | Python | Python (3.4.3) | py | Accepted | 55 | 3060 | 354 | import sys
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
n, k = na()
ddd = input().split()
for i in range(n, 100000):
flag = True
for c in str(i):
if c in ddd:
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,216,369 |
s142620610 | p04045 | u266874640 | 1567706697 | Python | Python (3.4.3) | py | Accepted | 21 | 3064 | 497 | import itertools
N, K = map(int,input().split())
D = list(map(int,input().split()))
N = str(N)
d = []
d_min = 10
for i in range(10):
if i in D:
continue
else:
if i != 0:
d_min = min(d_min, i)
d.append(str(i))
if '0' in d:
ans = str(d_min) + '0' * len(N)
else:
ans = 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,370 |
s287037655 | p04045 | u788023488 | 1567655490 | Python | Python (3.4.3) | py | Accepted | 74 | 3060 | 293 | n,k = map(int, input().split())
List = [int(i) for i in input().split()]
for i in range(n,10**6):
flag = 0 # Listに入っていたら1にする
for j in str(i):
if int(j) in List: # intかstrに型を揃える
flag = 1
break
if flag == 0:
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,371 |
s431277226 | p04045 | u378328623 | 1567621022 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 691 | N, K = map(int, input().split())
Dlist = list(map(int, input().split()))
alist = list(set([0,1,2,3,4,5,6,7,8,9]) - set(Dlist))
if sum(x==0 for x in alist) == 0:
b = min(alist)
else:
b = min(list(set(alist)-set([0])))
strN = str(N)
c = ""
ans = ""
flag = True
for i in range(len(strN)):
iN = int(strN[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,372 |
s340425471 | p04045 | u811000506 | 1567458708 | Python | Python (3.4.3) | py | Accepted | 90 | 2940 | 157 | N,K = map(int,input().split())
D = list(map(str,input().split()))
while(1):
a = str(N)
if not any(i in a for i in D):
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,373 |
s595300731 | p04045 | u193604641 | 1567395081 | Python | Python (2.7.6) | py | Accepted | 39 | 2568 | 285 | def is_correct(disabled, val):
for c in str(val):
if c in disabled:
return False
return True
def main():
n, k = [int(x) for x in raw_input().split(' ')]
disabled = [x for x in raw_input().split(' ')]
while not is_correct(disabled, n):
n += 1
print(n)
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,374 |
s519375207 | p04045 | u270144704 | 1567266400 | Python | Python (3.4.3) | py | Accepted | 95 | 2940 | 294 | s=input().split()
money,num=int(s[0]),int(s[1])
no_list=input().split()
while True:
flag=0
for money_element in list(str(money)):
if money_element in no_list:
flag=1
money+=1
break
if flag==0:
print(money)
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,375 |
s585057911 | p04045 | u270144704 | 1567265558 | Python | Python (3.4.3) | py | Accepted | 85 | 2940 | 283 | s=input().split()
money,num=int(s[0]),int(s[1])
no_list=input().split()
for i in range(money,100000):
flag=0
for money_element in list(str(i)):
if money_element in no_list:
flag=1
break
if flag==0:
print(i)
break
| p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,376 |
s116561178 | p04045 | u270144704 | 1567265457 | Python | Python (3.4.3) | py | Accepted | 81 | 2940 | 283 | s=input().split()
money,num=int(s[0]),int(s[1])
no_list=input().split()
for i in range(money,100000):
flag=0
for money_element in list(str(i)):
if money_element in no_list:
flag=1
break
if flag==0:
print(i)
break
| p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,377 |
s083140077 | p04045 | u350248178 | 1567243738 | Python | Python (3.4.3) | py | Accepted | 81 | 3060 | 258 | n,k=map(int,input().split())
d=[int(i) for i in input().split()]
d=set(d)
i=0
while True:
s=str(n)
c=0
for i in s:
if int(i) in d:
break
else:
c+=1
if c==len(s):
print(n)
exit()
n+=1 | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,378 |
s728719308 | p04045 | u919025034 | 1567242168 | Python | Python (3.4.3) | py | Accepted | 84 | 3060 | 126 | import itertools
N,K= map(int,input().split())
D = set(input().split())
while len(set(str(N))&D) != 0:
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,379 |
s360656603 | p04045 | u408620326 | 1567197795 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 306 | N, K = [x for x in input().split()]
D = [x for x in input().split()]
M = N
while True:
N_ = 0
for i,n in enumerate(N):
if n in D:
N_ += (int(n) + 1) * 10 ** (len(N) - 1 - i)
break
else:
N_ += int(n) * 10 ** (len(N) - 1 - i)
else:
break
N = 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,380 |
s546283370 | p04045 | u090729464 | 1567159478 | Python | Python (3.4.3) | py | Accepted | 63 | 3064 | 252 | numbers = {str(i) for i in range(10)}
N, K = map(int, input().split())
*D, = map(str, input().split())
D = set(D)
available = numbers - D
ans = 0
for i in range(N, 100000):
nums = set(str(i))
if nums <= available:
print(i)
break | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,381 |
s353090955 | p04045 | u187462782 | 1567136636 | Python | Python (3.4.3) | py | Accepted | 94 | 2940 | 189 | n, k = (int(x) for x in input().split())
dislike_numbers = input().split()
for i in range(n, 99999):
if all(dn not in str(i) for dn in dislike_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,216,382 |
s219825813 | p04045 | u874303957 | 1567051144 | Python | Python (3.4.3) | py | Accepted | 80 | 2940 | 112 | N, K = map(int, input().split())
Ds = set(input().split())
n = N
while set(str(n)) & Ds:
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,383 |
s940223314 | p04045 | u897328029 | 1566845420 | Python | Python (3.4.3) | py | Accepted | 22 | 3444 | 1,860 | # https://atcoder.jp/contests/abc042/tasks/arc058_a
# C - こだわり者いろはちゃん / Iroha's Obsession
import copy
N, K = list(map(int, input().split()))
d_list = list(map(int, input().split()))
# 一番上の桁から見ていく
use_list = list(set(range(10)) - set(d_list))
n_list = [int(x) for x in list(str(N))]
# 各桁ごとに、使える数字を使っているかどうか洗い出す
keta_li... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,384 |
s264722549 | p04045 | u116002573 | 1566732457 | Python | Python (3.4.3) | py | Accepted | 21 | 3700 | 616 | def main():
N, K = map(int, input().split())
D = [int(d) for d in input().split()]
F = []
for i in range(10):
if i not in D: F.append(i)
l = len(str(N))
cand = [""]
for _ in range(l):
temp = []
for s in cand:
for f in F:
temp.append(s+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,216,385 |
s366812124 | p04045 | u688375653 | 1566620518 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 634 | N, K= map(int, input().split())
dislike_number = set(map(int, input().split()))
num = set([i for i in range(10)])
ok_num = list(num - dislike_number)
ok_num = sorted(ok_num)
max_len = len(str(N))
widths=[str(max(ok_num))]*(max_len+1)
min_value=10**(max_len+1)
for i in range(0,max_len+1):
if i==0:
temp=... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,386 |
s402934314 | p04045 | u433532588 | 1566527425 | Python | Python (3.4.3) | py | Accepted | 56 | 9240 | 647 |
import sys
sys.setrecursionlimit(1000000)
input = sys.stdin.readline
N, K = map(int, input().split())
D = input().split()
# 使える数字は?
nums = []
for c in list('0123456789'):
if c in D:
pass
else:
nums.append(c)
#print(nums)
ret = []
def dfs(next_value, nums, ans):
ans += next_value
if... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,387 |
s851156474 | p04045 | u219086885 | 1566356301 | Python | Python (3.4.3) | py | Accepted | 85 | 2940 | 138 | n, _ = [int(x) for x in input().split()]
dn = set(input().split())
i = n
answer = n
while len(set(str(n)) & dn) > 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,388 |
s356775731 | p04045 | u058850663 | 1566338486 | Python | Python (3.4.3) | py | Accepted | 65 | 3064 | 276 | # -*- coding: utf-8 -*-
numbers = {str(i) for i in range(10)}
N, K = map(int, input().split())
*D, = map(str, input().split())
D = set(D)
available = numbers - D
ans = 0
for i in range(N, 100000):
nums = set(str(i))
if nums <= available:
print(i)
break | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,389 |
s004649809 | p04045 | u628018347 | 1566164145 | Python | Python (3.4.3) | py | Accepted | 91 | 2940 | 158 | [N,K] = list(map(int, input().split()))
D = [x for x in input().split()]
while True:
S = str(N)
if not any(d in S for d in D):
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,390 |
s129362950 | p04045 | u256868077 | 1566148022 | Python | Python (3.4.3) | py | Accepted | 58 | 3060 | 235 | n,k=map(int,input().split())
d=list(map(str,input().split()))
def judge(x,y):
X=str(x)
ret=1
for i in X:
if(i in y):
ret=0
break
return ret
while(True):
if(judge(n,d)==1):
break
else:
n += 1
print(n) | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,391 |
s866962155 | p04045 | u792670114 | 1566004253 | Python | Python (3.4.3) | py | Accepted | 73 | 2940 | 180 | N, K = map(int, input().split())
Ds = set(input().split())
for i in range(N, 100000):
s = str(i)
ng = any(map(lambda c: c in Ds, s))
if not(ng):
r = i
break
print(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,392 |
s315034864 | p04045 | u736729525 | 1565971095 | Python | Python (3.4.3) | py | Accepted | 88 | 2940 | 163 | N, K = map(int, input().split())
D = [x for x in input().split()]
while True:
S = str(N)
if not any(d in S for d in D):
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,393 |
s776009748 | p04045 | u736153993 | 1565967222 | Python | Python (3.4.3) | py | Accepted | 59 | 2940 | 209 | n, k = map(int, input().split())
dlist = input().split()
flg = True
while flg:
s = str(n)
for t in s:
if t in dlist:
n += 1
break
else:
flg = False
print(n)
| p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,394 |
s272123430 | p04045 | u475503988 | 1565898434 | Python | Python (3.4.3) | py | Accepted | 61 | 2940 | 222 | N, K = map(int, input().split())
D = list(input().split())
ans = N
flg = True
while flg:
s = str(ans)
for c in s:
if c in D:
ans += 1
break
else:
flg = False
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,395 |
s449258984 | p04045 | u247922466 | 1565886137 | Python | Python (3.4.3) | py | Accepted | 22 | 3064 | 555 | def C_IrohasObsession():
N, K = map(int, input().split())
D = list(map(int, input().split()))
ans = 0
for x in range(N, 10000):
for y in str(x):
if int(y) in D:
break
else:
ans = int(x)
break
if N > ans:
for x in range(1,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,396 |
s820461848 | p04045 | u247922466 | 1565885145 | Python | Python (3.4.3) | py | Accepted | 57 | 3064 | 343 | def C_IrohasObsession():
N, K = map(int, input().split())
D = list(map(int, input().split()))
ans = 0
for x in range(N, 100000):
for y in str(x):
if int(y) in D:
break
else:
ans = int(x)
break
print(ans)
if __name__ == "__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,397 |
s013525221 | p04045 | u842689614 | 1565849213 | Python | Python (3.4.3) | py | Accepted | 20 | 3064 | 1,007 | N_str, K=input().split()
K=10-int(K)
N_digit=list(map(int,list(N_str)))
D=sorted(list(map(int,input().split())))
D=[d for d in range(10) if d not in D]
l_digit=[n>D[-1] for n in N_digit]
if any(l_digit):
N_n=l_digit.index(True)
if not any([n is not D[-1] for n in N_digit[0:N_n]]):
out=list(str(D[1] if D[0]==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,398 |
s770659626 | p04045 | u111365362 | 1565759544 | Python | Python (3.4.3) | py | Accepted | 33 | 3064 | 588 | n,K = map(int,input().split())
use = [0,1,2,3,4,5,6,7,8,9]
useless = list(map(int,input().split()))
for i in range(K):
use.remove(useless[i])
k = 10 - K
time = [0]
def suc(time):
now = 0
while True:
if now >= len(time):
time.append(0)
break
elif time[now] != k-1:
time[now] += 1
bre... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,399 |
s199341735 | p04045 | u874741582 | 1565732352 | Python | Python (3.4.3) | py | Accepted | 77 | 3060 | 457 | n,k = map(int,input().split())
d = list(map(str,input().split()))
a = 0 #フラグ
for i in range(n,100000):
for j in d:
if j in str(i): # もしも嫌いな文字dが含まれていたらこの文字iはだめ
a = 1 #フラグをダメにする 次の値段にアップ
break
elif j == d[-1]: a=0 #最後までまわった⇨全て含まれない⇨フラグ0に
if a==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,400 |
s197677499 | p04045 | u514894322 | 1565667546 | Python | Python (3.4.3) | py | Accepted | 84 | 2940 | 129 | n,k = map(int,input().split())
l = set(input().split())
ans = n
flag = True
while len(set(str(ans))&l) > 0:
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,401 |
s911037151 | p04045 | u733608212 | 1565554350 | Python | Python (3.4.3) | py | Accepted | 51 | 2940 | 162 | n , k= map(int, input().split())
d = list(map(str, input().split()))
while 1:
for i in str(n):
if i in d:
break
else:
print(n)
break
n+=1
| p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,216,402 |
s644310106 | p04045 | u672475305 | 1565545245 | Python | Python (3.4.3) | py | Accepted | 74 | 3064 | 274 | n,k = map(int,input().split())
alllst = ['0','1','2','3','4','5','6','7','8','9']
dislike = [str(i) for i in input().split()]
lst = set(alllst) - set(dislike)
while True:
st = set(str(n))
if st.issubset(lst):
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,403 |
s636973749 | p04045 | u626337957 | 1565443519 | Python | Python (3.4.3) | py | Accepted | 54 | 2940 | 219 | N, K = map(int, input().split())
nums = list(input().split())
for i in range(N, 100000):
checked = True
for char in str(i):
if char in nums:
checked = False
break
if checked:
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,404 |
s749727604 | p04045 | u800729321 | 1565193484 | Python | Python (3.4.3) | py | Accepted | 87 | 2940 | 211 | n, l = map(int, input().split())
s = input().split()
def is_hate(nums, price):
for n in nums:
if str(n) in str(price):
return True
else:
return False
while(is_hate(s, 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,405 |
s970303334 | p04045 | u278463847 | 1565163110 | Python | Python (3.4.3) | py | Accepted | 86 | 2940 | 210 | n, l = map(int, input().split())
s = input().split()
def is_hate(nums, price):
for n in nums:
if str(n) in str(price):
return True
else:
return False
while(is_hate(s, 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,406 |
s316942478 | p04045 | u229959388 | 1565107910 | Python | Python (3.4.3) | py | Accepted | 58 | 2940 | 219 | n, k = map(int, input().split())
a = input().split()
for i in range(10*n - n):
c = str(n+i)
for j in a:
if j in c:
break
else:
ans = c
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,407 |
s574491006 | p04045 | u200785298 | 1565057300 | Python | Python (3.4.3) | py | Accepted | 35 | 3064 | 767 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)
def solve(N: int, K: int, D: "List[int]"):
tmp = N
while True:
i = tmp
ng = False
while i > 0:
if (i % 10) in D:
ng = True
break
i //= 10
if not ng:
... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,408 |
s772566227 | p04045 | u229959388 | 1565034586 | Python | Python (3.4.3) | py | Accepted | 59 | 3060 | 219 | n, k = map(int, input().split())
a = input().split()
for i in range(10*n - n):
c = str(n+i)
for j in a:
if j in c:
break
else:
ans = c
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,409 |
s837273096 | p04045 | u457554982 | 1564953180 | Python | Python (3.4.3) | py | Accepted | 20 | 3188 | 1,430 | n,k=[s for s in input().split()]
n=int(n)
k=int(k)
hate=list(map(int, input().split())) #hate取得
like=[]
hate.sort()
like.sort()
for i in range(10): #like取得
if i not in hate:
like.append(i)
pointer=0
for ichi in like: #1桁の場合
if ichi>=n:
kane=ichi
pointer=1
break
if pointer==0: #2桁の場合
for ju in like:
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,410 |
s455875978 | p04045 | u844646164 | 1564858307 | Python | Python (3.4.3) | py | Accepted | 82 | 2940 | 135 | n, k = map(int, input().split())
d = set(map(str, input().split()))
num = n
while d.intersection(set(str(num))):
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,411 |
s920709507 | p04045 | u134712256 | 1564706487 | Python | Python (3.4.3) | py | Accepted | 72 | 2940 | 278 | N,K=map(int,input().split())
D=list(map(int,input().split()))
#dcount = 0 #
while True:
for n in str(N):
if int(n) in D:
N+=1
# print(n,N,count) #
#count += 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,412 |
s217339600 | p04045 | u820047642 | 1564530841 | Python | Python (3.4.3) | py | Accepted | 19 | 3064 | 1,225 | import sys
def main():
input=sys.stdin.readline
N,K=map(int,input().split())
D=list(map(int,input().split()))
L=[]
for i in range(10):
if i not in D:
L.append(i)
for p in L:
if len(str(N))==1:
if p>=N:
print(p)
return
... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,413 |
s568252779 | p04045 | u923606520 | 1564526739 | Python | Python (3.4.3) | py | Accepted | 73 | 3064 | 379 | N, K = map(int, input().split())
D = list(map(int, input().split()))
n = len(str(N))
C = []
for k in range(10):
if not k in D:
C.append(k)
def num(a):
if a!='' and (len(a) > n or int(a)>=N):
if int(a) >= N:
return a
return 114514
d=1145141919
for c in C:
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,414 |
s850527578 | p04045 | u814715203 | 1564487836 | Python | Python (3.4.3) | py | Accepted | 98 | 2940 | 238 | def UnlikeNum(nums,price):
for num in nums:
if(str(num) in str(price)):
return True
return False
N, K = map(int,input().split())
D = list(map(int,input().split()))
while(UnlikeNum(D,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,415 |
s982778600 | p04045 | u159723084 | 1564176067 | Python | Python (3.4.3) | py | Accepted | 97 | 3064 | 846 | # -*- coding: utf-8 -*-
"""
Created on Fri Jul 26 04:39:44 2019
@author: matsui
"""
N,K=map(int,input().split())
D=input().split()
D=[int(D[i]) for i in range(K)]
for n in range(N,100000):
a=n//10000
b=n%10000//1000
c=n%1000//100
d=n%100//10
e=n%10
if a+b+c+d ==0:
if... | p04045 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and 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,416 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.