Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a, s , c, o: longint;
- var fi, fo: text;
- begin
- assign(fi, 'input.txt'); reset(fi);
- assign(fo, 'output.txt'); rewrite(fo);
- readln(fi, s);
- repeat
- readln(fi, a);
- if not a= 1 then
- o:=o+1;
- c:= c + 1;
- until c = s;
- write(fo, o);
- close(fi);
- close(fo);
- end.
Add Comment
Please, Sign In to add comment