結果

問題 No.2052 Indegree
ユーザー roaris
提出日時 2022-08-23 06:58:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 205 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 54,144 KB
最終ジャッジ日時 2024-10-10 13:56:45
合計ジャッジ時間 2,416 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

N, M = map(int, input().split())
deg = [0]*N

for _ in range(M):
    _, B = map(int, input().split())
    deg[B-1] += 1

print(deg.count(0))
0