結果

問題 No.938 賢人を探せ
ユーザー tkr182
提出日時 2019-12-23 10:05:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 13,604 KB
最終ジャッジ日時 2024-12-14 11:54:39
合計ジャッジ時間 3,046 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict as d
a=d(int)
for i in range(int(input())):
    s,t=map(str,input().split())
    a[s]=1
    a[t]=max(a[t],0)
for i in a.keys():
    if a[i]==0:
        print(i)
0