PnnK

12 task pas

Jul 4th, 2021
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.22 KB | None | 0 0
  1. begin
  2.   var s := '9' * 1000;
  3.   while s.Contains('888') or s.Contains('999') do
  4.   begin
  5.     if s.Contains('888') then
  6.       s := s.Replace('888','9',1)
  7.     else
  8.       s := s.Replace('999','8',1);
  9.   end;
  10.   print(s);
  11. end.
Advertisement
Add Comment
Please, Sign In to add comment