結果

問題 No.938 賢人を探せ
ユーザー tkr182tkr182
提出日時 2019-12-23 10:05:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 556 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 12,044 KB
最終ジャッジ日時 2023-08-21 03:41:41
合計ジャッジ時間 2,769 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
12,044 KB
testcase_01 AC 17 ms
8,608 KB
testcase_02 AC 18 ms
8,460 KB
testcase_03 AC 18 ms
8,556 KB
testcase_04 AC 18 ms
8,556 KB
testcase_05 AC 18 ms
8,612 KB
testcase_06 AC 18 ms
8,444 KB
testcase_07 AC 18 ms
8,604 KB
testcase_08 AC 74 ms
9,936 KB
testcase_09 AC 76 ms
9,992 KB
testcase_10 AC 18 ms
8,596 KB
testcase_11 AC 85 ms
10,344 KB
testcase_12 AC 73 ms
9,928 KB
testcase_13 AC 73 ms
10,092 KB
testcase_14 AC 72 ms
10,092 KB
testcase_15 AC 72 ms
10,136 KB
testcase_16 AC 73 ms
9,936 KB
testcase_17 AC 73 ms
10,044 KB
testcase_18 AC 73 ms
10,044 KB
testcase_19 AC 72 ms
10,016 KB
testcase_20 AC 74 ms
10,036 KB
testcase_21 AC 72 ms
10,004 KB
testcase_22 AC 102 ms
11,960 KB
権限があれば一括ダウンロードができます

ソースコード

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