結果

問題 No.938 賢人を探せ
ユーザー seica_at_seseica_at_se
提出日時 2019-12-12 01:08:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 228 ms
コンパイル使用メモリ 10,512 KB
実行使用メモリ 11,780 KB
最終ジャッジ日時 2023-08-21 03:37:29
合計ジャッジ時間 2,491 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
11,780 KB
testcase_01 AC 15 ms
7,944 KB
testcase_02 AC 15 ms
7,872 KB
testcase_03 AC 15 ms
7,900 KB
testcase_04 AC 15 ms
7,864 KB
testcase_05 AC 15 ms
7,872 KB
testcase_06 AC 15 ms
7,864 KB
testcase_07 AC 15 ms
7,848 KB
testcase_08 AC 65 ms
10,196 KB
testcase_09 AC 67 ms
10,452 KB
testcase_10 AC 15 ms
7,804 KB
testcase_11 AC 75 ms
10,496 KB
testcase_12 AC 64 ms
10,368 KB
testcase_13 AC 64 ms
10,316 KB
testcase_14 AC 63 ms
10,252 KB
testcase_15 AC 63 ms
10,324 KB
testcase_16 AC 63 ms
10,288 KB
testcase_17 AC 65 ms
10,236 KB
testcase_18 AC 63 ms
10,396 KB
testcase_19 AC 62 ms
10,252 KB
testcase_20 AC 63 ms
10,280 KB
testcase_21 AC 63 ms
10,364 KB
testcase_22 AC 86 ms
11,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

mp = {}
name = []
for i in range(n):
    a, b = input().split()
    if mp.get(a) == None:
        mp[a] = 0
    if mp.get(b) == None:
        mp[b] = 0
    mp[a] += 1
    name.append(b)

for str in name:
    if mp[str] == 0:
        print(str)
    mp[str] += 1
0