PascalABC.NET
begin
var n := ReadInteger;
var a := ReadArrInteger(n);
var s := 0;
for var i := 0 to a.High do
if Abs(a[i]) mod 10 = 7 then
s += i + 1;
s.Println;
end.
PascalABC.NET
begin
var n := ReadInteger;
var a := ReadArrInteger(n);
var s := 0;
for var i := 0 to a.High do
if Abs(a[i]) mod 10 = 7 then
s += i + 1;
s.Println;
end.