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
Factorial number using recursion
String Toggling
Юра и заселение
PRIMES russian DANILIN
Calc1
print path module python
Lesson8
python codewars
Leibnitz Series To Estimate Pi
Lesson4