Problem:


未提出者は誰だ

問題

JOI大学のM教授はプログラミングの授業を担当している．クラスには30人の受講生がいて各受講生には1番から30番までの出席番号がふられている．この授業の課題を28人の学生が提出した．提出した28人の出席番号から提出していない2人の出席番号を求めるプログラムを作成せよ．

入力

入力は28行あり，各行には提出者の出席番号（1以上30以下）が1つずつ書かれている．入力される出席番号に重複はないが，どのような順に入力されるかはわからない．

出力

出力は2行からなる． 1行目に2人の未提出者の出席番号のうち小さいほうを， 2行目に大きいほうを出力せよ．

入出力例

入力例 1

3
1
4
5
7
9
6
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

出力例 1

2
8

入力例 2

9
30
6
12
10
20
21
11
7
5
28
4
18
29
17
19
27
13
16
26
14
23
22
15
3
1
24
25

出力例 2

2
8

上記問題文と自動審判に使われるデータは、情報オリンピック日本委員会が作成し公開している問題文と採点用テストデータです。



Sample input:
3
1
4
5
7
9
6
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30


Sample output:
2
8

Submission status: Wrong Answer

Solution code:
dic = {i:False for i in range(1,31)}
for k in range(28):
    dic[int(raw_input())] = True
    
tmp = []
for k,v in dic.items():
    if not v:
        tmp.append(k)
print ''.join(map(str,sorted(tmp)))

Submission status: Wrong Answer

Solution code:
a = (1<<31)-1
print a
for i in range(28):
    b = input()
    a -= 1<<(b-1)
for i in range(30):
    if a & 1<<i: print i+1

Submission status: Wrong Answer

Solution code:
print(*sorted(set(range(1, 31)) ^ set(int(input()) for _ in range(28))))

Submission status: Wrong Answer

Solution code:
print ' '.join(map(str, sorted(set(range(1, 31)) - set([int(raw_input()) for i in range(28)]))))

Submission status: Wrong Answer

Solution code:
x=[input() for i in range(1,29)]
x.sort()
x=[i for i in range(1,29) if i not in x]
x.sort()
for v in x: print v

Submission status: Wrong Answer

Solution code:
import sys
print '\n'.join([str(i) for i in xrange(1,31) if not i in sys.stdin.read().split()])

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

check_list = [i for i in range(1,31)]

for i in range(28):
    check_list.remove(int(input()))

print(check_list[0])
print(check_list[1])

Submission status: Accepted

Solution code:
dic = {i:False for i in range(1,31)}
for k in range(28):
    dic[int(raw_input())] = True
    
tmp = []
for k,v in dic.items():
    if not v:
        tmp.append(k)
        
for j in tmp:
    print j

Submission status: Accepted

Solution code:
lis = []

for i in range(30):
	lis.append(0)

for i in range(28):
	s = raw_input()
	lis[int(s) - 1] = 1

for i in range(30):
	if lis[i] == 0:
		print(i + 1)

Submission status: Accepted

Solution code:
memo = []
for i in range(28):
	tmp = int(raw_input())
	memo.append(tmp)
memo.sort()
for i in range(1,31):
	if((i in memo) == False):
		print i

Submission status: Accepted

Solution code:
a = (1<<31)-1
for i in range(28):
    b = input()
    a -= 1<<(b-1)
for i in range(30):
    if a & 1<<i: print i+1

Submission status: Accepted

Solution code:
for i in sorted(set(range(1, 31)) ^ set(int(input()) for _ in range(28))):
    print(i)

Submission status: Accepted

Solution code:
import sys
cin = sys.stdin.readline
a = [True] * 30
for _ in range(28):
    b = int(cin())
    a[b - 1] = False
for i in range(30):
    if a[i]:print(i + 1)

Submission status: Accepted

Solution code:
students = list(range(1, 31))
[students.remove(int(input())) for _ in range(28)] 
[print(student) for student in students]

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    # ??????????????\???
    students = 30
    yet_to_submit = 2
    # submits = [3, 1, 4, 5, 7, 9, 6, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
    submits = [int(input()) for _ in range(students - yet_to_submit)]
    all_members = set(range(1, students + 1)) #  ??¨???????????? 1???30?????§?????????

    # ???????????????????????????
    yet_to_submits = list(all_members.difference(set(submits)))

    # ???????????????
    yet_to_submits.sort()
    print('{0}\n{1}'.format(yet_to_submits[0], yet_to_submits[1]))

