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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s965720108 | p04039 | u497046426 | 1560468777 | Python | Python (3.4.3) | py | Accepted | 65 | 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 | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,317 |
s090382931 | p04039 | u969236097 | 1558931514 | Python | Python (3.4.3) | py | Accepted | 33 | 2940 | 421 | import sys
def c():
p = [[int(t) for t in r.split(' ')] for r in sys.stdin.read().split('\n') if r != '']
N, K = p[0]
D = p[1]
#print(N, D)
while True:
n = N
while True:
if n % 10 in D:
N = N + 1
break
#print("mod: ", n % 10)
... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,318 |
s762685108 | p04039 | u143509139 | 1557605154 | Python | Python (3.4.3) | py | Accepted | 87 | 2940 | 151 | N, K = map(int, input().split())
d = set(input().split())
ans = N
while True:
if len(set(str(ans)) & d) == 0:
break
ans += 1
print(ans) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,319 |
s609734333 | p04039 | u882620594 | 1554900658 | Python | Python (3.4.3) | py | Accepted | 89 | 3064 | 309 | import sys
N, K = map(int,input().split())
D = list(input().split())
for i in range(N, 100001):
flg = 1
cost = str(i)
digit = len(cost)
for j in range(digit):
if cost[j] in D:
flg = 0
break
if flg == 1:
print(cost)
sys.exit()
print("error") | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,320 |
s392565142 | p04039 | u808427016 | 1554601912 | Python | Python (3.4.3) | py | Accepted | 52 | 3060 | 294 | N, K = [int(_) for _ in input().split()]
D = [int(_) for _ in input().split()]
def check(x, D):
while x > 0:
x, k = divmod(x, 10)
if k in D:
return False
return True
result = N
while 1:
if check(result, D):
break
result += 1
print(result) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,321 |
s277061375 | p04039 | u450339194 | 1554589224 | Python | Python (3.4.3) | py | Accepted | 22 | 3064 | 595 | import itertools
N, K = map(int, input().split())
Ds = list(map(int, input().split()))
NDs = list(set([i for i in range(10)]) - set(Ds))
NDs = list(map(str, NDs))
min_price = 100000
for p in itertools.product(NDs, repeat=len(str(N))):
if p[0] == '0':
continue
price = int(''.join(p))
if price < N:
... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,322 |
s005428046 | p04039 | u371763408 | 1554300000 | Python | Python (3.4.3) | py | Accepted | 71 | 3060 | 170 | n,k=map(int,input().split())
D=list(map(int,input().split()))
for i in range(n,88889):
for j in str(i):
if int(j) in D:
break
else:
print(i)
exit() | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,323 |
s069150528 | p04039 | u118642796 | 1554080592 | Python | Python (3.4.3) | py | Accepted | 67 | 2940 | 200 | N,K = map(int,input().split())
D = input().split()
for i in range(N,100000):
for d in D:
if d in str(i):
break
else:
break
continue
print(i)
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,324 |
s791877477 | p04039 | u346194435 | 1553286694 | Python | Python (3.4.3) | py | Accepted | 18 | 3188 | 1,449 | import bisect
N, K = input().split()
dList = [int(x) for x in input().split()]
useList = [0,1,2,3,4,5,6,7,8,9]
for d in dList:
useList.remove(d)
result = ''
if int(N[0]) > max(useList):
# 桁上げが必要
if useList[0] != 0:
result += str(useList[0])
else:
result += str(useList[1])
result += ... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,325 |
s985720461 | p04039 | u729133443 | 1552359173 | Python | Python (3.4.3) | py | Accepted | 81 | 2940 | 74 | n=int(input().split()[0]);a=set(input())
while a&set(str(n)):n+=1
print(n) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,326 |
s908224081 | p04039 | u367130284 | 1552349287 | Python | Python (3.4.3) | py | Accepted | 87 | 3864 | 111 | n,_=input().split();s=set(list(input()));n=int(n);print(n+[len(s&set(str(b)))for b in range(n,99999)].index(0)) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,327 |
s971090253 | p04039 | u994767958 | 1551909002 | Python | Python (3.4.3) | py | Accepted | 80 | 2940 | 248 | import sys
sys.setrecursionlimit(10**6)
def main():
n, k = map(int, input().split())
lst = list(input().split())
for i in range(n, 1000000):
flg = True
for j in str(i):
if j in lst:
flg = False
if flg:
print(i)
return
main() | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,328 |
s455216406 | p04039 | u903596281 | 1551326494 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 523 | N,K=map(int,input().split())
D=[int(x) for x in input().split()]
kazu=[9,8,7,6,5,4,3,2,1,0]
for item in D:
kazu.remove(item)
p=[]
m=len(str(N))
for i in range(m):
p.append(kazu[0]*(10**i))
p.sort(reverse=True)
j=0
while j<m:
for i in range(1,len(kazu)):
if sum(p)-p[j]+kazu[i]*(10**(m-j-1))>=N:
p[j]=kazu... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,329 |
s419652892 | p04039 | u316386814 | 1550968836 | Python | Python (3.4.3) | py | Accepted | 77 | 2940 | 157 | n, k = list(map(int, input().split()))
ds = set(input().split())
for ans in range(n, 100000):
if len(set(str(ans)) & ds) == 0:
break
print(ans) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,330 |
s102796449 | p04039 | u669696235 | 1550428125 | Python | Python (3.4.3) | py | Accepted | 70 | 2940 | 284 | N,K=map(int,input().split())
D=list(input().split())
for i in range(N,100000):
ans=True
for j in str(i):
if(str(j) in D):
ans=False
break
if(ans):
print(i)
exit()
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,331 |
s962692534 | p04039 | u619819312 | 1550410174 | Python | Python (3.4.3) | py | Accepted | 83 | 2940 | 200 | n,k=map(int,input().split())
d=list(input().split())
while n:
p=str(n)
c=0
for i in range(len(p)):
if p[i] in d:
n+=1
break
else:
break
print(n) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,332 |
s214885273 | p04039 | u950708010 | 1548432646 | Python | Python (3.4.3) | py | Accepted | 50 | 2940 | 355 | n,k = (int(i) for i in input().split())
d = list(int(i) for i in input().split())
def ketajudge(x):
while x != 0:
if x%10 in d:
return False
break
else:
if x//10 == 0:
return True
break
x = x//10
for i in range(10*n):
judge = n+i
if ketajudge(judge) == True:
... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,333 |
s088205647 | p04039 | u369752439 | 1548385899 | Python | Python (3.4.3) | py | Accepted | 85 | 3060 | 273 | N, K = input().strip().split()
Ds = set(input().strip().split())
price = N
roop_flag = True
while(roop_flag):
roop_flag = False
for d in Ds:
if(d in price):
price = str(int(price) + 1)
roop_flag = True
break
print(price) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,334 |
s782671659 | p04039 | u556812955 | 1547498320 | Python | Python (3.4.3) | py | Accepted | 79 | 2940 | 148 | n, k = map(int, input().split())
d = set(input().split())
for ans in range(n, int(1e7)):
if len(set(str(ans)) & d) == 0:
print(ans)
break | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,335 |
s633813698 | p04039 | u089032001 | 1546557845 | Python | Python (3.4.3) | py | Accepted | 76 | 2940 | 173 | n, k = map(int, input().split())
dislike = set(input().split())
while True:
if all(ch not in dislike for ch in str(n)) is True:
print(n)
break
n += 1 | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,336 |
s479596097 | p04039 | u593063683 | 1546184573 | Python | Python (3.4.3) | py | Accepted | 57 | 3060 | 367 | #C - こだわり者いろはちゃん 2
def checkDigit(n):
d = []
for i in range(9):
if n%10 in D: return False
n //= 10
if n==0: return True
def solve(n):
for i in range(N,1000000):
if checkDigit(i): return i
N, K = [int(x) for x in input().split()]
D = [int(x) for x in input().split()]
#print... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,337 |
s719905135 | p04039 | u627417051 | 1545646050 | Python | Python (3.4.3) | py | Accepted | 72 | 3064 | 412 | import itertools
N, K = list(map(int, input().split()))
D = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
Dx = list(input().split())
for i in Dx:
D.remove(i)
c = float("inf")
for i in range(1, 6):
for x in itertools.product(D, repeat = i):
z = list(x)
while True:
if z[0] == "0" and len(z) >= 2:
z = ... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,338 |
s451344420 | p04039 | u667458133 | 1543288910 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 617 | N, K = input().split()
D = list(map(int, input().split()))
for i in range(0, 10):
if i in D:
D.remove(i)
else:
D.append(i)
digit = len(N)
con = ''
for i in range(digit):
if int(N[i]) in D:
con += N[i]
else:
flag = True
for j in D:
if j > int(N[i]):... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,339 |
s236127808 | p04039 | u404676457 | 1542513538 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 609 | def ceil(n, i):
dec = 10 ** i
return n // dec * dec
(n, k) = list(map(int, input().split()))
d = list(map(int, input().split()))
l = []
for i in range(0, 10):
if i not in d:
l.append(i)
i = 1
while len(str(n)) >= i:
nown = n // (10 ** (i - 1)) % 10
ok = False
for j in l:
if j ==... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,340 |
s983811793 | p04039 | u390694622 | 1540865492 | Python | Python (3.4.3) | py | Accepted | 67 | 2940 | 231 | N,K=map(int,input().split())
d = input().split()
while True:
cand = N
candstring = str(cand)
ng = False
for chr in candstring:
if chr in d:
ng = True
break
if ng:
N+=1
else:
print(cand)
break | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,341 |
s279417823 | p04039 | u177398299 | 1539656856 | Python | Python (3.4.3) | py | Accepted | 41 | 2940 | 231 | N, K = map(int, input().split())
D = set(map(int, input().split()))
for i in range(N, N * 10):
j = i
while j:
q = j % 10
j //= 10
if q in D:
break
else:
print(i)
break | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,342 |
s929362089 | p04039 | u765237551 | 1535211661 | Python | Python (3.4.3) | py | Accepted | 87 | 3060 | 174 | n, k = map(int, input().split())
ds = input().split()
while True:
s = str(n)
oks = map(lambda d: d not in s, ds)
if all(oks):
break
n += 1
print(n)
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,343 |
s997515177 | p04039 | u297574184 | 1533080081 | Python | Python (3.4.3) | py | Accepted | 77 | 2940 | 159 | N, K = map(int, input().split())
Ds = set(input().split())
for ans in range(N, 88889):
As = set(str(ans))
if not (Ds & As):
break
print(ans)
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,344 |
s924098034 | p04039 | u967835038 | 1532547035 | Python | Python (3.4.3) | py | Accepted | 87 | 2940 | 226 | n,k=map(int,input().split())
d=sorted(list(map(int,input().split())))
ans=n
while True:
flag=0
for i in d:
if str(i) in str(ans):
ans+=1
flag+=1
if flag==0:
break
print(ans)
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,345 |
s216930716 | p04039 | u109256064 | 1531380715 | Python | Python (2.7.6) | py | Accepted | 53 | 2692 | 183 | k, n = (int(x) for x in raw_input().split())
d = raw_input().split()
while True:
good = True
for x in str(k):
if x in d:
good = False
break
if good:
break
k += 1
print k | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,346 |
s967192363 | p04039 | u388927326 | 1529750958 | Python | Python (3.4.3) | py | Accepted | 55 | 3064 | 554 | #!/usr/bin/env python3
def main():
n, k = map(int, input().split())
dk = list(map(int, input().split()))
assert len(dk) == k
us = set(usable(dk))
print(form(us, n))
def form(us, n):
for res in range(n, 10 ** 5):
fla = True
for c in str(res):
if int(c) not in us:
... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,347 |
s547471493 | p04039 | u536081558 | 1528667408 | Python | Python (2.7.6) | py | Accepted | 70 | 2568 | 104 | n, k = map(int, raw_input().split())
a = set(raw_input().split())
while set(str(n)) & a:
n += 1
print n | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,348 |
s590762462 | p04039 | u335295553 | 1528500372 | Python | Python (3.4.3) | py | Accepted | 86 | 3064 | 254 | N ,K = map(int, input().split())
D = sorted(list(map(int, input().split())))
count = N
while True:
flag = True
for i in D:
if str(i) in str(count):
count += 1
flag = False
if flag:
break
print(count) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,349 |
s869843472 | p04039 | u329709276 | 1528386861 | Python | Python (3.4.3) | py | Accepted | 75 | 2940 | 145 | N,K = map(int,input().split())
D = set(input().split())
while True:
if set(str(N)).isdisjoint(D):
print(N)
break
N += 1
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,350 |
s421764071 | p04039 | u817328209 | 1526482675 | Python | Python (3.4.3) | py | Accepted | 53 | 3060 | 194 | n, k = map(int, input().split())
d = input().split()
for m in range(n, 10*n) :
s = str(m)
for dk in d :
if dk in s :
break
else :
print(m)
exit() | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,351 |
s062710869 | p04039 | u761320129 | 1526260953 | Python | Python (3.4.3) | py | Accepted | 47 | 2940 | 194 | N,K = map(int,input().split())
ds = set(input().split())
ans = N
while True:
for c in str(ans):
if c in ds:
ans += 1
break
else:
break
print(ans) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,352 |
s197779607 | p04039 | u520158330 | 1525558104 | Python | Python (3.4.3) | py | Accepted | 55 | 2940 | 227 | N,K = map(int,input().split())
D = input().split()
for i in range(N,100000):
match = False
for s in str(i):
if s in D:
match = True
break
if not match:
print(i)
break | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,353 |
s223282543 | p04039 | u926678805 | 1525330619 | Python | Python (3.4.3) | py | Accepted | 69 | 2940 | 182 | # coding: utf-8
n,k=map(int,input().split())
d=input().split()
while True:
for c in d:
if c in str(n):
break
else:
print(n)
break
n+=1 | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,354 |
s237984238 | p04039 | u181037878 | 1525270902 | Python | Python (3.4.3) | py | Accepted | 46 | 2940 | 370 | N, K = map(int, input().split())
D = list(map(int, input().split()))
def is_kirai(n, D):
if n == 0:
if 0 in D:
return True
while n:
if n % 10 in D:
return True
else:
n = n // 10
return False
n = N
while True:
if not is_kirai(n, D):
... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,355 |
s148863595 | p04039 | u926295427 | 1524176028 | Python | Python (3.4.3) | py | Accepted | 62 | 3060 | 328 | #!python
# -*- coding: utf-8 -*-
def main():
N, K = input().split(' ')
D = set(map(int, input().split(' ')))
can_use_num = set(map(str, set(range(10)) - D))
n = int(N)
while True:
if set(str(n)) <= can_use_num:
break
n += 1
print(n)
if __name__ == '__main__':
... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,356 |
s288390983 | p04039 | u200239931 | 1523833664 | Python | Python (3.4.3) | py | Accepted | 74 | 3188 | 1,027 | import math
import sys
def getinputdata():
# 配列初期化
array_result = []
data = input()
array_result.append(data.split(" "))
flg = 1
try:
while flg:
data = input()
array_temp = []
if(data != ""):
array_r... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,357 |
s763963932 | p04039 | u873591811 | 1522878039 | Python | Python (3.4.3) | py | Accepted | 48 | 3060 | 251 | n,k=map(int,input().split())
d=list(map(int,input().split()))
while True:
m=n
f=False
while m>0:
if m%10 in d:
f=True
break
m=int(m/10)
if f:
n+=1
else:
print(n)
break | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,358 |
s279436408 | p04039 | u030726788 | 1522863717 | Python | Python (3.4.3) | py | Accepted | 52 | 3060 | 187 | import sys
n,k=map(int,input().split())
d=list(map(str,input().split()))
for i in range(n,100000):
s=str(i)
for j in d:
if(j in s):
break
else:
print(i)
sys.exit() | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,359 |
s679466294 | p04039 | u925364229 | 1522392291 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 656 | import bisect
n,K = map(str,input().split(" "))
D = list(map(int,input().split(" ")))
N = list(n)
D_bar = []
for i in range(10):
if not i in D:
D_bar.append(i)
mv = str(D_bar[0])
ld = 10 - int(K)
l = len(N)
index = -1
for i in range(l):
if int(N[i]) in D:
index = i
break
if index == (-1):
print(n)
exit(0)
... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,360 |
s396487433 | p04039 | u143492911 | 1520572156 | Python | Python (3.4.3) | py | Accepted | 73 | 2940 | 134 | n,k=map(int,input().split())
d=set(input().split())
for i in range(n,10*n):
if not set(str(i))&d:
print(i)
exit()
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,361 |
s322666858 | p04039 | u237316771 | 1518120274 | Python | Python (2.7.6) | py | Accepted | 10 | 2696 | 368 | n,k=raw_input().split();u=sorted({chr(x)for x in range(48,59)}-set(raw_input().split()));z=u[0];n=list(n)
for i,d in enumerate(n):
if d in u:continue
n[i:]=[next(e for e in u if e>d)]+[z]*(len(n)-i-1)
for j in range(i-1,-1,-1):
if n[j+1]<':':break
n[j:j+2]=[next(e for e in u if e>n[j]),z]
else:
if n[0]>'9':n=... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,362 |
s526162549 | p04039 | u694433776 | 1518067754 | Python | Python (3.4.3) | py | Accepted | 49 | 3060 | 251 | n,k=map(int,input().split())
d=list(map(int,input().split()))
while True:
m=n
f=False
while m>0:
if m%10 in d:
f=True
break
m=int(m/10)
if f:
n+=1
else:
print(n)
break | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,363 |
s765739836 | p04039 | u667084803 | 1510199363 | Python | Python (3.4.3) | py | Accepted | 87 | 2940 | 246 | N,K=map(int,input().split())
D=list(map(int,input().split()))
def solve():
for i in range(10*N+2):
if i>=N:
s=str(i)
for j in range(len(s)):
if int(s[j]) in D: break
else:
print(i)
return 0
solve() | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,364 |
s794541044 | p04039 | u367393577 | 1508987889 | Python | Python (3.4.3) | py | Accepted | 73 | 2940 | 142 | N, K = map(int, input().split())
D = set(input().split())
for i in range(N, 10**9):
if not set(str(i)) & D:
print(i)
break | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,365 |
s976290729 | p04039 | u190952243 | 1506915389 | Python | Python (3.4.3) | py | Accepted | 46 | 2940 | 275 | def valid(num,l):
while(num>0):
if (num%10) in l:
return 0
num = num//10
return 1
n,k=map(int,input().split(' '))
l = [int(x) for x in input().split(' ')]
for i in range(100000):
if valid(n+i,l) == 1:
print(n+i)
break
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,366 |
s894261037 | p04039 | u966695411 | 1505586358 | Python | Python (3.4.3) | py | Accepted | 64 | 3188 | 470 | #! /usr/bin/env python3
import itertools
def main():
N, K = input().split()
l = list(set(list('0123456789')) - set(input().split()))
t = int(N)
m = 100000
for i in itertools.product(l, repeat=len(N)):
if int(''.join(i)) >= t:
m = min(m, int(''.join(i)))
for i in itertools.pr... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,367 |
s855222484 | p04039 | u835482198 | 1500853527 | Python | Python (3.4.3) | py | Accepted | 85 | 2940 | 145 | N, K = map(int, input().split())
D = set(input())
n = N
while True:
if len(set(str(n)) & D) == 0:
print(n)
break
n += 1
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,368 |
s774580523 | p04039 | u471797506 | 1491890089 | Python | Python (2.7.6) | py | Accepted | 52 | 4392 | 309 | # -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll
N, K = map(int, raw_input().split())
D = set(raw_input().split())
for i in xrange(100000):
for x in str(N):
if x in D:
break
else:
print N
break
N += 1
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,369 |
s814415296 | p04039 | u481333386 | 1491492389 | Python | Python (3.4.3) | py | Accepted | 73 | 3060 | 244 | # -*- coding: utf-8 -*-
def main(n, D):
D = set(D)
while set(str(n)) & D:
n += 1
return n
if __name__ == '__main__':
n, _ = [int(e) for e in input().split()]
D = [e for e in input().split()]
print(main(n, D)) | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,370 |
s244100031 | p04039 | u622011073 | 1487337864 | Python | Python (3.4.3) | py | Accepted | 26 | 3060 | 256 | import itertools
n,_=map(int,input().split())
b=map(int,input().split())
l=len(str(n))
c=set(b)^set([0,1,2,3,4,5,6,7,8,9])
for i in range(l,l+2):
for x in itertools.product(c,repeat=i):
d=''.join(map(str,x))
if int(d)>=n:print(d);exit() | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,371 |
s589928816 | p04039 | u622011073 | 1487337641 | Python | Python (3.4.3) | py | Accepted | 27 | 3064 | 260 | import itertools
a=set([0,1,2,3,4,5,6,7,8,9])
n,_=map(int,input().split())
b=map(int,input().split())
l=len(str(n))
c=set(b)^a
for i in range(l,l+2):
for x in itertools.product(c,repeat=i):
d=''.join(map(str,x))
if int(d)>=n:print(d);exit() | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,372 |
s164447110 | p04039 | u269969976 | 1475685220 | Python | Python (3.4.3) | py | Accepted | 25 | 3064 | 697 |
inpt = input().split(" ")
maxNum = inpt[0]
dislike = input().split(" ")
dislike = [int(a) for a in dislike]
likeArray = []
for i in range(0,10):
if not i in dislike:
likeArray.append(i)
ans = ""
flag = False
for c in maxNum:
if flag :
ans += str(min(likeArray))
else:
if int(c)... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,373 |
s154801430 | p04039 | u351657462 | 1471179082 | Python | Python (2.7.6) | py | Accepted | 77 | 2572 | 258 | mark=[0 for i in range(10)]
n,k=map(int,raw_input().split())
l=map(int,raw_input().split())
def check(num):
temp=num
while(temp>0):
d=temp%10
if d in l:
return 0
temp=temp//10
return 1
while True:
if check(n)==1:
print n
break
n+=1
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,374 |
s666968356 | p04039 | u172200367 | 1469327543 | Python | Python (2.7.6) | py | Accepted | 28 | 2696 | 825 | N, K = raw_input().split()
D = set(map(int,raw_input().split()))
L = sorted(set(range(10))-D)
pay=[]
for ind, d in enumerate(N):
if ind == 0:
w = len(N)
ma, mi = max(L), min(L)
tmp = ''.join([str(ma)]*w)
tmp = int(tmp)
if tmp < int(N):
if L[0]==0:
... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,375 |
s453975978 | p04039 | u725662235 | 1469327095 | Python | Python (2.7.6) | py | Accepted | 37 | 2936 | 1,113 | from collections import deque
n = map(int, raw_input().split())
n = n[0]
d = map(int, raw_input().split())
e = range(0,10)
for dd in d:
e.remove(dd)
sn = str(n)
indexes = deque()
bg = False
for cn in sn:
dn = int(cn)
i = 0
if bg:
indexes.append(0)
continue
while i < len(e) and dn >... | p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,376 |
s432856864 | p04039 | u116275728 | 1469322373 | Python | Python (3.4.3) | py | Accepted | 90 | 3064 | 282 | N, K = map(int, input().split())
D = set(map(int, input().split()))
i = N
while True:
j = i
flag = True
while j > 0:
r = j % 10
if r in D:
flag = False
break
j //= 10
if flag:
print(i)
break
i += 1
| p04039 | <span class="lang-en">
<p>Score : <var>300</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p>
<p>She is shopping, and now paying at the cashier.
Her total is <var>N</var> y... | 1000 8
1 3 4 5 6 7 8 9
| 2000
| 1,209,377 |
s362174404 | p04043 | u961469795 | 1601525376 | Python | Python (3.8.2) | py | Accepted | 25 | 9156 | 122 | arr = list(map(int, input().split()))
if arr.count(5) == 2 and arr.count(7) == 1:
print("YES")
else:
print("NO")
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,378 |
s547010120 | p04043 | u582765213 | 1601514812 | Python | Python (3.8.2) | py | Accepted | 25 | 9036 | 136 | a, b, c = map(int, input().split())
iroha = [a, b, c]
if iroha.count(5) == 2 and iroha.count(7) == 1:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,379 |
s579235597 | p04043 | u782001565 | 1601499374 | Python | Python (3.8.2) | py | Accepted | 25 | 8872 | 116 | A = list(map(int, input().split()))
ans = 'NO'
if A.count(5) == 2 and A.count(7) == 1:
ans = 'YES'
print(ans) | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,380 |
s800224370 | p04043 | u242358695 | 1601481309 | Python | Python (3.8.2) | py | Accepted | 28 | 9012 | 137 | queue=list(map(int,input().split()))
queue.sort()
if queue[0]==5 and queue[1]==5 and queue[2]==7:
print("YES")
else:
print("NO")
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,381 |
s177859769 | p04043 | u306412379 | 1601467740 | Python | Python (3.8.2) | py | Accepted | 21 | 9000 | 111 | abc = list(input().split())
if abc.count('5') == 2 and abc.count('7') == 1:
print('YES')
else:
print('NO') | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,382 |
s035234624 | p04043 | u280841645 | 1601431621 | Python | Python (3.8.2) | py | Accepted | 20 | 8956 | 221 | a = input()
b = a.split()
if b[0]=="5" and b[1]=="5" and b[2]=="7":
print("YES")
elif b[0]=="5" and b[1]=="7" and b[2]=="5":
print("YES")
elif b[0]=="7" and b[1]=="5" and b[2]=="5":
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,383 |
s626161795 | p04043 | u434103236 | 1601431315 | Python | Python (3.8.2) | py | Accepted | 22 | 9024 | 148 | x = input()
str_a = x.split(" ")
array=[0]*10
for s in str_a:
array[int(s)]+=1
if array[5]==2 and array[7]==1:
print("YES")
else:
print("NO")
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,384 |
s026365880 | p04043 | u021495815 | 1601424238 | Python | Python (3.8.2) | py | Accepted | 29 | 9172 | 175 | ward = list(map(int, input().split()))
ward_sorted = sorted(ward)
if (ward_sorted[0]==5) & (ward_sorted[1]==5) & (ward_sorted[2]==7):
print('YES')
else:
print('NO')
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,385 |
s857314757 | p04043 | u307133884 | 1601423601 | Python | Python (3.8.2) | py | Accepted | 27 | 9020 | 123 | nums = list(map(int, input().split()))
if nums.count(5) == 2 and nums.count(7) == 1:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,386 |
s946495724 | p04043 | u763550415 | 1601377994 | Python | Python (3.8.2) | py | Accepted | 25 | 8796 | 112 | line = input()
if line == '5 5 7' or line == '5 7 5' or line == '7 5 5':
print('YES')
else:
print('NO') | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,387 |
s628664890 | p04043 | u763550415 | 1601353832 | Python | Python (3.8.2) | py | Accepted | 24 | 9148 | 126 | L = list(map(int, input().split()))
if L == [5, 7, 5] or L == [5, 5, 7] or L == [7, 5, 5]:
print('YES')
else:
print('NO') | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,388 |
s887840440 | p04043 | u318661636 | 1601296341 | Python | Python (3.8.2) | py | Accepted | 26 | 8988 | 109 | a = list(map(int,input().split()))
a.sort()
print('YES' if a[0] == 5 and a[1] == 5 and a[2] == 7 else 'NO') | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,389 |
s123615422 | p04043 | u775501928 | 1601256727 | Python | Python (3.8.2) | py | Accepted | 21 | 9100 | 207 | val = map(int, input().split())
check_count = 0
for i in val:
if i not in [5, 7]:
print('NO')
if i == 5:
check_count += 1
if check_count == 2:
print('YES')
else:
print('NO') | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,390 |
s124948784 | p04043 | u759718348 | 1601241048 | Python | Python (3.8.2) | py | Accepted | 21 | 9028 | 120 | A = list(map(int, input().split()))
A.sort()
if A[0] == 5 and A[1] == 5 and A[2] ==7:
print('YES')
else:
print('NO') | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,391 |
s292341321 | p04043 | u513211419 | 1601237350 | Python | Python (3.8.2) | py | Accepted | 26 | 8908 | 93 | a = list(map(int, input().split()))
a.sort()
print("YES") if a == [5, 5, 7] else print("NO")
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,392 |
s233840121 | p04043 | u513211419 | 1601237311 | Python | Python (3.8.2) | py | Accepted | 23 | 9152 | 103 | a = list(map(int, input().split()))
a.sort()
if a == [5, 5, 7]:
print("YES")
else:
print("NO")
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,393 |
s116081207 | p04043 | u434103236 | 1601237295 | Python | Python (3.8.2) | py | Accepted | 28 | 8816 | 190 | x = input()
mode = 0
count = 0
for num in x.split(" "):
if num == '5':
mode+=1
elif num =='7':
mode+=4
count+=1
if mode == 6 and count == 3:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,394 |
s378847138 | p04043 | u401183062 | 1601221581 | Python | Python (3.8.2) | py | Accepted | 22 | 9144 | 178 | def iroha():
A, B, C = map(int, input().split())
S = A + B + C
if S == 17:
print("YES")
else:
print("NO")
if __name__ == "__main__":
iroha() | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,395 |
s501514496 | p04043 | u763550415 | 1601181962 | Python | Python (3.8.2) | py | Accepted | 24 | 9092 | 117 | Len = list(map(int, input().split()))
if Len.count(5) == 2 and Len.count(7) == 1:
print('YES')
else:
print('NO') | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,396 |
s173392138 | p04043 | u521323621 | 1601169091 | Python | Python (3.8.2) | py | Accepted | 23 | 9024 | 97 | a = list(map(int, input().split()))
a.sort()
if a == [5,5,7]:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,397 |
s521575726 | p04043 | u977605150 | 1601137499 | Python | Python (3.8.2) | py | Accepted | 22 | 9076 | 136 | lst = list(map(int, input().split()))
lst.sort()
if lst[0] == 5 and lst[1] == 5 and lst[2] == 7:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,398 |
s932416130 | p04043 | u197273335 | 1601099078 | Python | Python (3.8.2) | py | Accepted | 24 | 8980 | 117 | a,b,c = input().split()
if (a+b+c).count('5')==2 and (a+b+c).count('7') ==1:
print("YES")
else:
print("NO")
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,399 |
s272754406 | p04043 | u937303520 | 1601059851 | Python | Python (3.8.2) | py | Accepted | 24 | 8992 | 216 | def atc_042a(input_value: str) -> str:
ABC = input_value.split(" ")
if ABC.count("5") == 2 and ABC.count("7") == 1:
return "YES"
return "NO"
input_value_1 = input()
print(atc_042a(input_value_1)) | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,400 |
s688765225 | p04043 | u396189676 | 1600962968 | Python | Python (3.8.2) | py | Accepted | 28 | 9076 | 390 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
a = list(map(int, input().split()))
if 7 == a[0]:
if 5 == a[1] and 5 == a[2]:
print("YES", end="\n")
else:
print("NO", end="\n")
elif 5 == a[0]:
if (7 == a[1] and 5 == a[2]) or (5 == a[1] and 7 == a[2]):
print("YES", end="\n")
... | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,401 |
s816386401 | p04043 | u808420410 | 1600954122 | Python | PyPy3 (7.3.0) | py | Accepted | 69 | 61800 | 102 | a, b, c = map(int, input().split())
if sorted([a, b, c]) == [5, 5, 7]: print('YES')
else: print('NO') | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,402 |
s592041417 | p04043 | u245641078 | 1600928911 | Python | Python (3.8.2) | py | Accepted | 30 | 9460 | 130 | from collections import Counter
N = dict(Counter(map(int,input().split())))
print("YES") if (N[5]==2 and N[7]==1) else print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,403 |
s685424509 | p04043 | u344089435 | 1600922575 | Python | Python (3.8.2) | py | Accepted | 30 | 9164 | 122 | l = [int(x) for x in input().split()]
l = sorted(l)
if l.count(5)==2 and l.count(7)==1:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,404 |
s619318116 | p04043 | u556477263 | 1600912539 | Python | Python (3.8.2) | py | Accepted | 27 | 9112 | 105 | a,b,c = map(int,input().split())
if a+b+c == 17 and a*b*c == 175:
print('YES')
else:
print('NO') | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,405 |
s181234032 | p04043 | u319038975 | 1600906639 | Python | Python (3.8.2) | py | Accepted | 25 | 9064 | 191 | a = list(map(int,input().split()))
num_5 = 0
num_7 = 0
for i in a:
if i==5:
num_5 = num_5+1
if i==7:
num_7 = num_7+1
if num_5==2 and num_7==1:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,406 |
s438763693 | p04043 | u582165495 | 1600897893 | Python | Python (3.8.2) | py | Accepted | 21 | 8956 | 164 | text = str(input())
cnt = 0
for i in text:
if i == "5":
cnt += 1
if i == "7":
cnt += 2
if cnt == 4:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,407 |
s897484004 | p04043 | u582165495 | 1600897869 | Python | Python (3.8.2) | py | Accepted | 26 | 8848 | 164 | text = str(input())
cnt = 0
for i in text:
if i == "5":
cnt += 1
if i == "7":
cnt += 2
if cnt == 4:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,408 |
s105309615 | p04043 | u336564899 | 1600882897 | Python | Python (3.8.2) | py | Accepted | 27 | 9088 | 237 | """
ABC042 A 和風いろはちゃんイージー
https://atcoder.jp/contests/abc042/tasks/abc042_a
"""
l = list(map(int, input().split()))
l5 = l.count(5)
l7 = l.count(7)
if l5 == 2 and l7 == 1:
print("YES")
else:
print("NO")
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,409 |
s648305711 | p04043 | u077816564 | 1600826267 | Python | Python (3.8.2) | py | Accepted | 26 | 8968 | 62 | print(['YES','NO'][sum(list(map(int,input().split()))) != 17]) | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,410 |
s035106389 | p04043 | u478222049 | 1600825582 | Python | Python (3.8.2) | py | Accepted | 28 | 9036 | 252 | A,B,C = map(int,input().split())
sev = 0
fiv = 0
if A == 7 :
sev += 1
elif A == 5:
fiv += 1
if B == 7:
sev += 1
elif B == 5:
fiv += 1
if C == 7:
sev += 1
elif C == 5:
fiv += 1
if sev == 1 and fiv == 2:
print("YES")
else:
print("NO")
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,411 |
s757989295 | p04043 | u492910842 | 1600824459 | Python | PyPy3 (7.3.0) | py | Accepted | 59 | 61912 | 112 | a=sorted(list(map(int,input().split())))
if a[0]==5 and a[1]==5 and a[2]==7:
print("YES")
else:
print("NO")
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,412 |
s645383100 | p04043 | u504662715 | 1600821518 | Python | Python (3.8.2) | py | Accepted | 30 | 9000 | 376 | a,b,c = map(int,input().split())
if a%5!=0 and a%7!=0:
print('NO')
elif b%5!=0 and b%7!=0:
print('NO')
elif c%5!=0 and c%7!=0:
print('NO')
elif a%7==0:
if b%5==0 and c%5==0:
print('YES')
else:
print('NO')
elif b%7==0:
if a%5==0 and c%5==0:
print('YES')
else:
print('NO')
else:
if a%5==0 a... | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,413 |
s687056027 | p04043 | u045505231 | 1600755415 | Python | Python (3.8.2) | py | Accepted | 31 | 9412 | 205 | import math
from datetime import date
def main():
line = input().split()
a = [int(x) for x in line]
a.sort()
if a[0] == 5 and a[1] == 5 and a[2] == 7:
print("YES")
else:
print("NO")
main()
| p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,414 |
s273111916 | p04043 | u645019684 | 1600747184 | Python | Python (3.8.2) | py | Accepted | 23 | 8960 | 94 | l = list(input().split())
l.sort()
if l == ['5', '5', '7']:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,415 |
s126505807 | p04043 | u843482581 | 1600726509 | Python | Python (3.8.2) | py | Accepted | 27 | 8992 | 203 | A, B, C = map(int, input().split())
if A == 5 and B == 5 and C == 7:
print("YES")
elif A == 5 and B == 7 and C == 5:
print("YES")
elif A == 7 and B == 5 and C == 5:
print("YES")
else:
print("NO") | p04043 | <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haik... | 5 5 7
| YES
| 1,209,416 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.