Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
3-6.격자판 최대합
n = int(input()) a = [list(map(int, input().split())) for _ in range(n)] largest = -2147000000 for i in range(n): sum1 = sum2 = 0 for j in range(n): sum1 += a[i][j] sum2 += a[j][i] if sum1>largest: largest = sum1 if sum2>largest: largest = sum2 sum1=sum2=0 for i in range(n): sum1+=a[i][i] sum2+=a[i][n-i-1] if sum1>largest: largest = sum1 if sum2>largest: largest = sum2 print(largest)
run
|
edit
|
history
|
help
0
chickens,cows,pigs
Python3 - select fruits
GINGERMANZ
Calendar 12 months
Reverse the string in python
HW L3
.....✓[Guess the number]®®®®®®®•$$$$✓.....
shuru9
(P3) Rok przestępny
Pej