Submission status: Accepted

Solution code:
n=[0]*31
for i in range(28):
    n[int(input())]=1
for i in range(1,31):
    if n[i]==0: print(i)

Submission status: Accepted

Solution code:
n=[i+1 for i in range(30)]
for i in range(28):
    n.pop(n.index(int(input())))
print(*n,sep='\n')

Submission status: Accepted

Solution code:
d=dict(zip(range(1,31),[1]*30))
for _ in range(28):
    d[int(input())]=0
for i in range(1,31):
    if d[i]: print(i)

Submission status: Accepted

Solution code:
a = [False for i in range(30)]
for i in range(28):
    a[int(input()) - 1] = True

for i in range(30):
    if a[i] is False:
        print(i + 1)

Submission status: Accepted

Solution code:
student = [False for i in range(30)]

for i in range(28):
    student[int(input())- 1] = True

for i in range(30):
    if student[i] == False:
        print(i + 1)

Submission status: Accepted

Solution code:
def main():
    a = []
    for _ in range(28):
        a.append(int(input()))
    a.sort()

    ans = []
    num = [i for i in range(1, 31)]
    for x in range(30):
        if num[x] not in a:
            ans.append(num[x])

    for x in range(2):
        print(ans[x])

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
print(*sorted(set(list(range(1, 31))) - set([int(input()) for _ in range(28)])), sep="\n")

Submission status: Accepted

Solution code:
Students = {i for i in range(1,31)}
CArd = []
for j in range(28):
    CArd.append(int(input()))
Card = set(CArd)
INAI = Students - Card
print(min(INAI))
print(max(INAI))

Submission status: Accepted

Solution code:
student = [0 for i in range(31)]

for i in range(28):
    a = int(input())
    student[a] += 1

absent = []

for i in range(1, 31):
    if student[i] == 0:
        absent.append(i)

sort_absent = sorted(absent)

print("{}\n{}".format(sort_absent[0], sort_absent[1]))

Submission status: Accepted

Solution code:
# coding: utf-8

yet_to_submit = [0]
for i in range(1,31):
	yet_to_submit.append(1)

for i in range(28):
	person = int(raw_input())
	yet_to_submit[person] = 0

for i in range(len(yet_to_submit)):
	if yet_to_submit[i] == 1:
		print i

Submission status: Accepted

Solution code:
from sys import stdin
print('\n'.join(map(str, sorted(list(set(range(1, 31)) - set(map(int, stdin)))))))

Submission status: Accepted

Solution code:
lst = [i + 1 for i in range(30)]
for _ in range(28):
  lst[int(input()) - 1] = 0
for i in lst:
  if i:print(i)

Submission status: Accepted

Solution code:
import sys
print(*sorted(set(range(1,31))-set(map(int,sys.stdin))),sep='\n')

Submission status: Accepted

Solution code:
# AOJ 0511: Who Are The Student Yet To Submit
# Python3 2018.6.29 bal4u

c = [i for i in range(1, 31)]
for i in range(28):
	a = int(input())
	c.remove(a)
print(c[0], c[1], sep='\n')

Submission status: Accepted

Solution code:
a = range(1,31)
for i in range(28):
  b = int(input())
  a.remove(b)
print a[0]
print a[1]

Submission status: Accepted

Solution code:
neko = (30,30) #FATAL ERROR
unko = [True for i in xrange(neko[0])]
numbers=[]
for i in xrange(28):
    n = input()

#if False:n = int(raw_input())
    if False:neko.pop(n-1)
    dog = n #int(raw_input())
    numbers.extend([])
    numbers.append(dog)
for i in xrange(28):unko[numbers[i]-1]=False #Love

for i in xrange(30):
    if unko[i]:
        print i+1
exit()

neko.sort()
print neko[0]
#print "FK no unko smells like shit"
print neko[1]

Submission status: Accepted

Solution code:
student=range(1,31)

for i in xrange(28):
    n=input()
    student.remove(n)
for i in student:
    print i

Submission status: Accepted

Solution code:
print '\n'.join(map(str, sorted(set(range(1, 31)) - set([int(raw_input()) for i in range(28)]))))

Submission status: Accepted

Solution code:
for i in sorted(set(range(1,31))-set([input() for i in range(28)])):
    print i

Submission status: Accepted

Solution code:
x=[input() for i in range(28)]
x.sort()
x=[i for i in range(1,31) if i not in x]
x.sort()
for v in x: print v

Submission status: Accepted

