結果

問題 No.938 賢人を探せ
ユーザー calei
提出日時 2020-01-06 22:13:15
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 19,916 KB
最終ジャッジ日時 2024-12-14 11:55:59
合計ジャッジ時間 2,686 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

# 2020/01/06

n=int(input())
aa=[]
bb=[]
for i in range(n):
    a,b=input().split()
    aa.append(a)
    bb.append(b)

res=set(bb)-set(aa)

for b in bb:
    if b in res:
        print(b)
        res.remove(b)
0