結果

問題 No.2052 Indegree
ユーザー lllllll88938494
提出日時 2022-09-12 10:32:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 52,480 KB
最終ジャッジ日時 2024-11-29 07:51:41
合計ジャッジ時間 2,135 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())

nyu=[[]for i in range(n)]

for i in range(m):
    a,b= map(int,input().split())
    nyu[b-1].append(a-1)
    
    
cnt=0
for i in nyu:
    if len(i) == 0:
        cnt+= 1
        
print(cnt)
0