Solution code:
import sys

# fp = open("input.txt", "r")
fp = sys.stdin

res = 0
for i in xrange(28):
    num = int(fp.readline())
    res += 1 << (num-1)

for i in xrange(30):
    if((res & (1<<i)) == 0) :
        print i+1

Submission status: Accepted

Solution code:
r = [int(raw_input()) for _ in range(28)]
for i in range(30):
    if (i+1) not in r:
        print (i+1)

Submission status: Accepted

Solution code:
st = [i for i in range(31)]
for i in xrange(28):
    st.remove(input())
print st[1]; print st[2];

Submission status: Accepted

Solution code:
data = [x + 1 for x in xrange(30)]
# print(data)

for i in xrange(28):
    a = int(raw_input())

    data.remove(a)
#     print(data)

for i in data:
    print(i)

Submission status: Accepted

Solution code:
ref = [i for i in range(1,31)]
for i in range(28):
    ref.remove(int(raw_input()))
for i in ref:
    print i

Submission status: Accepted

Solution code:
n = []
for _ in range(28):
    n.append(int(input()))

for i in range(1, 31):
    if i not in n:
        print(i)

Submission status: Accepted

Solution code:
n=[0]*31
for i in range(28):
    n[int(input())]=1
for i in range(1,31):
    if n[i]==0: print(i)

Submission status: Accepted

Solution code:
s=set([int(input()) for _ in range(28)])
t=set([i+1 for i in range(30)])
print(min(list(t-s)))
print(max(list(t-s)))

Submission status: Accepted

Solution code:
a=[int(input()) for i in range(28)]

for i in range(1,31):
    if i in a:pass
    else:print(i)

Submission status: Accepted

Solution code:
a = list(range(31)[1:])
for i in range(28):
    a.remove(int(input()))
print(a[0])
print(a[1])

Submission status: Accepted

Solution code:
a=[]

for i in range(30):
    a.append(i+1)
for j in range(28):
    b=int(input())
    a.remove(b)

print(a[0])
print(a[1])

Submission status: Accepted

Solution code:
a=[]
b=[]
x=[]

for i in range(1,31):
    a.append(i)
#print("@",a)

for n in range(28):
    b.append(int(input()))
    
#print("@",b)

x=list(set(a)-set(b))
#print("@",x)

print(min(x))
print(max(x))

Submission status: Accepted

Solution code:
lst = list(range(1,31))
a = []
for i in range(28):
    n = int(input())
    a.append(n)

ans = list(set(lst) ^ set(a))
ans.sort()
print(ans[0])
print(ans[1])

Submission status: Accepted

Solution code:
n = []
for i in range(30):
    n.append(i+1)
for i in range(28):
    number = int(input())
    n.remove(number)
print(n[0])
print(n[1])

Submission status: Accepted

Solution code:
b=[j for j in range(1,31)]

for i in range(28):
    a=int(input())
    b.remove(a)
    
print(b[0])
print(b[1])

Submission status: Accepted

Solution code:
listn = []
for i in range(28):
    n = int(input())
    listn.append(n)

for i in range(28):
    for j in range(27,0,-1):
        if listn[j-1]>listn[j]:
            listn[j-1],listn[j] = listn[j],listn[j-1]

flist = []
for i in range(1,31,1):
    if listn==[]:
        flist.append(i)
    else:
        if listn[0]==i:
            del(listn[0])
        else:
            flist.append(i)

print(flist[0])
print(flist[1])

Submission status: Accepted

Solution code:
num=[]
for s in range(28):
    num.append(int(input()))

for i in range(1, 31):
    if i not in num:
        print(i)

Submission status: Accepted

Solution code:
n=list(range(31))
n.sort(reverse=True)
for i in range(28):
    n.remove(int(input()))
    
print(n[1])
print(n[0])

Submission status: Accepted

Solution code:
n = list(range(1,31))
m = [int(input()) for i in range(28)]
result = list(set(n)-set(m))
print(min(result))
print(max(result))

Submission status: Accepted

Solution code:
num_list = []
line = []
for num in range(28):
    num_list.append(int(input()))
for num1 in range(1,31):
    if num1 in num_list:
        continue
    else:
        line.append(num1)
print(min(line))
print(max(line))

Submission status: Accepted

Solution code:
d=dict(zip(range(1,31),[1]*30))
for _ in range(28):
    d[int(input())]=0
for i in range(1,31):
    if d[i]: print(i)

Submission status: Accepted

