|
|
back to boardNew Test 38 What is there in this test? This solution now gets WA38 var ar : array[1..10,0..9] of longint; n,i,a1,a,j,max : longint; begin readln(n); for j := 1 to n do begin readln(a); i := 1; while a <> 0 do begin a1 := a mod 10; a := a div 10; inc(ar[i,a1]); inc(i); end; end; n := 0; for i := 10 downto 1 do begin max := 0; for j := 1 to 9 do if ar[i,j] > ar[i,max] then max := j; n := n*10 + max; end; writeln(n); end. Re: New Test 38 Try tests with leading 0 Re: New Test 38 Try tests with leading 0 |
|
|