Submission #10204311


Source Code Expand

var
	S:String;
	ans,T,pr:Array[0..10]of Longint;
	i,j,tmp:Longint;
begin
	readln(S);
	T[0]:=1;
	pr[0]:=1;
	for i:=1 to 10 do pr[i]:=pr[i-1]*10;
	for i:=1 to length(S) do begin
		tmp:=ord(S[i])-48;
		for j:=i-1 downto 0 do begin
			inc(ans[i],T[j]*tmp+ans[j]);
			inc(tmp,(ord(S[j])-48)*pr[i-j]);
			inc(T[i],T[j]);
		end;
	end;
	writeln(ans[length(S)]);
end.

Submission Info

Submission Time
Task C - Many Formulas
User kotatsugame
Language Pascal (FPC 2.6.2)
Score 0
Code Size 378 Byte
Status WA
Exec Time 0 ms
Memory 128 KB

Compile Error

/usr/bin/ld.bfd: warning: ./link.res contains output sections; did you forget -T?

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status AC
AC × 7
WA × 5
Set Name Test Cases
Sample
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
01.txt WA 0 ms 128 KB
02.txt AC 0 ms 128 KB
03.txt WA 0 ms 128 KB
04.txt AC 0 ms 128 KB
05.txt AC 0 ms 128 KB
06.txt AC 0 ms 128 KB
07.txt WA 0 ms 128 KB
08.txt WA 0 ms 128 KB
09.txt AC 0 ms 128 KB
10.txt AC 0 ms 128 KB
sample_01.txt AC 0 ms 128 KB
sample_02.txt WA 0 ms 128 KB