Solution code:
a=[]
for i in range(30):
  a.append(1+i)

for j in range(28):
    a.remove(int(input()))
    
print(a[0])
print(a[1])

Submission status: Accepted

Solution code:

c = [i for i in range(1, 31)]
for i in range(28):
	a = int(input())
	c.remove(a)
print(c[0], c[1], sep='\n')

Submission status: Accepted

Solution code:
a=[]
for i in range(28):
    n=int(input())
    a.append(n)
a.sort()
b=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
c=list(set(b)-set(a))
print(min(c))
print(max(c))

Submission status: Accepted

Solution code:
num_list = []
line = []

for num in range(28):
    num_list.append(int(input()))

for num1 in range(1,31):
    if num1 in num_list:
        continue
    else:
        line.append(num1)

print(min(line))
print(max(line))

Submission status: Accepted

Solution code:
M = [0]*30
S = []
for i in range(28):
    a = int(input())
    S.append(a)
for i in range(28):
    M[S[i]-1] = 1
for i in range(30):
    if M[i] == 0:
        print(i+1)

Submission status: Accepted

Solution code:
a = [0] * 30
for i in range(28) :
    n = int(input())
    a[n-1] = 1
while 0 in a :
    b = a.index(0)
    print(b+1)
    a[b] = 1

Submission status: Accepted

Solution code:
#(46)未提出者は誰だ?
a=[0]
for i in range(28):
    n=int(input())
    a.append(n)

a.append(31)
a.sort()
i=1
j=0
while True:
    if a[i]-a[j]>1:
        print(a[j]+1)
    i+=1
    j+=1
    if i==30:
        break

Submission status: Accepted

Solution code:
a = [False for i in range(30)]
for i in range (28):
    a[int(input()) - 1] = True
    
for i in range (30):
    if a[i] is False:
        
        print(i + 1)

Submission status: Accepted

Solution code:
try:
   l = []
   for i in range(28):
      l.append(int(input()))

   for i in range(1, 31):
      if i not in l:
         print(i)

except EOFError:
   pass

Submission status: Accepted

Solution code:
c = [i for i in range(1, 31)]
for i in range(28):
    a = int(input())
    c.remove(a)
print(c[0], c[1], sep='\n')

Submission status: Accepted

Solution code:
a = [False for i in range(30)]
for i in range (28) :
    a[int(input()) -1]=True
for i in range (30) :
    if a[i] is False : 
        print(i +1)

Submission status: Accepted

Solution code:
import math

A = [i+1 for i in range(30)]
B = [int(input()) for i in range(28)]

diff = sorted(list(set(A)-set(B)))

print(diff[0])
print(diff[1])

Submission status: Accepted

Solution code:
s = []
for i in range(28):
    s.append(int(input()))

l = []
for i in range(1,31):
    l.append(i)
    if i in s:
        pass
    else:
        print(i)

Submission status: Accepted

Solution code:
x=[]

for i in range(28):
    X = int(input())
    x.append(X)
    
y=[i for i in range(1,31)]

z=list(set(y)-set(x))
list.sort(z)

print(z[0])
print(z[1])

Submission status: Accepted

Solution code:
list=[]
for i in range(28):
    list.append(int(input()))

for i in range(1,31):
    if i not in list:
        print(i)

Submission status: Accepted

Solution code:
a=[0]*31
for i in range(1,29):
    x=int(input())
    a[x]=1
for j in range(1,31):
    if a[j]==0:
        print(j)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a=[]

for i in range(28):
    n=int(input())
    a.append(n)

a1=sorted(a)

j=0
for j in range(30):
    j+=1
    if j in a:
         pass
    else:
         print(j)

Submission status: Accepted

Solution code:
list = list(range(31)[1:])
for i in range(28):
    i = int(input())
    list.remove(i)
print(list[0])
print(list[1])

Submission status: Accepted

Solution code:
N=28
i=1
j=1
S=0
J=[]
I=[int(input()) for _ in range (N)]
I.sort()
for i in range(N):
    S=I[i]
    if S==j:
        j+=1
        i+=1
        pass
    else:
        j+=2
        i+=1
        print(S-1)
l=I[27]        
if l == 30:
    pass
else:
    print(30)

Submission status: Accepted

Solution code:
c = [i for i in range(1, 31)]
for i in range(28):
	a = int(input())
	c.remove(a)
print(c[0], c[1], sep='\n')

Submission status: Accepted

