Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- s:array[1..5] of integer;
- n,k101,count,i,j:integer;
- a:integer;
- begin
- readln(n);
- for i:=1 to 5 do readln(s[i]);
- count := 0;
- k101 := 0;
- for i:=6 to n do
- begin
- if(s[1] mod 101 = 0) then inc(k101);
- readln(a);
- if(a mod 101 = 0) then count := count + i - 5
- else count := count + k101;
- for j:=1 to 4 do
- begin
- s[j] := s[j+1];
- end;
- s[5] := a;
- end;
- writeln((n-5+1)*(n-5)div 2 - count);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement