Count the number of edges#5072

Count the number of edges

1 Sekunde
128 Megabyte
Leicht

The directed graph is given with an adjacency matrix. Find the number of edges in a graph.

Eingabe

The first line contains the number of vertices in the graph n\:(1 \le n \le 100). Then follow lines with numbers each, equal to or — the adjacency matrix of the graph.

Ausgabe

Print the number of edges in a graph.

Beispiele

Beispiel 1

Loading
Loading