Solution code:
n=[i for i in range(1,31)]
for i in range(28):
    x=int(input())
    n.remove(x)
print(n[0],n[1],sep='\n')

Submission status: Accepted

Solution code:
   
l = [ i for i in range(1,31) ]
for i in range(28):
    n = int(input())
    l[n-1] = 0

print(*sorted(list(filter(lambda x: x!=0, l))), sep='\n')

Submission status: Accepted

Solution code:
for i in sorted(set(range(1, 31)) ^ set(int(input()) for _ in range(28))):
    print(i)

Submission status: Accepted

Solution code:
lst=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
for i in range(28):
    lst[int(input())-1]=0
for i in lst:
    if i:
        print(i)

Submission status: Accepted

Solution code:
student = [0] * 30
for i in range(28) :
    n = int(input())
    student[n-1] = 1
while 0 in student :
    a = student.index(0)
    print(a+1)
    student[a] = 1

Submission status: Accepted

Solution code:
lst=[]
x = 1
for i in range(30):
    lst.append(x)
    x += 1
for j in range(28):
    n=int(input())
    lst.remove(n)

print(min(lst))
print(max(lst))

Submission status: Accepted

Solution code:
num1=[]
num2=[]
for i in range(28):
    x=int(input())
    num1.append(x)
    
num1.sort()

c=0
if num1[0]==1:
    pass
else:
    num2.append(1)
    c+=1
y=0
while y<27:
    z=y+1
    a=num1[y]
    b=num1[z]
    t=int(b-a)
    if t==2:
        num2.append(z+c+1)
        c+=1
    else:
        pass
    y+=1
if c==2:
    pass
else:
    num2.append(30)
print(num2[0])
print(num2[1])

Submission status: Accepted

Solution code:
x=[]
for i in range(28):
    n=int(input())
    x.append(n)
y=sorted(x)
for i in range(1,31):
    if i in y:
        pass
    else:
        print(i)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

a = []
a = list(range(1,31))
for i in range(28):
    n = int(input())
    a.remove(n)
print(a[0], a[1], sep="\n")

Submission status: Accepted

Solution code:
n = list(range(31)[1:])
for i in range(28):
    n.remove(int(input()))
print(n[0])
print(n[1])

Submission status: Accepted

Solution code:
a=[]
try:
    while True:
        a.append(int(input()))
except EOFError:
    pass

for n in range(30):
    n += 1
    if n>30:
        break
    if n not in a:
        print(n)

Submission status: Accepted

Solution code:
x=[]


for i in range (28):
    n=int(input())
    x.append(n)
x1=sorted(x)

for a in range(30):
    a+=1
    if a in x:
        pass
    else:
        print(a)

Submission status: Accepted

Solution code:
n=[]
for i in range(30):
  n.append(i+1)
for j in range(28):
  number=int(input())
  n.remove(number)
print(n[0])
print(n[1])

Submission status: Accepted

Solution code:
import math

A = [i+1 for i in range(30)]
B = [int(input()) for i in range(28)]

diff = sorted(list(set(A)-set(B)))

print(diff[0])
print(diff[1])

Submission status: Accepted

Solution code:
t=[]
for i in range(30):
  t.append(i+1)
for j in range(28):
  number=int(input())
  t.remove(number)
print(t[0])
print(t[1])

Submission status: Accepted

Solution code:
n=[int(input()) for _ in range(28)]
n=sorted(n)
#print("@", n)
k=0
for i in range(1,30):
    if n[k] != i:
        print(i)
    else:
        k += 1
if n[27] == 29:
    print(30)

Submission status: Accepted

Solution code:
a = [False for i in range(30)]#30行まで値を全部Falseとする
for i in range (28) :
    a[int(input()) -1]=True#aというリストの中で、読み込んだ値を降順に並べてTrueとする
for i in range (30) :
    if a[i] is False :#30までの値の中で(まだ)Falseのもの
        print(i +1)#を昇順に並べる

Submission status: Accepted

Solution code:
c=[i for i in range(1,31)]

for i in range(28):
    a=int(input())
    c.remove(a)
    
print(c[0],c[1],sep='\n')

Submission status: Accepted

Solution code:
m=[]
for i in range(28):
    m.append(int(input()))
for i in range(1,31):
    if i not in m:
        print(i)

Submission status: Accepted

Solution code:
n = []
for a in range(1,31):
  n.append(int(a))
#print(n)
for b in range(28):
  n.remove(int(input()))
print(n[0])
print(n[1])

