submission_id
string
problem_id
string
status
string
code
string
input
string
output
string
problem_description
string
s685696716
p04045
Runtime Error
n, k = map(int, input().split()) d = set(map(int, input().split())) inf = 10 * n + 1 num = [] for i in range(10): if i in d: pass else: num.append(i) for i in num: if i >= int(str(n)[0]): ans = i break def dfs(pos, x): if pos == len(str(n)): if x >= n: ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s735177766
p04045
Runtime Error
n, k = map(int, input().split()) d_i = set(map(int, input().split())) full = set(range(10)) useableList = full - d_i useable_Top = full - d_i - set([0]) answer = [] isTop = True for x in str(n): if int(x) in useableList: answer.append(x) elif isTop: answer.append(min(useable_Top - set(range(int(x) + 1)))) e...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s840302495
p04045
Runtime Error
n,k=map(int,input().split()) d={int(x) for x in input().split()} e={0,1,2,3,4,5,6,7,8,9} f=list(d^e) ans=[] for i in f: for j in f: for k in f: for l in f: ans.append(1000*i+100*j+10*k+l) ans=[m for m in ans if m>= n] print(min(ans))
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s186809174
p04045
Runtime Error
import numpy as np m,k=map(int,input().split()) d={int(x) for x in input().split()} e={np.arange(10)} f=list(d&e) ans=[] for i in f: for j in f: for k in f: for l in f: ans.append(1000*i+100*j+10*k+l) print(min(ans))
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s471508901
p04045
Runtime Error
N, K = map(int, input().split()) D = list(map(int, input().split())) S = "" ND = [] for i in range(10): if i not in D: ND.append(i) if K == 9: while int(S) < N: S = str(ND[0]) + S[:] print(int(S)) else: l = 0 F = ND[0] while F < N: l += 1 s = l F = 0 ju = 1 while s != 0: F...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s135002621
p04045
Runtime Error
N, K = map(int, input().split()) D = list(map(int, input().split())) S = "" ND = [] for i in range(10): if i not in D: ND.append(i) if K == 9: while int(S) < N: S = str(ND[0]) + S[:] print(int(S)) else: l = 0 F = ND[0] while F < N: l += 1 s = l F = 0 ju = 1 while s != 0: F...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s166208744
p04045
Runtime Error
N, K = map(int, input().split()) D = list(map(int, input().split())) flg = True while True: num = str(N) for i in range(len(num)): if num[i] in D: flg = False break if fig is True: print(int(num)) break N += 1
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s354045818
p04045
Runtime Error
if __name__ == "__main__": N,K = input().split() D = input().split() num = set([str(i) for i in range(10)]) diff = num^set(D) print(diff) ans = N while True: strN = set(list(ans)) if strN - diff: ans += 1 else: break print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s552316850
p04045
Runtime Error
if __name__ == "__main__": N, K = input().split(" ") D = input().split() num = set([str(i) for i in range(10)]) diff = num ^ set(D) temp = N while True: setN = set(list(N)) if setN - diff: temp += 1 else: break print(temp)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s786767069
p04045
Runtime Error
import bisect N,K = map(int,input().split()) D = list(map(int,input().split())) num = {0,1,2,3,4,5,6,7,8,9} Ds = set(D) diff = num^Ds if 0 in diff: diff.remove(0) lenn = len(str(N)) print(str(min(diff)) + '0'*(lenn-1)) else: lenn = len(str(N)) diff = list(diff) diff.sort() strN = str(N) ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s789442993
p04045
Runtime Error
import os if __name__ == "__main__": temp = input().split(" ") N = temp[0] L = int(temp[1]) D = list(map(int, input().split(" "))) like = [] for i in range(0, 10): if D.count(i) == 0: like.append(i) ans = [] for n in N: for l in like: if ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s689612134
p04045
Runtime Error
nk=list(map(int,input().split())) d=list(map(int,input().split())) i=nk[0] ans=0 while ans=0: flag=0 for j in range(len(str(i))): if str(i)[j] in d: flag=1 break if flag==0: ans=i i+=1 print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s004414323
p04045
Runtime Error
nk=list(map(int,input().split())) d=set(map(int,input().split())) i=nk[0] ans=0 while ans=0: flag=0 for j in range(len(str(i))): if str(i)[j] in d: flag=1 break if flag==0: ans=i i+=1 print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s125513384
p04045
Runtime Error
# https://atcoder.jp/contests/abc042/tasks/arc058_a # 最悪でも10**6探索する程度なのでNを一つづつ足して全探索でもよくね? N, K = list(map(int, input().split())) D = set(input().split()) def is_inD(n: int): tmp = set(str(n)) return tmp.isdisjoint(D) # 頭の悪い全探索 # for i in range(N, N + 10 ** 6): # if is_inD(i): # print(i) # ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s190375541
p04045
Runtime Error
import sys input = sys.stdin.readline N,K=map(int,input().rstrip().split()) D=list(map(int,input().rstrip().split())) def dfs(N): for i in range(K): if(str(N).find(str(D[i]))!=-1): dfs(N+1) return else: print(N) return return dfs(N)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s354540588
p04045
Runtime Error
import sys input = sys.stdin.readline N,K=map(int,input().rstrip().split()) D=list(map(int,input().rstrip().split())) def dfs(N): for i in range(K): if(str(N).find(str(D[i]))!=-1): dfs(N+1) return else: print(N) return return def resolve(): dfs(N)...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s737995449
p04045
Runtime Error
import sys input = sys.stdin.readline N,K=map(int,input().rstrip().split()) D=list(map(int,input().rstrip().split())) def dfs(N): for i in range(K): if(str(N).find(str(D[i]))!=-1): dfs(N+1) return else: print(N) def resolve(): dfs(N) from io import Str...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s964271346
p04045
Runtime Error
n, k = map(int,input().split()) d = list(map(int,input().split())) ns = str(n) e = [] for i in range(k): if i not in d: e.append(i) f = True ans_s = '' for j in range(len(ns)): if f: for l in range(len(e)): if e[l] >= int(ns[j]): ans_s += str(e[l]) if ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s618953863
p04045
Runtime Error
n, k = map(int,input().split()) d = list(map(int,input().split())) def over_digit(): ans_d = '' if e[0]==0: ans_d += str(e[1]) else: ans_d += str(e[0]) for m in range(len(ns)): ans_d += str(e[0]) return ans_d ns = str(n) e = [] for i in range(k): if i not in d: e...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s511413966
p04045
Runtime Error
n, k = map(int,input().split()) d = list(map(int,input().split())) ns = str(n) e = [] for i in range(k): if i not in d: e.append(i) f = True ans_s = '' for j in range(len(ns)): if f: for l in range(len(e)): if e[l] >= int(ns[j]): ans_s += str(e[l]) if ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s667180854
p04045
Runtime Error
import bisect from itertools import product N, K = map(int, input().split()) D = map(int, input().split()) like_num = set(range(0,10)) ^ set(D) length = len(str(N)) comb = [int("".join(map(str, a))) for a in product(like_num, repeat=length)] ind = bisect.bisect_left(comb, N) print(comb[ind])
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s252633980
p04045
Runtime Error
n, k = input().split() d_list = list(map(int, input().split())) u_list = [u for u in range(10) if u not in d_list] replace_lis = [u_list[0]] * 10 for i in range(10): for j in range(i,10): if j in u_list: replace_lis[i] = j break n_list = list(map(int, list(n)[::-1])) + [0] for i in...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s051498846
p04045
Runtime Error
n, k = input().split() d_list = list(map(int, input().split())) u_list = [u for u in range(10) if u not in d_list] replace_lis = [u_list[0]] * 10 for i in range(10): for j in range(i,10): if j in u_list: replace_lis[i] = j break n_list = list(map(int, list(n)[::-1])) + [0] # print(...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s678749790
p04045
Runtime Error
n, k = input().split() d_list = list(map(int, input().split())) u_list = [u for u in range(10) if u not in d_list] replace_lis = [u_list[0]] * 10 for i in range(10): for j in range(i,10): if j in u_list: replace_lis[i] = j break n_list = list(map(int, list(n)[::-1])) + [0] for i in...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s207169616
p04045
Runtime Error
N, K = map(str, input().split(" ")) num_hate = list(map(int, input().split(" "))) num_ok = [i for i in range(10) if i not in num_hate] N_new = N #print(num_ok) for i in range(len(N)): if int(N[i]) in num_hate: if i == 0: if num_ok[i] == 0: N_new = N.replace(N[i], str(num_ok[i+1]), 1) else: ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s231617041
p04045
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; int N, K; int D[11]; int main() { cin >> N >> K; for (int i = 0; i < K; i++) { cin >> D[i]; } ll num = N; while (1) { string s = to_string(num); // 数字を文字列にする bool ok = true; // 嫌いな数字が存在しないならtrue // 嫌いな数字の有無を判...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s637355663
p04045
Runtime Error
N, K = list(map(int, input().split())) D = list(map(int, input().split())) number = [i for i in range(10)] num_lis = list(set(number) - set(D)) ans=[] for i in num_lis: for j in num_lis: for k in num_lis: for l in num_lis: a = 1000*i + 100 *j + 10*k + l if a>=N: ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s801810158
p04045
Runtime Error
N, K = list(map(int, input().split())) D = list(map(int, input().split())) number = [i for i in range(10)] num_lis = list(set(number) - set(D)) ans=[] for i in num_lis: for j in num_lis: for k in num_lis: for l in num_lis: a = 1000*i + 100 *j + 10*k + l if a>=N: ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s619608203
p04045
Runtime Error
p,c=map(int,input().split()) dlike = list(map(int,input().split())) like = [0,1,2,3,4,5,6,7,8,9] num = list(str(p)) result = list() for i in dlike: like.remove(i) for j in range(len(num)): for k in like: if int(num[j]) <= k: result.append(str(k)) break print(int(''.join(result)...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s379656793
p04045
Runtime Error
import bisect n, k = input().split() A = sorted(list({i for i in range(10)} - set(map(int, input().split())))) greater = False ans = "" for i in n: if greater: ans += str(A[0]) else: t = A[bisect.bisect_left(A, int(i))] if t > int(i): greater = True ans += str(t) print(ans)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s457945947
p04045
Runtime Error
import bisect N,K = map(int,input().split()) N = [int(n) for n in str(N)] D = set(map(int,input().split())) nums = [] for i in range(10): if i not in D:nums.append(i) if len(nums) == 0: print(''.join([str(n) for n in N])) exit() nums.sort() i = len(N)-1 while i>=0: if N[i] not in nums: if nums[-1] < N[i...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s605658750
p04045
Runtime Error
import bisect N,K = map(int,input().split()) N = [int(n) for n in str(N)] D = set(map(int,input().split())) nums = [] for i in range(10): if i not in D:nums.append(i) if len(nums) == 0: print(N) exit() nums.sort() i = len(N)-1 while i>=0: if N[i] not in nums: if nums[-1] < N[i]: prv_len = len(N) ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s254630947
p04045
Runtime Error
import bisect N,K = map(int,input().split()) N = [int(n) for n in str(N)] D = set(map(int,input().split())) nums = [] for i in range(10): if i not in D:nums.append(i) nums.sort() if len(nums) == 0: print(N) exit() i = len(N)-1 while i>=0: if N[i] not in nums: if nums[-1] < N[i]: prv_len = len(N) ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s233435695
p04045
Runtime Error
import bisect N,K = map(int,input().split()) N = [int(n) for n in str(N)] D = set(map(int,input().split())) nums = [] for i in range(10): if i not in D:nums.append(i) nums.sort() if len(nums) == 0: print(N) exit() i = len(N)-1 while i>=0: if N[i] not in nums: if nums[-1] < N[i]: prv_len = len(N) ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s809329574
p04045
Runtime Error
import bisect N,K = map(int,input().split()) N = [int(n) for n in str(N)] D = set(map(int,input().split())) nums = [] for i in range(10): if i not in D:nums.append(i) nums.sort() if len(nums) == 0: print(N) exit() i = len(N)-1 while i>=0: if N[i] not in nums: if nums[-1] < N[i]: prv_len = len(N) ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s249827767
p04045
Runtime Error
import bisect N,K = map(int,input().split()) N = [int(n) for n in str(N)] D = set(map(int,input().split())) nums = [] for i in range(10): if i not in D:nums.append(i) nums.sort() i = len(N)-1 while i>=0: if N[i] not in nums: if nums[-1] < N[i]: prv_len = len(N) tmp_N = [int(s) for s in str(int(''....
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s933154477
p04045
Runtime Error
# 1<=n<10000 n,k = map(int,input().split()) d = list(map(int,input().split())) #使える数字を判別する。 nums = list(range(10)) s = [str(num) for num in nums if not num in d] #print(s) #使える数字の組み合わせでnより大きい最小値4ケタ n = list(str(n)) ans = [0]*len(n) for i in range(len(n)): if i == 0 and n[i] == "0" : # 0以外で一番小さい数を最初に持ってくる an...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s874194277
p04045
Runtime Error
N,K = map(int,input().split()) D = set(map(int,input().split())) ans = N while(True): if any(i in D for i in list(map(str,ans))): ans += 1 else: print(ans) break
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s816729437
p04045
Runtime Error
import bisect n,k = map(int, input().split()) d = list(map(int, input().split())) num = [ i for i in range(10)] num += d a = [ x for x in set(num) if num.count(x)<2] s = str(n) m = len(s) ans = [] for i in range(m): x = int(s[i]) index = bisect.bisect_left(a,x) if a[index]==x: ans.append(str(x)) ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s753932893
p04045
Runtime Error
N,K = [int(i) for i in input().split()] D = [int(i) for i in input().split()] use = [0,1,2,3,4,5,6,7,8,9] Keta = [] Keta.append(N // 1000) Keta.append(N % 1000 // 100) Keta.append(N % 1000 % 100 // 10) Keta.append(N % 1000 % 100 % 10) #print("Keta is {}".format(Keta)) Keta_Min = [] for i in range(len(D)): use.remo...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s927377345
p04045
Runtime Error
N,K = [int(i) for i in input().split()] D = [int(i) for i in input().split()] use = [0,1,2,3,4,5,6,7,8,9] Keta = [] Keta.append(N // 1000) Keta.append(N % 1000 // 100) Keta.append(N % 1000 % 100 // 10) Keta.append(N % 1000 % 100 % 10) #print("Keta is {}".format(Keta)) Keta_Min = [] for i in range(len(D)): use.remo...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s598864850
p04045
Runtime Error
N,K = [int(i) for i in input().split()] D = [int(i) for i in input().split()] use = [0,1,2,3,4,5,6,7,8,9] Keta = [] Keta.append(N // 1000) Keta.append(N % 1000 // 100) Keta.append(N % 1000 % 100 // 10) Keta.append(N % 1000 % 100 % 10) print("Keta is {}".format(Keta)) Keta_Min = [] for i in range(len(D)): use.remov...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s524842697
p04045
Runtime Error
n,k=map(int,input().split()) d=list(input().split()) x=list(range(1,10000)[::-1]) for i in d: a=[] for j in x: if i not in str(j): a.append(j) x=a import bisect as bi x=x[::-1] print(x[bi.bisect_left(x,n)])
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s251612335
p04045
Runtime Error
n,k=map(int,input().split()) d=list(input().split()) x=list(range(1,10000)[::-1]) for i in d: a=[] for j in x: if i not in str(j): a.append(j) x=a import bisect as bi print(x[bi.bisect_left(x,n)])
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s172290293
p04045
Runtime Error
n,k=map(int,input().split()) d=list(input().split()) x=range(1,10000)[::-1] for i in d: for j in x: if i in str(j): x.remove(j) import bisect as bi print(x[bi.bisect_left(x,n)])
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s291584089
p04045
Runtime Error
N,K = [int(i) for i in input().split()] D = [int(i) for i in input().split()] use = [0,1,2,3,4,5,6,7,8,9] Keta = [] Keta.append(N // 1000) Keta.append(N % 1000 // 100) Keta.append(N % 1000 % 100 // 10) Keta.append(N % 1000 % 100 % 10) Keta_Min = [] for i in range(len(D)): use.remove(D[i]) for i in range(4): A...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s816127564
p04045
Runtime Error
N,K = [int(i) for i in input().split()] D = [int(i) for i in input().split()] use = [0,1,2,3,4,5,6,7,8,9] Keta = [] Keta.append(N // 1000) Keta.append(N % 1000 // 100) Keta.append(N % 1000 % 100 // 10) Keta.append(N % 1000 % 100 % 10) print("Keta is {}".format(Keta)) Keta_Min = [] for i in range(len(D)): use.remov...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s680996921
p04045
Runtime Error
N,K = [int(i) for i in input().split()] D = [int(i) for i in input().split()] use = [0,1,2,3,4,5,6,7,8,9] Keta = [] Keta.append(N // 1000) Keta.append(N % 1000 // 100) Keta.append(N % 1000 % 100 // 10) Keta.append(N % 1000 % 100 % 10) Keta_Min = [] for i in range(len(D)): use.remove(D[i]) for i in range(4): A ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s292806981
p04045
Runtime Error
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 text(N): return N N += 1 N //= 10 x = F(N) y = min(safe) return 10 * x + y answer = F(...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s865934309
p04045
Runtime Error
N, K = map(int, input().split()) Dlist = [1,1,1,1,1,1,1,1,1,1] for i in range(K): D = int(input()) Dlist[D]=0 while True: f = True Nx = str(N) for i in range(len(Nx)): if Dlist[int(Nx[i])] == 0: f = False if f: print(N) break else: N += 1
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s127801369
p04045
Runtime Error
total, k = map(int, input().split()) ds = list(input().split()) for i in range(total,total*10+2): for d in ds: if d in list(str(ans)): break else: print(i) exit(0)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s346482277
p04045
Runtime Error
N, K = map(int, input().split()) D = list(map(int, input().split())) D = list(set(D)) nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] for d in D: nums.remove(d) l = [int(x) for x in str(N)] ans = [] for i, e in enumerate(l): if e in D: for num in nums: if e < num: ans.append(str(num)) ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s804896250
p04045
Runtime Error
line=input().split() N=int(line[0]) K=int(line[1]) D=input().rstrip().split() for i in range(N,10*N+1): s=str(i) flag=True for x in D: if x in s: flag=False break if flag: print(s) break else: continue
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s610358459
p04045
Runtime Error
n,k = input().split() d = list(input().split()) ans = '' for i in range(10): if not str(i) in d: sm = str(i) break for i in range(len(str(n))): if n[i] in d: co = str(int(n[i])+1) while(1): if not co in d: break co = co + 1 ans =...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s098698889
p04045
Runtime Error
# -*- coding: utf-8 -*- # 入力 N, K = input().split() K = int(K) D = list(map(int, input().split())) dd = [False]*10 for i in D: dd[i] = True def find_min(lis, index): for i in range(index+1, len(lis)): if(lis[i] == False): return i def make_num(num, order): ans = 0 for i in range(order): ans += ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s702207893
p04045
Runtime Error
n, k = map(int, input().split()) d = sorted(list({0, 1, 2, 3, 4, 5, 6, 7, 8, 9} - set(map(int, input().split())))) n = str(n) ans = '' for i in n: for j in d: if j >= int(i): ans += str(j) break print(int(ans))
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s223927117
p04045
Runtime Error
N, K = map(int, input().split()) d = list(map(int, input().split())) a = [] for i in range(10): if d.count(i) == 0: a.append(i) ans = [] def dfs(s): if int(s) >= N or len(s) > len(str(N)): return s for i in a: S = dfs(s + str(i)) if int(S) >= N: ans.append(int(S))...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s900658124
p04045
Runtime Error
val, size = map(int, input().split()) disabledList = [int(x) for x in input().split()] # number enableList = list(set(range(10)) - set(disabledList)) # number resultList = [] # str, must reverse isTenOver = False for char in list(str(val)).reverse(): targetInt = int(char) if isTenOver: targetInt += 1 if int(c...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s140783643
p04045
Runtime Error
val, size = map(int, input().split()) disabledList = [int(x) for x in input().split()] # number enableList = list(set(range(10)) - set(disabledList)) # number resultList = [] # int, must reverse isTenOver = False for char in list(str(val)).reverse(): targetInt = int(char) if isTenOver: targetInt += 1 if int(c...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s251705391
p04045
Runtime Error
N,K = map(int,input().split()) D = input().split() i = 0 money = N-1 while money < N: i = i+1 ans = [] ans += str(money+i) for j in range(len(ans)): for k in range(len(D)): if D[k] == ans[j]: flag = True break if flag: break if not(flag): money = money + i print(money...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s356966413
p04045
Runtime Error
n = list(map(int, input().split())) N = n[0] K = n[1] d = list(map(int, input().split())) num = [i for i in range(1,10)] dd = [] for i in d: num.remove(i) total = 1000*min(num) print(total)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s952135563
p04045
Runtime Error
n = list(map(int, input().split())) N = n[0] K = n[1] d = list(map(int, input().split())) num = [i for i in range(1,10)] dd = [] for i in d: num.remove(i) a = 0 for i in num: a += i*1000 print(a)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s043092790
p04045
Runtime Error
#!/usr/bin/env python3 import sys def solve(N: int, K: int, D: "List[int]"): ln = list(map(int, list(str(N)))) c = 0 for i in range(len(ln)-1,-1,-1): ln[i] += c while(ln[i] in D): ln[i] += 1 c = ln[i] // 10 ln[i] %= 10 if(c > 0): l = [c] + l ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s325266063
p04045
Runtime Error
#!/usr/bin/env python3 import sys def solve(N: int, K: int, D: "List[int]"): ln = list(map(int, list(str(N)))) c = 0 for i in range(len(ln)-1,-1,-1): ln[i] += c while(ln[i] in D): ln[i] += 1 c = ln[i] // 10 ln[i] %= 10 if(c > 0): ln.appendleft(c) ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s825315214
p04045
Runtime Error
#!/usr/bin/env python3 import sys def solve(N: int, K: int, D: "List[int]"): ln = list(map(int, list(str(N)))) c = 0 for i in range(len(ln)-1,-1,-1): while(ln[i] in D): ln[i] += 1 c = ln[i] // 10 ln[i] %= 10 if(c > 0): ln.appendleft(c) print(''.join(m...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s154248639
p04045
Runtime Error
# 入力 N, K = map(int, input().split()) Ds = input().split() D_list = [int(n) for n in Ds] # 嫌いな数字D n_list = [int(n) for n in str(N)] # 1つずつのNの値 number = list(range(10)) # 0-9までの数字 likes = list(set(D_list) ^ set(number)) # 好きな数字 for i in range(len(n_list)): if n_list[i] in D_list: # 嫌いな時 try: # 嫌いな値より大きな値が存...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s771453819
p04045
Runtime Error
import numpy as np n = list(map(int, input().split())) d = np.array(list(map(int, input().split()))) a = len(str(n[0])) x = np.zeros(a + 1) for i in range(a + 1): x[i] = (n[0] % np.power(10, a - i + 1)) // np.power(10, a - i) i = 0 while i += a: i += 1 if np.any(d == x[0]) and x[0] != 0: i = 0 ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s691811551
p04045
Runtime Error
import numpy as np n = list(map(int, input().split())) d = np.array(list(map(int, input().split()))) a = len(str(n[0])) x = np.zeros(a + 1) for i in range(a + 1): x[i] = (n[0] % np.power(10, a - i + 1)) // np.power(10, a - i) i = 0 while i != a + 1: i += 1 while np.any(d == x[i]): x[i] += 1 ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s945133429
p04045
Runtime Error
import numpy as np n = list(map(int, input().split())) d = np.array(list(map(int, input().split()))) a = len(str(n[0])) x = np.zeros(a + 1) for i in range(a + 1): x[i] = (n[0] % np.power(10, a - i + 1)) // np.power(10, a - i) i = 0 while i != a + 1: i += 1 if x[i] == 10: x[i - 1] += 1 x[i...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s462441600
p04045
Runtime Error
import numpy as np n = list(map(int, input().split())) d = np.array(list(map(int, input().split()))) a = len(str(n[0])) x = np.zeros(a + 1) for i in range(a + 1): x[i] = (n[0] % np.power(10, a - i + 1)) // np.power(10, a - i) i = 1 while 1: while np.any(d == x[i]): x[i] += 1 x[i + (i != a):] ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s510324306
p04045
Runtime Error
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)
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s912715211
p04045
Runtime Error
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...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s016280344
p04045
Runtime Error
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...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s864088106
p04045
Runtime Error
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...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s432884712
p04045
Runtime Error
l = list(range(10001)) l = list(map(str, l)) c = 0 N, K = map(int, input().split()) ld = list(map(str, input().split())) del l[:N] while True: if any(x in l[c] for x in ld): c += 1 else: break print(int(l[c]))
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s241194795
p04045
Runtime Error
l = list(range(10001)) l = list(map(str, l)) print(l) c = 0 N, K = map(int, input().split()) ld = list(map(str, input().split())) del l[:N] while True: if any(x in l[c] for x in ld): c += 1 else: break print(int(l[c]))
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s754224685
p04045
Runtime Error
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools,pdb sys.setrecursionlimit(10**7) inf = 10 ** 20 eps = 1.0 / 10**10 mod = 10**9+7 dd = [(-1, 0), (0, 1), (1, 0), (0, -1)] ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)] def ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s624036803
p04045
Runtime Error
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools,pdb sys.setrecursionlimit(10**7) inf = 10 ** 20 eps = 1.0 / 10**10 mod = 10**9+7 dd = [(-1, 0), (0, 1), (1, 0), (0, -1)] ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)] def ...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s732189337
p04045
Runtime Error
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...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s994877272
p04045
Runtime Error
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])...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s977552451
p04045
Runtime Error
def add(ans_list, word_list): new_ans_list = [] for ans in ans_list: for word in word_list: new_ans_list.append(ans+str(word)) return new_ans_list def run(): N, K = map(int, input().split()) len_N = len(str(N)) d_list = set(map(int, input().split())) all_list = set([0, 1, 2, 3, 4, 5, 6,...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s213258070
p04045
Runtime Error
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(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s031533652
p04045
Runtime Error
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(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s737027722
p04045
Runtime Error
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
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s911968004
p04045
Runtime Error
N,K = map(int, input().split()) kirai = [int(i) for i in input().split()] usable_num = [1,2,3,4,5,6,7,8,9] for x in kirai: usable_num.remove(x) ketasu = len(str(N)) #print(ketasu) s = 0 for d in range(ketasu): s += min(usable_num) * 10 ** d if s >= N: print(s) else: print(N+min(usable_num))
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s081694585
p04045
Runtime Error
N,K = map(int, input().split()) kirai = [int(i) for i in input().split()] usable_num = [1,2,3,4,5,6,7,8,9] for x in kirai: usable_num.remove(x) ketasu = len(str(N)) s = 0 for d in range(ketasu): s += min(usable_num) * 10 ** d if s >= N: print(s) else: pass
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s547241277
p04045
Runtime Error
l = list(range(10)) # LIST10桁の数字を生成 n, k = map(int, input().split()) # n=値段,10000以下 k=嫌いな個数 lis = list(map(int, input().split())) # 嫌いな数字入力 [l.remove(x) for x in lis] # 10桁の数字から嫌いな数字を削除 h = n / 10 ** (len(str(n))-1) # 値段の一番左の数字を取得するための計算 temp = [] for x in l: if h < x: temp.append(x) ans = [] ans.appen...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s486299145
p04045
Runtime Error
n, k = input().split() ds = list(map(int, input().split())) nums = [] for x in range(10): if x in ds: nums.append(1) else: nums.append(0) for x in range(n, n*10): ys = list(map(int,list(str(x)))) flag = False for y in ys: if nums[y]: flag = True bre...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s478679260
p04045
Runtime Error
no_list=[] s=input().split() money,num=int(s[0]),int(s[1]) for i in range(num): no_list.append(input()) for i in range(money,10000): origin=i flag=0 while i!=0: if str(i%10) in no_list: flag=1 break i//=10 if flag==0: print(origin) break
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s738924710
p04045
Runtime Error
n,k = map(int,input().split()) keta = len(str(n)) d = list(map(int,input().split())) ans = [] for i in range(1,10): if not i in d: ans.append(i) break k = 9 for i in range(0,10): if (not i in d) and (i < k): k = i for i in range(keta-1): ans.append(k) for i in range(len(an...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s781277947
p04045
Runtime Error
N,K = map(int, input().split()) l = list(map(int, input().split())) num = [i for i in range(10) if i not in l] #print(num) digit = [] while N>0: digit.append(N%10) N = N//10 digit.reverse() #print(digit) retval = [] #print(digit) #print(num) if digit[0] > num[-1]: if num[0] == 0: retval.append(num[1...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s521652337
p04045
Runtime Error
N,K = map(int, input().split()) l = list(map(int, input().split())) num = [i for i in range(10) if i not in l] #print(num) digit = [] while N>0: digit.append(N%10) N = N//10 digit.reverse() #print(digit) retval = [] if digit[0] > num[-1]: if num[0] == 0: retval.append(num[1]) for i in range(...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s921384143
p04045
Runtime Error
N,K = map(int, input().split()) l = list(map(int, input().split())) num = [i for i in range(10) if i not in l] #print(num) digit = [] while N>0: digit.append(N%10) N = N//10 digit.reverse() #print(digit) retval = [] if digit[0] > num[-1]: if num[0] == 0: retval.append(num[1]) for i in range(...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s752632025
p04045
Runtime Error
N,K = map(int, input().split()) l = list(map(int, input().split())) num = [i for i in range(10) if i not in l] #print(num) digit = [] while N>0: digit.append(N%10) N = N//10 digit.reverse() #print(digit) retval = [] if digit[0] > num[-1]: if num[0] == 0: retval.append(num[1]) for i in range(...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s076586776
p04045
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, k; cin >> n >> k; vector<int>d_vec(k, 0); for (int i = 0; i < k; ++i) { cin >> d_vec[i]; } int price = n; while (true){ bool isValid = true; int digit_cnt = floor(log10(price)); int now = pri...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s043775020
p04045
Runtime Error
n, k = map(int, input().split()) dlist = list(map(int, input().split())) for i in range(n, 10000): flg: bool = True for s in str(i): if int(s) in dlist: flg = False break if flg: print(i) break
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s392625426
p04045
Runtime Error
def C_IrohasObsession(): N, K = map(int, input().split()) D = list(map(int, input().split())) D_tmp = [] for x in range(10): if x not in D: D_tmp.append(x) for x in range(len(D_tmp)): ans = D_tmp[-1] * (10**(x)) if N > ans: ans = D_tmp[1] * (10 ** (len(str(N))...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s309939584
p04045
Runtime Error
def C_IrohasObsession(): N, K = map(int, input().split()) D = list(map(int, input().split())) D_tmp = [] for x in range(10): if x not in D: D_tmp.append(x) for x in range(len(D_tmp)): ans = D_tmp[-1] * (10**(x+1)) if N > ans: ans = D_tmp[1] * (10 ** len(str(N-...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s870022236
p04045
Runtime Error
N_str, K=input().split() N_digit=list(map(int,list(N_str))) D=sorted(list(map(int,input().split()))) l_digit=[n>D[-1] for n in N_digit] if any(l_digit): N_n=l_digit.index(True) if not any([n<D[-1] for n in N_digit[0:N_n]]): out=list(str(D[1] if D[0]==0 else D[0])) out+=[str(D[0]) for i in range(len(N_digi...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
s444782995
p04045
Runtime Error
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(1) break elif time[now] != k-1: time[now] += 1 bre...
1000 8 1 3 4 5 6 7 8 9
2000
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...