language: Pascal (gpc) (gpc 20070904)
date: 112 days 5 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var
 N, i: longint;
 a, b, c1: byte;
begin
 readln( N );
 readln( a, b );
 if a + b >= 10
  then
   write( 1 );
 c1:= ( a + b ) mod 10;
 for i:= 1 to N - 1 do
  begin
  readln( a, b );
   if a + b < 10
    then
     write( c1 )
    else
     write( c1 + 1 );
  c1:= ( a + b ) mod 10;
  end;
   write( c1 );
end.