Skip to content

Commit ecccf3b

Browse files
author
hangyeol
committed
103차 1번 문제풀이
1 parent ace50b1 commit ecccf3b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
def main():
2+
N = int(input())
3+
A = [list(map(int, input().split())) for _ in range(N)]
4+
5+
for i in range(N):
6+
for j in range(N):
7+
for k in range(N):
8+
if A[j][i] and A[i][k]:
9+
A[j][k] = 1
10+
11+
for num in A:
12+
print(' '.join(map(str, num)))
13+
14+
15+
if __name__ == "__main__":
16+
main()

0 commit comments

Comments
 (0)