Submission #2548687


Source Code Expand

var
  s,n,m:longint;
begin
  readln(n,m);
  s:=n-m;
  if n mod 100+900-m>s then s:=n mod 100+900-m;
  if n div 100*100+n nod 10+90-m>s then s:=n div 100*100+n mod 10+90-m;
  if n div 10*10+9-m>s then s:=n div 10*10+9;
  if n-(m mod 100+100)>s then s:=n-(m mod 100+100);
  if n-(m div 100*100+m mod 10)>s then s:=n-(m div 100+100+m mod 10);
  if n-(m div 10*10)>s then s:=n-(m div 10*10);
  writeln(s);
end.

Submission Info

Submission Time
Task A - A - B problem
User luogu_bot1
Language Pascal (FPC 2.6.2)
Score 0
Code Size 406 Byte
Status CE