|
|
вернуться в форумHelp! Why do I get WA? I think my program is right , but I get WA . program Ural_1150; // Digits const bit:array[1..10] of longint= (1,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000); var num:array[0..9] of longint; n,i,j,x:longint; begin readln(n); for i:=1 to 9 do begin x:=n mod bit[i+1] div bit[i]; for j:=1 to 9 do begin num[j]:=num[j]+n div bit[i+1]*bit[i]; if x>j then num[j]:=num[j]+bit[i] else if x=j then num[j]:=num[j]+n mod bit[i]+1; end; if n>=bit[i+1] then begin num[0]:=num[0]+n div bit[i+1]*bit[i]-bit[i]; if x>0 then num[0]:=num[0]+bit[i] else num[0]:=num[0]+n mod bit[i]+1; end; end; for i:=0 to 9 do writeln(num[i]); end. fuck you sukers! > sucket! Re: fuck you sukers! Послано Vadim 25 ноя 2018 19:42 I got AC too, loser:) |
|
|