結果

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

ソースコード

diff #

n = int(input())
s = set()
l = list()
t = set()
for _ in range(n):
    a, b = input().split()
    s.add(a)
    if b not in t:
        l.append(b)
        t.add(b)
for x in l:
    if x not in s:
        print(x)
0