- Vs Brandy
- 2009-08-30 21:58:20 @
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案错误...
├ Hint: 太水了! ├ 标准行输出 1870...
├ 错误行输出 9353...
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案错误...
├ Hint: 太水了! ├ 标准行输出 2563...
├ 错误行输出 1281...
├ 测试数据 10:答案正确... 0ms
代码:
type sta=array[0..1111] of longint;
var ans:sta;
mi:array[0..3500] of sta;
now,now1:sta;
i,j,k,l,m,n:longint;
s:ansistring;
function bijiao(a,b:sta):longint;
var i:longint;
begin
for i:=0 to a[0] do
if a[i]b[i] then exit(1);
exit(0);
end;
function chen(a:sta):sta;
var i,j,k:longint;
begin
fillchar(chen,sizeof(chen),0);
chen[0]:=a[0];
for i:=1 to a[0] do
chen[i]:=a[i]*2;
for i:=1 to a[0] do
if chen[i]>=10 then
begin
inc(chen,chen[i] div 10);
chen[i]:=chen[i] mod 10;
end;
if chen[a[0]+1]0 then inc(chen[0]);
end;
function chu(a:sta):sta;
var i,j,k:longint;
begin
fillchar(chu,sizeof(chu),0);
chu[0]:=a[0];
j:=0;
for i:=a[0] downto 1 do
begin
chu[i]:=(a[i]+j*10) div 2;
j:=0;
if a[i] mod 2=1 then j:=1;
end;
if chu[a[0]]=0 then dec(chu[0]);
end;
procedure outp(a:sta);
var i:longint;
begin
for i:=a[0] downto 1 do write(a[i]);
writeln;
end;
begin
readln(s);
n:=length(s);
fillchar(now,sizeof(now),0);
now[0]:=n;
for i:=n downto 1 do
now[n-i+1]:=ord(s[i])-ord('0');
fillchar(mi,sizeof(mi),0);
mi[0,0]:=1;mi[0,1]:=1;
i:=0;
while (mi