Submission status: Accepted

Solution code:
list=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
for i in range(28):
    lists=int(input())
    list.remove(lists)
print(list[0])
print(list[1])

Submission status: Accepted

Solution code:
c=[i for i in range(1,31)]

for i in range(28):
    a=int(input())
    c.remove(a)

print(c[0],c[1],sep='\n')

Submission status: Accepted

Solution code:
X = [False] * 31

while True:
    try:
        s = int(input())
    except:
        break
    X[s] = True

for i in range(1,31):
    if not X[i]:
        print(i)

Submission status: Accepted

Solution code:
a=[]
b=list(range(1,31))

for i in range(28):
    x=int(input())
    a.append(x)
    
c=list(set(b)-set(a))

print(min(c))
print(max(c))

Submission status: Accepted

Solution code:
p=[]
for i in range(28):
    n=int(input())
    p.append(n)
for j in range(1,31):
    k=j in p
    if k==False:
        print(j)

Submission status: Accepted

Solution code:
N = []
for i in range(30):
    N.append(i + 1)

for j in range(28):
    hw = int(input())
    N.remove(hw)
print(N[0])
print(N[1])

Submission status: Accepted

Solution code:
L=[]
M=[]

for i in range(0,28):
    a=int(input())
    L.append(a)
    i+=1

for j in range(1,31):
    b=L.count(j)
    if b==0:
        M.append(j)
        
c=M[-1]
d=M[-2]

if c>d:
    print(d)
    print(c)
else:
    print(c)
    print(d)

Submission status: Accepted

Solution code:
a=[]
for i in range (28):
    a.append(int(input()))
A=list(range(1,31))
b=list(set(list(A))-set(list(a)))
c=sorted(b)
[print(i) for i in c]

Submission status: Accepted

Solution code:
a=list(range(1,31))
for i in range(28):
    a.remove(int(input()))
print(a[0])
print(a[1])

Submission status: Accepted

Solution code:
lst=[]
for i in range(28):
    n=int(input())
    lst.append(n)

for j in range(1,31):
    a=j in lst
    if a==False:
        print(j)

Submission status: Accepted

Solution code:
l=[]
m=[]
for i in range(28):
    n=int(input())
    l.append(n)
    l.sort()
for i in range(1,31):
    if i in l:
        pass
    else:
        print(i)

Submission status: Accepted

Solution code:
list=[]

for i in range(28):
    n=int(input())
    list.append(n)


list.sort()
for i in range (1,31):
    if i in list:
        pass
    else:
        print(i)

Submission status: Accepted

Solution code:
list1=[]
list2=[]
s=0
for i in range(28):
    n=int(input())
    list1.append(n)
for x in range(30):
    s=s+1
    list2.append(s)
list3=list(set(list1)^set(list2))
print(list3[0])
print(list3[1])

Submission status: Accepted

Solution code:
lst=[int(input()) for i in range(28)]
lsts=sorted(lst)

l=[]
s=1

for j in range(28):
    if lsts[j]!=s:
        l.append(s)
        s=s+2
    else:
        s=s+1
for n in l:
    print(n)
if max(lsts)!=30:
    print(30)

Submission status: Accepted

Solution code:
x=[]
for i in range(28):
    a=int(input())
    x.append(a)
    
    y=[]
    for j in range(1,31):
        d=j in x
        
        if d==False:
            y.append(j)
    
print(y[0])
print(y[1])

Submission status: Accepted

Solution code:
alist = []
for i in range(28):
    a = int(input())
    alist.append(a)
x = sorted(alist)
s=0
for i in range(29):
    if x[s]==i+1:
        s+=1
    else :
        print(i+1)

if x[27]!=30:
    print(30)

Submission status: Accepted

Solution code:
num = []
for _ in range(28):
    num.append(int(input()))

for i in range(1, 31):
    if i not in num:
        print(i)

Submission status: Accepted

Solution code:
a=[0]
for i in range(28):
    n=int(input())
    a.append(n)
a.append(31)
a.sort()
i=1
j=0
while True:
    if a[i]-a[j]>1:
        print(a[j]+1)
    i+=1
    j+=1
    if i==30:
        break

Submission status: Accepted

Solution code:
a=[int(input()) for i in range(28)]
a.sort()
for i in range(29):
    if i+1 == a[i] :
        pass
    else :
        a.append(i+1)
        a.sort()
        print(a[i])
if len(a)==29 :
    print(30)

Submission status: Accepted

