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. |
dmFyCiBOLCBpOiBsb25naW50OwogYSwgYiwgYzE6IGJ5dGU7CmJlZ2luCiByZWFkbG4oIE4gKTsKIHJlYWRsbiggYSwgYiApOwogaWYgYSArIGIgPj0gMTAKICB0aGVuCiAgIHdyaXRlKCAxICk7CiBjMTo9ICggYSArIGIgKSBtb2QgMTA7CiBmb3IgaTo9IDEgdG8gTiAtIDEgZG8KICBiZWdpbgogIHJlYWRsbiggYSwgYiApOwogICBpZiBhICsgYiA8IDEwCiAgICB0aGVuCiAgICAgd3JpdGUoIGMxICkKICAgIGVsc2UKICAgICB3cml0ZSggYzEgKyAxICk7CiAgYzE6PSAoIGEgKyBiICkgbW9kIDEwOwogIGVuZDsKICAgd3JpdGUoIGMxICk7CmVuZC4gICAgICA=
-
upload with new input
-
result: Success time: 0.01s memory: 4112 kB returned value: 0
3 0 9 0 9 1 9
9100
-
result: Success time: 0.01s memory: 4112 kB returned value: 0
4 0 4 4 2 6 8 3 7
4750



