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
s138221069
p04044
u726905855
1471243218
Python
Python (3.4.3)
py
Accepted
40
3064
115
N, L = list(map(int, input().split())) strings = [input() for _ in range(N)] strings.sort() print(''.join(strings))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,717
s578957470
p04044
u869328641
1471197657
Python
Python (3.4.3)
py
Accepted
40
3064
90
N,L = map(int,input().split()) S = [input() for i in range(N)] S.sort() print("".join(S))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,718
s281353688
p04044
u357487020
1471135660
Python
Python (2.7.6)
py
Accepted
27
2568
129
n,l=map(int,raw_input().split()) s=[raw_input() for _ in xrange(n)] s.sort() ans="" for i in xrange(n): ans+=s[i] print(ans)
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,719
s557501369
p04044
u898764305
1471123118
Python
Python (2.7.6)
py
Accepted
28
2568
151
a = "" n, l = map(int, raw_input().split()) s = [] for i in xrange(0, n): s.append(raw_input()) s.sort() for i in xrange(0, n): a = a +s[i] print a
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,720
s826002304
p04044
u037937323
1470948976
Python
Python (2.7.6)
py
Accepted
28
2568
129
n,l = map(int,raw_input().split()) array=[] for i in range(n): array.append(raw_input()) array.sort() print ''.join(array)
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,721
s844811528
p04044
u161703388
1470508377
Python
Python (3.4.3)
py
Accepted
41
3064
435
N, L = (int(i) for i in input().split()) String = [input() for s in range(N)] for i in range(N-1): start = N - 1 #print("start " + str(start)) for j in range(start-i): #print(str(start-j-1) + " " + str(start-j)) Left = String[start-j-1] Right = String[start-j] if Left > Righ...
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,722
s296159454
p04044
u289882742
1470434262
Python
Python (2.7.6)
py
Accepted
30
2692
152
import sys def main(lines): print(''.join(sorted(lines.split()))) next(sys.stdin) lines = '' for line in sys.stdin: lines += line main(lines)
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,723
s265962665
p04044
u233602244
1470349983
Python
Python (3.4.3)
py
Accepted
39
3064
95
n, l = map(int, input().split()) li = [input() for i in range(n)] li.sort() print("".join(li))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,724
s952337127
p04044
u696805736
1470284370
Python
Python (3.4.3)
py
Accepted
41
3064
106
n,l = map(int,input().split()) s=[] for i in range(n): s.append(input()) s.sort() print("".join(s))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,725
s657090044
p04044
u338686846
1470248589
Python
Python (2.7.6)
py
Accepted
29
2568
129
N, L = map(int, raw_input().split()) S = [raw_input().split() for _ in range(N)] r = '' for i in sorted(S): r += i[0] print r
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,726
s733428652
p04044
u903215911
1469741799
Python
Python (3.4.3)
py
Accepted
40
3188
104
N, L = map(int, input().split()) S = [] for _ in range(N): S.append(input()) S.sort() print(''.join(S))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,727
s529979024
p04044
u685892567
1469725132
Python
Python (3.4.3)
py
Accepted
40
3064
119
n,m=[int(x) for x in input().split()] l=sorted([input() for i in range(n)]) str="" for x in l: str+=x print(str)
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,728
s484251551
p04044
u886545507
1469709957
Python
Python (2.7.6)
py
Accepted
28
2568
128
#coding: utf-8 #ABC042B n,l=map(int,raw_input().split()) s=[raw_input() for i in xrange(n)] s.sort() res="".join(s) print res
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,729
s209364959
p04044
u426432817
1469668556
Python
Python (3.4.3)
py
Accepted
42
3316
108
N,L=map(int, input().split()) a=[] for i in range(N): a.append(input()) a.sort() print(''.join(a))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,730
s753563415
p04044
u804080968
1469641665
Python
Python (3.4.3)
py
Accepted
39
3064
91
N, L = map(int, input().split()) S = sorted([input() for i in range(N)]) print("".join(S))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,731
s631094562
p04044
u107077660
1469572052
Python
Python (3.4.3)
py
Accepted
39
3064
120
N, L = map(int, input().split()) a = [input() for i in range(N)] a.sort() b = "" for i in range(N): b += a[i] print(b)
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,732
s929292932
p04044
u022488946
1469481460
Python
PyPy2 (5.6.0)
py
Accepted
64
8816
99
N, L = map(int, raw_input().split()) S = [raw_input() for _ in xrange(N)] S.sort() print ''.join(S)
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,733
s937047039
p04044
u591287669
1469461691
Python
Python (3.4.3)
py
Accepted
38
3064
106
n,l = map(int,input().split()) arr=[] for i in range(n): arr.append(input()) print(''.join(sorted(arr)))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,734
s669954808
p04044
u713368238
1469459369
Python
Python (3.4.3)
py
Accepted
39
3064
120
n, l = map(int, input().split()) moji = [] for _ in range(n): moji.append(input()) moji.sort() print(''.join(moji))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,735
s286957387
p04044
u830390742
1469453261
Python
Python (2.7.6)
py
Accepted
26
2568
81
print ''.join(sorted([raw_input() for i in range(int(raw_input().split()[0]))]))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,736
s756478435
p04044
u461954362
1469439730
Python
Python (3.4.3)
py
Accepted
39
3192
238
#!/usr/bin/env python3 # -*- coding:utf-8 -*- def main(): N, L = map(int, input().split()) S = sorted([input() for _ in range(N)]) # for i in S: # print(i) print("".join(S)) if __name__ == "__main__": main()
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,737
s414172957
p04044
u125680071
1469418046
Python
Python (3.4.3)
py
Accepted
39
3064
92
N, L = map(int, input().split()) S = [input() for i in range(N)] S.sort() print(''.join(S))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,738
s786873343
p04044
u112002050
1469398662
Python
Python (3.4.3)
py
Accepted
40
3064
101
N = int(input().split()[0]) words = [input().strip() for i in range(N)] print("".join(sorted(words)))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,739
s763948938
p04044
u226155577
1469390416
Python
Python (2.7.6)
py
Accepted
27
2568
90
n, l = map(int, raw_input().split()) print "".join(sorted(raw_input() for i in xrange(n)))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,740
s747142000
p04044
u941268675
1469373852
Python
Python (2.7.6)
py
Accepted
35
3072
97
N, L = map(int, raw_input().split()) S = [raw_input() for i in range(N)] print "".join(sorted(S))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,741
s321871970
p04044
u116275728
1469356101
Python
Python (3.4.3)
py
Accepted
40
3064
107
N, L = map(int, input().split()) S = [] for _ in range(N): S.append(input()) S.sort() print("".join(S))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,742
s911821308
p04044
u133129810
1469332368
Python
Python (3.4.3)
py
Accepted
46
3684
73
N,L=input().split() print("".join(sorted(input()for i in range(int(N)))))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,743
s961144916
p04044
u133129810
1469331631
Python
Python (3.4.3)
py
Accepted
38
3064
107
N,L=map(int,input().split()) strs=[] for i in range(N) : strs.append(input()) print("".join(sorted(strs)))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,744
s452385464
p04044
u557523358
1469329910
Python
Python (3.4.3)
py
Accepted
50
3064
82
n, l = map(int, input().split()) print(''.join(sorted(input() for _ in range(n))))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,745
s154900489
p04044
u010733367
1469329750
Python
Python (3.4.3)
py
Accepted
37
3064
74
print("".join(sorted([input() for _ in range(int(input().split()[0]))])))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,746
s816864348
p04044
u024612773
1469328331
Python
Python (3.4.3)
py
Accepted
38
3064
110
n,l=map(int,input().split()) s=[] for i in range(n): s.append(input()) s=list(sorted(s)) print(''.join(s))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,747
s278943979
p04044
u888742521
1469324959
Python
Python (2.7.6)
py
Accepted
29
2568
204
# coding: utf-8 # Here your code ! N, L = map(int, raw_input().split(" ")) lst = [] ans = "" for i in xrange(0,N): S_i = raw_input() lst.append(S_i) lst.sort() for i in lst: ans += i print ans
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,748
s046974872
p04044
u601018334
1469324381
Python
Python (3.4.3)
py
Accepted
39
3064
104
N,L = list(map(int, input().split())) a = [input() for i in range(N)] a.sort() print('%s' % ''.join(a))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,749
s311602400
p04044
u077080573
1469324270
Python
Python (3.4.3)
py
Accepted
44
3064
456
ans = "" def get_input(): flag = 1 cnt = 0 while True: if flag == 1: N,L = input().split() flag = 0 continue else: a = input() yield ''.join(a) cnt += 1 if cnt >= int(N): break if __name__ =...
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,750
s391728140
p04044
u966695411
1469324162
Python
Python (3.4.3)
py
Accepted
38
3064
84
N, L = map(int, input().split()) print("".join(sorted([input() for x in range(N)])))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,751
s034371078
p04044
u834061612
1469324105
Python
Python (2.7.6)
py
Accepted
30
2692
448
#!/usr/bin/env python2 #encoding: UTF-8 # To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. import math line=raw_input().rstrip().split(' ') N=int(line[0]) L=int(line[1]) listo=[] for i in range(N...
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,752
s460691245
p04044
u187945597
1469323964
Python
Python (2.7.6)
py
Accepted
29
2568
152
n,l = map(int,raw_input().split()) s = [] for i in xrange(n) : s.append(raw_input()) s.sort() t = '' for j in xrange(n) : t += s[j] print t
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,753
s291270889
p04044
u104418672
1469323777
Python
Python (3.4.3)
py
Accepted
39
3064
138
moji = [] n, l = map(int, input(). split()) for i in range(n): moji.append(input()) moji.sort() for i in moji: print(i, end = '')
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,754
s518832566
p04044
u786082266
1469323522
Python
Python (2.7.6)
py
Accepted
28
2568
144
n, l = map(int, raw_input().split()) l = [] for i in range(n): l.append(raw_input()) l.sort() s = "" for i in range(n): s += l[i] print s
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,755
s013124789
p04044
u498467969
1469323520
Python
Python (3.4.3)
py
Accepted
37
3064
140
N, L = map(int, input().split()) S = [input() for _ in range(N)] s = "" S.sort() for i in range(N): s += S[i] print(s)
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,756
s651907897
p04044
u813098295
1469322942
Python
Python (2.7.6)
py
Accepted
26
2568
155
N, L = (raw_input().split()) S = [] ans = "" for i in range(int(N)): S.append(raw_input()) S.sort() for i in range(int(N)): ans += S[i] print ans
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,757
s846570861
p04044
u982653403
1469322621
Python
Python (3.4.3)
py
Accepted
40
3188
138
def read(): return map(int, input().split()) n, l = read() s = [] for _ in range(n): s.append(input()) print(''.join(sorted(s)))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,758
s346212398
p04044
u124139453
1469322584
Python
Python (2.7.6)
py
Accepted
27
2568
106
n, l = map(int, raw_input().split()) s = [raw_input() for i in range(n)] ans = "" print "".join(sorted(s))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,759
s877795000
p04044
u948287304
1469322477
Python
Python (2.7.6)
py
Accepted
26
2568
107
n, l = [int(i) for i in raw_input().split()] a = [raw_input() for i in range(n)] a.sort() print(''.join(a))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,760
s497081609
p04044
u594567187
1469322456
Python
Python (3.4.3)
py
Accepted
38
3064
144
cond = [int(n) for n in input().split(" ")] data = [] for a in range(cond[0]): data.append(input()) data = sorted(data) print("".join(data))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,761
s322451153
p04044
u579875569
1469322444
Python
Python (3.4.3)
py
Accepted
39
3064
163
#!/usr/bin/python3 N, L = list(map(int, input().split())) S = [] for i in range(N): S.append(input()) S.sort() for i in range(N): print(S[i], end="")
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,762
s483453628
p04044
u620084012
1469322273
Python
Python (3.4.3)
py
Accepted
38
3064
95
N, L = map(int,input().split()) S = [str(input()) for _ in range(N)] S.sort() print("".join(S))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,763
s735550900
p04044
u776189585
1469322252
Python
Python (2.7.6)
py
Accepted
73
2696
255
#coding :utf-8 N, L = map(int, raw_input().split()) s = sorted([raw_input() for i in xrange(N)]) print "".join(s)
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,764
s514621595
p04044
u392220578
1469322198
Python
Python (3.4.3)
py
Accepted
37
3064
99
N, _ = [int(x) for x in input().split()] S = sorted([input() for _ in range(N)]) print(''.join(S))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,765
s932335371
p04044
u010733367
1469322167
Python
Python (3.4.3)
py
Accepted
38
3064
92
N, L = map(int, input().split()) S = [input() for _ in range(N)] S.sort() print("".join(S))
p04044
<span class="lang-en"> <p>Score : <var>200</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p> <p>She will concatenate all of the strings in some order, to produce a long str...
3 3 dxx axx cxx
axxcxxdxx
1,215,766
s425089828
p04045
u855831834
1601338450
Python
PyPy3 (7.3.0)
py
Accepted
72
67236
259
n, k = map(int,input().split()) D = list(map(int,input().split())) f = [0]*10 for d in D: f[d] = 1 while True: check = str(n) for c in check: if f[int(c)]: n += 1 break else: print(check) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,767
s587101487
p04045
u763550415
1601183564
Python
Python (3.8.2)
py
Accepted
84
9188
277
n, k = map(int, input().split()) D = list(map(int, input().split())) for i in range(n, 100000): m = str(i) count = 0 for j in range(len(m)): if int(m[j]) in D: break else: count += 1 if count == len(m): print(i) exit() print(0)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,768
s277496455
p04045
u833963136
1601078030
Python
Python (3.8.2)
py
Accepted
37
9108
273
n, k = map(int, input().split()) d = list(map(int, input().split())) ng = [False] * 10 for i in d: ng[i] = True def ok(n): global ng while n > 0: if ng[n%10]: return False n //= 10 return True while not ok(n): n += 1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,769
s075777169
p04045
u705418271
1601069051
Python
Python (3.8.2)
py
Accepted
75
9092
140
n,k=map(int,input().split()) d=set(input().split()) while True: if len(set(str(n))&d) != 0: n+=1 else: print(n) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,770
s183595560
p04045
u344089435
1600931886
Python
Python (3.8.2)
py
Accepted
46
9040
249
n,t = [int(x) for x in input().split()] d = [int(x) for x in input().split()] def check(x) -> bool: while x>0: a = x%10 if a in d: return False x//=10 return True while check(n)==False: n+=1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,771
s139397342
p04045
u697690147
1600916261
Python
Python (3.8.2)
py
Accepted
29
9244
733
n, k = input().split() d = list(map(int, input().split())) a = [] for i in range(10): if i not in d: a.append(i) n = list(map(int, list(n))) for i in range(len(n)): if n[i] in d: ind = i done = False while not done: for j in range(n[ind]+1, 10): i...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,772
s321910275
p04045
u319038975
1600908344
Python
Python (3.8.2)
py
Accepted
43
9104
348
def is_dislike(N, ds): num = N while(True): if (num % 10) in ds: return True else: num = int(num / 10) if num == 0: break return False nk = list(map(int,input().split())) N = nk[0] K = nk[1] ds = list(map(int,input().split())) while(True): if is_dislike(N, ds): N = N+1 ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,773
s972999559
p04045
u504662715
1600825446
Python
Python (3.8.2)
py
Accepted
81
9088
141
n,k = map(int,input().split()) d=set(input().split()) while True: if len(set(str(n))&d)!=0: n+=1 else: break print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,774
s203685541
p04045
u708211626
1600798231
Python
Python (3.8.2)
py
Accepted
73
9140
140
n,k=map(int,input().split()) d=set(input().split()) while True: if len(set(str(n))&d) != 0: n+=1 else: print(n) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,775
s892259645
p04045
u645019684
1600748850
Python
Python (3.8.2)
py
Accepted
84
9080
146
N, K = map(int, input().split()) bl = set(input().split()) while True: if len(set(str(N)) & bl) != 0: N += 1 else: print(N) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,776
s425861130
p04045
u696444274
1600740357
Python
Python (3.8.2)
py
Accepted
84
9112
284
n, k = list(map(int, input().split())) d = list(input().split()) ans = n find = False while find == False: p = str(ans) find = True for i in range(len(p)): if p[i] in d: find = False break if find == False: ans += 1 print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,777
s074533691
p04045
u990726146
1600724968
Python
Python (3.8.2)
py
Accepted
82
9020
239
N, K = map(int, input().split()) D = list(input().split()) while True: n = str(N) for i in range(K): f = 0 if D[i] in n: N += 1 f = 1 break if f == 0: break print(N)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,778
s704129368
p04045
u611835487
1600709792
Python
Python (3.8.2)
py
Accepted
57
9136
286
N, K = map(int, input().split()) unlike_list = set(map(str, input().split())) def judge(num): for i in str(num): if i in unlike_list: return False return True ans = False while not ans: if judge(N): ans = True else: N += 1 print(N)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,779
s220152830
p04045
u015084832
1600659038
Python
Python (3.8.2)
py
Accepted
58
8980
663
def main(): N, K = map(int, input().split()) A_list = list(map(str, input().split())) use_list = ["0","1","2","3","4","5","6","7","8","9"] list_A = list(set(use_list) - set(A_list)) #print("list_A", list_A) for i in range(100000) : ans = N + i #print("ans", ans) ans_str =...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,780
s227193801
p04045
u367397360
1600559709
Python
Python (3.8.2)
py
Accepted
56
9032
482
# N, Kの入力受付 N, K = map(int, input().split()) # Dの入力受付 D = set(input().split()) # 0-9とDの差集合作成、リスト化してEに代入 E = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} - D # Nに1ずつ足して条件に合う最初の数字を特定する result = False while result == False: for i in str(N): if not i in E: N = N + 1 result = False ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,781
s003836122
p04045
u806976856
1600491567
Python
PyPy3 (7.3.0)
py
Accepted
68
73444
223
n,k=map(int,input().split()) d=list(map(int,input().split())) def f(x): x=str(x) x=list(x) for i in x: if int(i) in d: return False return True ans=n while not f(n): n+=1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,782
s060469086
p04045
u035885928
1600392586
Python
Python (3.8.2)
py
Accepted
28
9088
534
n, k= input().split() l = list(map(int,input().split())) checkNum=[i for i in range(11)] def find(x): while x!=checkNum[x]: checkNum[x]=checkNum[checkNum[x]] x=checkNum[x] return x for i in l: checkNum[find(i)]=checkNum[find(i+1)] fin="" for i in range(len(n)): first=int(n[i]) k=f...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,783
s333887526
p04045
u682467216
1600391649
Python
PyPy3 (7.3.0)
py
Accepted
90
74596
1,429
# coding=utf-8 from math import floor, ceil, sqrt, factorial, log, gcd from itertools import accumulate, permutations, combinations, product, combinations_with_replacement from bisect import bisect_left, bisect_right from collections import Counter, defaultdict, deque from heapq import heappop, heappush, heappushpop, h...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,784
s457709051
p04045
u682467216
1600391063
Python
PyPy3 (7.3.0)
py
Accepted
90
74628
1,900
# coding=utf-8 from math import floor, ceil, sqrt, factorial, log, gcd from itertools import accumulate, permutations, combinations, product, combinations_with_replacement from bisect import bisect_left, bisect_right from collections import Counter, defaultdict, deque from heapq import heappop, heappush, heappushpop, h...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,785
s581451720
p04045
u612975321
1600305249
Python
Python (3.8.2)
py
Accepted
78
9160
242
n, k = map(int,input().split()) a = list(input().split()) for i in range(n, 100001): flg = True s = str(i) for j in range(len(s)): if s[j] in a: flg = False break if flg: break print(i)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,786
s634706502
p04045
u156815136
1600281620
Python
Python (3.8.2)
py
Accepted
49
10312
1,290
#from statistics import median #import collections #aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] from math import gcd from itertools import combinations,permutations,accumulate, product # (string,3) 3回 #from collections import deque from collections import deque,defaultdict,Counter ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,787
s449927326
p04045
u644907318
1600259821
Python
Python (3.8.2)
py
Accepted
27
9196
670
N,K = map(int,input().split()) D = list(map(int,input().split())) E = [] for i in range(10): if i not in D: E.append(i) E = sorted(E) N = str(N) ind = len(N) for i in range(len(N)): if int(N[i]) not in E: ind = i break if ind==len(N): print(N) else: flag = 0 x = "" for i ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,788
s447743562
p04045
u024340351
1600258880
Python
PyPy3 (7.3.0)
py
Accepted
81
72900
224
N, K = map(int, input().split()) l = list(map(str, input().split())) for i in range (N, 100000): k = str(i) counter = 0 for j in range (0, K): if k.find(l[j]) >= 0: counter+=1 if counter == 0: print(i) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,789
s185478784
p04045
u670567845
1600258661
Python
PyPy3 (7.3.0)
py
Accepted
91
72972
149
N, K = map(int, input().split()) D = set(map(str, input().split())) M = N while (True): if len(set(str(M)) & D) == 0: break M += 1 print(M)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,790
s842789638
p04045
u620084012
1600258179
Python
Python (3.8.2)
py
Accepted
52
9008
217
N, K = map(int,input().split()) D = set(input().split()) for k in range(N,10**9): f = 1 for e in str(k): if e in D: f = 0 break if f == 1: print(k) exit(0)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,791
s783832224
p04045
u241159583
1600257448
Python
Python (3.8.2)
py
Accepted
29
9184
583
import itertools n,k = map(int, input().split()) d = list(map(int, input().split())) safe = [i for i in range(10) if i not in d] n_l = list(map(int, list(str(n)))) if len(set(safe)&set(n_l)) == len(set(n_l)): print(n) exit() for v in itertools.product(safe, repeat=len(str(n))): if v[0] == 0: continue ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,792
s271523429
p04045
u888092736
1600257332
Python
Python (3.8.2)
py
Accepted
71
9168
163
N, K, *D = map(int, open(0).read().split()) D = set(str(d) for d in D) for i in range(N, 100_000): if set(str(i)) & D: continue print(i) break
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,793
s996403373
p04045
u973055892
1600235222
Python
PyPy3 (7.3.0)
py
Accepted
75
72512
619
import sys input = sys.stdin.readline import math def INT(): return int(input()) def MAPINT(): return map(int, input().split()) def LMAPINT(): return list(map(int, input().split())) def STR(): return input() def MAPSTR(): return map(str, input().split()) def LMAPSTR(): return list(map(str, input().split())) f_inf = f...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,794
s656500754
p04045
u085717502
1600221933
Python
Python (3.8.2)
py
Accepted
26
9460
538
#!/usr/bin/env python # coding: utf-8 # In[21]: import itertools def main(): N, K = [int(n) for n in input().split(" ")] D = [1] * 10 for d in input().split(" "): D[int(d)] = 0 L = [str(i) for i, v in enumerate(D) if v == 1] digit = len(str(N)) cand = [] for n in list(itertools.product(L, repeat=digit)): ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,795
s457525529
p04045
u980205854
1600113287
Python
PyPy3 (7.3.0)
py
Accepted
87
74484
2,608
import sys from sys import exit from collections import deque from copy import deepcopy from bisect import bisect_left, bisect_right, insort_left, insort_right from heapq import heapify, heappop, heappush from itertools import product, permutations, combinations, combinations_with_replacement from functools import redu...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,796
s951496722
p04045
u642012866
1600105388
Python
Python (3.8.2)
py
Accepted
25
9164
465
N, K = map(int, input().split()) D = list(map(int, input().split())) def f(n, x): if n==0: if x >= N: print(x) exit() return for i in range(10): if i in D: continue f(n-1, x*10+i) f(len(str(N)), 0) ans = "" for i in range(1, 10): if...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,797
s117766184
p04045
u381585104
1600065551
Python
Python (3.8.2)
py
Accepted
43
9000
302
def iparse(): return list(map(int, input().split())) n, k = iparse() d = iparse() for i in range(n, 5000000): tmp = i f = True while tmp > 0: x = tmp % 10 if x in d: f = False break tmp //= 10 if f: print(i) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,798
s558257243
p04045
u794521826
1600062055
Python
Python (3.8.2)
py
Accepted
65
9140
197
n, _ = map(int, input().split()) d = list(input().split()) def val(n): for i in str(n): if i in d: return print(n) exit() while True: val(str(n)) n += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,799
s216416166
p04045
u757424147
1600012798
Python
Python (3.8.2)
py
Accepted
61
9132
232
n,k = map(int,input().split()) if k == 0: print(n) exit() dislike = list(input().split()) ans = n-1 flag = 1 while flag == 1: ans+=1 flag = 0 for i in str(ans): if i in dislike: flag = 1 break print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,800
s693539875
p04045
u615852002
1599946333
Python
Python (3.8.2)
py
Accepted
28
9196
611
n,k = [int(x) for x in input().split()] ds = {int(x) for x in input().split()} ns = {0,1,2,3,4,5,6,7,8,9} -ds #print(ds) #print(ns-ds) temp=0 d ={} a=1 b = {} m = len(str(n)) +1 over=False while(a<=m and not over ): c = [] d = 10**(a-1) for v in ns: if a>1: for bv in b[a-1]: t = v*d + bv ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,801
s173840474
p04045
u006880673
1599938620
Python
PyPy3 (7.3.0)
py
Accepted
78
73884
422
from itertools import product N, K = map(int, input().split()) D = list(map(int, input().split())) canuse = {0,1,2,3,4,5,6,7,8,9} - set(D) canuse = list(canuse) ans = float("inf") for d in range(1, 6): for num in product(canuse, repeat=d): number = "" for m in num: number += str(m) ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,802
s454544675
p04045
u843768197
1599928862
Python
Python (3.8.2)
py
Accepted
98
9128
255
n, k = map(int, input().split()) d = list(map(int, input().split())) s = {'0','1','2','3','4','5','6','7','8','9'} - set(str(d)) ans = n while (s >= set(str(n))) == False: n += 1 if (s >= set(str(n))) == True: ans = n break print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,803
s421866810
p04045
u761529120
1599828680
Python
PyPy3 (7.3.0)
py
Accepted
70
73236
344
def main(): N, K = map(int, input().split()) D = list(input().split()) for i in range(N,100000): a = str(i) flag = True for d in D: if d in a: flag = False break if flag: print(i) exit() if __name__ =...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,804
s736328705
p04045
u113835532
1599801421
Python
Python (3.8.2)
py
Accepted
43
9084
435
def is_bad_nums(j: int, d: []) -> bool: while j: if j % 10 in d: return True j //= 10 return False def answer(n: int, k: int, d: []) -> int: for i in range(n, 100000): if is_bad_nums(i, d): continue return i def main(): n, k = map(int, input()....
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,805
s787609951
p04045
u759109971
1599751452
Python
Python (3.8.2)
py
Accepted
79
9008
365
N, K = map(int, input().split()) D = list(map(int, input().split())) num = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] num = str(list(set(num) ^ set(D))) ans = str(N) clear = 0 while clear == 0: for i in range(len(ans)): if not ans[i] in num: break if i == len(ans) - 1: clear += 1 ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,806
s552017734
p04045
u372049077
1599719129
Python
Python (3.8.2)
py
Accepted
45
9172
247
N,K = map(int,input().split()) D = list(map(int,input().split())) def ok(x): while x: if x % 10 in D: return False x //= 10 return True for i in range(N,100000): if ok(i): print(i) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,807
s155874646
p04045
u328120774
1599716437
Python
Python (3.8.2)
py
Accepted
59
9120
405
def price(N,K): Kn = input().split() Flag = False for i in range(N,10*N,1): value = str(i) for j in range(K): if(Kn[j] not in value): Flag = True elif(Kn[j] in value): Flag = False break if(Flag == True): ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,808
s066741178
p04045
u397496203
1599691608
Python
PyPy3 (7.3.0)
py
Accepted
87
67688
733
import sys # sys.setrecursionlimit(100000) def input(): return sys.stdin.readline().strip() def input_int(): return int(input()) def input_int_list(): return [int(i) for i in input().split()] def main(): n, k = input_int_list() D = input_int_list() # N < 10000のため、嫌いな数字にかかわらず、 # N <...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,809
s040730281
p04045
u781262926
1599636829
Python
Python (3.8.2)
py
Accepted
83
9148
130
n, k = map(int, input().split()) D = set(input()) for i in range(n, 10**5): if set(str(i)) & D == set(): print(i) exit()
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,810
s888418522
p04045
u781262926
1599636254
Python
Python (3.8.2)
py
Accepted
26
9176
465
n, k, *D = map(int, open(0).read().split()) D = list({0,1,2,3,4,5,6,7,8,9} - set(D)) N = list(map(int, str(n))) d0 = D[0] def dfs(M, i, f): if i == len(N): print(*M, sep='') exit() if f: dfs(M+[d0], i+1, 1) for d in D: if d == N[i]: dfs(M+[d], i+1, 0) eli...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,811
s161124892
p04045
u781262926
1599635935
Python
Python (3.8.2)
py
Accepted
27
9120
502
n, k, *D = map(int, open(0).read().split()) D = list({0,1,2,3,4,5,6,7,8,9} - set(D)) N = list(map(int, str(n))) def dfs(N, M, i, f): if i == len(N): print(*M, sep='') exit() if f: dfs(N, M + [D[0]], i+1, 1) for d in D: if d == N[i]: dfs(N, M+[d], i+1, 0) ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,812
s467731653
p04045
u417309772
1599632834
Python
Python (3.8.2)
py
Accepted
75
9120
118
n, k = map(int, input().split()) ds = [d for d in input().split()] while any(c in ds for c in str(n)): n += 1 print(n)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,813
s213863925
p04045
u350093546
1599603850
Python
PyPy3 (7.3.0)
py
Accepted
82
73540
303
import itertools n,k=map(int,input().split()) d=list(input()) x=[] ans=float('inf') for i in range(10): if str(i) not in d: x.append(str(i)) for i in range(1,6): for lst in itertools.product(x,repeat=i): if int(''.join(lst))>=n: ans=min(ans,int(''.join(lst))) print(ans)
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,814
s797110808
p04045
u329328520
1599584047
Python
Python (3.8.2)
py
Accepted
87
9112
411
def check(n, D): N = [] while n != 0: N.append(n % 10) n //= 10 for d in D: if d in N: return False return True if __name__ == '__main__': n, k = [int(x) for x in input().split(' ')] D = [int(x) for x in input().split(' ')] res = n while True: ...
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,815
s007743357
p04045
u673338219
1599509397
Python
PyPy3 (7.3.0)
py
Accepted
76
73308
254
n,k = map(int,input().split()) d = list(map(str,input().split())) while True: sn = str(n) l = len(sn) flag = True for i in range(l): if sn[i] in d: flag = False break if flag: print(n) exit() n += 1
p04045
<span class="lang-en"> <p>Score : <var>300</var> points</p> <div class="part"> <section> <h3>Problem Statement</h3><p>Iroha is very particular about numbers. There are <var>K</var> digits that she dislikes: <var>D_1, D_2, ..., D_K</var>.</p> <p>She is shopping, and now paying at the cashier. Her total is <var>N</var> y...
1000 8 1 3 4 5 6 7 8 9
2000
1,215,816