Solution code:
gakusei= [s for s in range(1,31)]
for i in range(28):
    gakusei.remove(int(input()))
print(gakusei[0])
print(gakusei[1])

Submission status: Accepted

Solution code:
a = list(range(1,31))
for i in range(28):
    b = int(input())
    a.remove(b)
print(a[0])
print(a[1])

Submission status: Accepted

Solution code:
lst = []
for i in range(28):
    n = int(input())
    lst.append(n)
    
for i in range(1,31):
    if i not in lst:
        print(i)

Submission status: Accepted

Solution code:
lis=[]
for i in range(28):
    a=int(input())
    lis.append(a)
for x in range(1,31):
    t=lis.count(x)
    if t==0:
        print(x)
    x+=1

Submission status: Accepted

Solution code:
a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
b = []
for i in range(28):
    n = int(input())
    b.append(n)
b.sort()
c = list(set(a)-set(b))
if c[0] > c[1]:
    print(c[1])
    print(c[0])
else:
    print(c[0])
    print(c[1])

Submission status: Accepted

Solution code:
a=[]
b=list(range(1,31))

for i in range(28):
    x=int(input())
    a.append(x)
    
c=list(set(b)-set(a))

   
print(min(c))
print(max(c))

Submission status: Accepted

Solution code:
M=list(range(1,31))
for i in range (28):
    S=int(input())
    M.remove(S)
print(min(M))
print(max(M))

Submission status: Accepted

Solution code:
#(46)未提出者は誰だ?
a=[0]
for i in range(28):
     n=int(input())
     a.append(n)
a.append(31)
a.sort()
i=1
j=0
while True:
     if a[i]-a[j]>1:
          print(a[j]+1)
     i+=1          
     j+=1
     if i==30:
          break

Submission status: Accepted

Solution code:
s=[i+1 for i in range(30)]
for i in range(28):
    t=int(input())
    s.remove(t)
print(s[0],s[1],sep='\n')

Submission status: Accepted

Solution code:
l=[]
for i in range(30):
    l.append(i+1)


for j in range(28):
    a=int(input())
    l.remove(a)
print(l[0])
print(l[1])

Submission status: Accepted

Solution code:
x=[]
for i in range(28):
    n=int(input())
    x.append(n)
y=sorted(x)
for i in range(1,31):
    if i in y:
        pass
    else:
        print(i)

Submission status: Accepted

Solution code:
lst=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
for i in range (28):
    a=int(input())
    lst.remove(a)

print(lst[0])
print(lst[1])

Submission status: Accepted

Solution code:
lst1=[]
lst2=list(range(1,31))
for i in range(28):
    x = int(input())
    lst1.append(x)
y = list(set(lst1) ^ set(lst2))
print(min(y))
print(max(y))

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(28)]
a.sort()
for i in range(30):
    if i+1 in a:
        pass
    else:
        print(i+1)

Submission status: Accepted

Solution code:
a=[]
for i in range(28):
    b=int(input())
    a.append(b)
for i in range(1,31):
    if i not in a:
        print(i)

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(28)]

line = []
for b in range(1,31):
    if b in a:
        continue
    else:
        line.append(b)
        
print(min(line))
print(max(line))

Submission status: Accepted

Solution code:
A = [i for i in range(1, 31)]
N = []

for i in range(28) :
    n = int(input())
    N.append(n)
    
R = list(set(A) - set(N))

print(min(R))
print(max(R))

Submission status: Accepted

Solution code:
list=[int(input()) for i in range(28)]

T=[]
for j in range(1,31):
    T.append(j)

for k in range(28):
    T.remove(int(list[k]))

if T[0]>T[1]:
    print(T[1])
    print(T[0])
else:
    print(T[0])
    print(T[1])

Submission status: Accepted

Solution code:
a=[]
ans=[]

for i in range(0,28):
    n=int(input())
    a.append(n)
list.sort(a)
if a[0]==2:ans.append(1)
if a[0]==3:ans.append(1,2)
if a[27]==29:ans.append(30)
if a[27]==28:ans.append(29,30)
        
for i in range(0,27):
    b=a[i+1]-a[i]
    if b==2:ans.append(a[i]+1)
    elif b==3:ans.append(a[i]+1,a[i]+2)
        
print(ans[0])
print(ans[1])

Submission status: Accepted

Solution code:
a=list(range(1,31))
for i in range(28):
    b=int(input())
    a.remove(b)
    
