uses crt;var n,i,s:integer; a:array[1..10000] of integer;begin clrscr; write('nhap so ga can ban: '); readln(n); s:=0; for i:=1 to n do begin write('so ki moi con ga thu ',i,' '); readln(a[i]); if a[i]>3 then s:=s+50000 else s:=s+40000; end; write('tong ba lan thu duoc: ',s); readln;end.