結果
問題 | No.2052 Indegree |
ユーザー |
![]() |
提出日時 | 2025-03-20 20:16:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 233 bytes |
コンパイル時間 | 202 ms |
コンパイル使用メモリ | 82,732 KB |
実行使用メモリ | 53,892 KB |
最終ジャッジ日時 | 2025-03-20 20:17:01 |
合計ジャッジ時間 | 1,882 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
n, m = map(int, input().split()) in_degree = [0] * (n + 1) for _ in range(m): a, b = map(int, input().split()) in_degree[b] += 1 count = 0 for i in range(1, n + 1): if in_degree[i] == 0: count += 1 print(count)