print(a[0],a[1],sep='\n')

Submission status: Accepted

Solution code:
n = [int(input()) for n in range(28)]

for i in range(1,31):
 if i not in n: print(i)

Submission status: Accepted

Solution code:
L = []
for i in range(28):
    a = int(input())
    L.append(a)
    N = sorted(L)

l = list(range(1, 31))

b = list(set(l) - set(N))
B = sorted(b)
[print(i) for i in B]

Submission status: Accepted

Solution code:
s=[int(input()) for i in range(28)]
for i in range(1, 31):
    if i in s:
        pass
    else:
        print(i)

Submission status: Accepted

Solution code:
att = []
ab = []

for i in range(28):
    s = int(input())
    att.append(s)

att.append(0)
att.append(0)

for i in range(28):
    for j in range(27,i,-1):
        if att[j] < att[j-1]:
            att[j],att[j-1] = att[j-1],att[j]
           

for i in range(30):
    if att[i] != i+1:
        att.insert(i,0)
        ab.append(i+1)
        
print(ab[0])
print(ab[1])

Submission status: Accepted

Solution code:
a=[None]*28
for i in range(28):
    a[i]=input()
a=list(map(int,a))

a.sort()

k=0
m=0
if a[0]==2:
    print(1)
if a[27]==29:
    print(30)
for i in range(27):
    k=a[i+1]-a[i]
    if k==2:
        m=a[i+1]-1
        print(m)

Submission status: Accepted

Solution code:
#46 未提出者は誰だ

list_1 = [int(input()) for i in range(28)]
list_1.sort()

list_2 = []
for i in range(1,31):
        list_2.append(i)

result = list(set(list_2) - set(list_1))
print(min(result))
print(max(result))

Submission status: Accepted

Solution code:
a=list(range(1,31))

j=0
for j in range(28):
    c=int(input())
    a.remove(c)
    j+=1

print(a[0], a[1],sep='\n')

Submission status: Accepted

Solution code:
a=[]
for i in range(28):
    x=int(input())
    a.append(x)
k=1
b=[]
for j in range(30):
    if k in a:
        pass
    else:
        b.append(k)
    k+=1
b.sort()
print(b[0])
print(b[1])

Submission status: Accepted

Solution code:
x=[]
y=[]
for i in range(28):
    n=int(input())
    x.append(n)
#print(x)

for j in range(1,31):
    y.append(j)
#print(y)

z=set(x)^set(y)

print(list(z)[0])
print(list(z)[1])

Submission status: Accepted

Solution code:
W = []
i=0
for i in range(0,28):
    a= int(input())
    W.append(a)
    i += 1
w = sorted(W)
s = list(range(1,31))

A = list(set(s)-set(w))
a = sorted(A)
[print(i) for i in a]

Submission status: Accepted

Solution code:
A=[]
for i in range(28):
    s=int(input())
    A.append(s)
B=list(range(1,31))
result=list(set(B)-set(A))
re=sorted(result)
print(re[0])
print(re[1])

Submission status: Accepted

Solution code:
i = 1
a = []
while i <= 28:
    n = int(input())
    a.append(n)
    i += 1
for h in range(1,31):
    try:
        a.index(h)
    except ValueError:
        print(h)

Submission status: Accepted

Solution code:
a=list(range(1,31))
i=1
while i<29:
    n=int(input())
    a.remove(n)
    i+=1
print(a[0])
print(a[1])

Submission status: Accepted

Solution code:
n=0
list=[]
for i in range(30):
   n+=1
   list.append(n)

for i in range(28):
   a=int(input())
   list.remove(a)

list.sort()
for j in range(2):
   print(list[j])

Submission status: Accepted

Solution code:
myset = set([x for x in range(1,31)])
for _ in range(28):
	i = int(input().strip())
	if i in myset:
		myset.remove(i)

for j in myset:
	print(j)

Submission status: Accepted

Solution code:
data1 = [int(input()) for i in range(28)]
data2 = (list(range(31)))
data2.remove(0)

print(min(list(set(data2) - set(data1))))
print(max(list(set(data2) - set(data1))))

Submission status: Accepted

Solution code:
member = list(range(31))
member.pop(0)


for i in range(28):
    a = int(input())
    member.remove(a)
print(member[0])
print(member[1])

Submission status: Accepted

Solution code:
a=[int(input()) for i in range(28)]
b=list(range(1,31))
c=list(set(b) - set(a))
c.sort()
print(c[0])
print(c[1])