Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Project Euler 18 - Maximum path sum
//fpc 3.0.0 program Project18; type a=array[1..100] of integer; var b: array[1..100] of a; i,j : integer; // Tim duong di tu dinh den day cua 1 tam giac so sao cho tong cac so tren duong di la lon nhat // Phuong phap : tim duong tu phia duoi len begin for i:=1 to 15 do for j:=1 to i do read(b[i,j]); for i:=14 downto 1 do begin for j:=1 to i do begin if b[(i+1),j] > b[i+1,j+1] then b[i,j]:=b[i+1,j]+b[i,j] else b[i,j]:=b[i+1,j+1]+b[i,j]; write(b[i,j],' '); end; writeln; end; end.
run
|
edit
|
history
|
help
0
Calculatrice 1.0
9 „C”
BubbleSor (slimst)
Task 16 (OGE)-1
6
Heron Equationヘロンの公式
practica 8 ejercicio 1
janja - popravek
record as a procedure argument
Huong11a2@