Compile Error

foo.cc:2:9: error: too many decimal points in number
 a:array[0..100001]of longint;
         ^~~~~~~~~
foo.cc:1:1: error: 'var' does not name a type; did you mean 'char'?
 var n,l,i:longint;
 ^~~
 char
foo.cc:2:2: error: found ':' in nested-name-specifier, expected '::'
 a:array[0..100001]of longint;
  ^
foo.cc:2:1: error: 'a' does not name a type
 a:array[0..100001]of longint;
 ^
foo.cc:3:2: error: found ':' in nested-name-specifier, expected '::'
 s:ansistring;
  ^
foo.cc:3:1: error: 's' does not name a type
 s:ansistring;
 ^
foo.cc:4:1: error: 'function' does not name a type; did you mean 'union'?
 function multiply(s:longint):ansistring;
 ^~~~~~~~
 union
foo.cc:5:1: error: 'var' does not name a type; did you mean 'char'?
 var i,j,k:longint;
 ^~~
 char
foo.cc:6:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:8:1: error: 'a' does not name a type
 a[1]:=1;
 ^
foo.cc:9:1: error: 'l' does not name a type
 l:=1;
 ^
foo.cc:10:1: error: expected unqualified-id before 'for'
 for i:=1 to s div 27 do
 ^~~
foo.cc:13:1: error: expected unqualified-id before 'for'
 for j:=1 to l do
 ^~~
foo.cc:17:1: error: 'a' does not name a type
 a[j]:=a[j] mod 10;
 ^
foo.cc:18:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:19:1: error: 'k' does not name a type
 k:=l+10;
 ^
foo.cc:20:1: error: expected unqualified-id before 'while'
 while a[k]=0 do dec(k);
 ^~~~~
foo.cc:21:1: error: expected unqualified-id before 'while'
 while(l<=k)or(a[l]>0)do
 ^~~~~
foo.cc:24:1: error: 'a' does not name a type
 a[l]:=a[l] mod 10;
 ^
foo.cc:25:1: error: 'l' does not name a type
 l:=l+1;
 ^
foo.cc:26:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:27:4: error: expected constructor, destructor, or type conversion before '(' token
 dec(l);
    ^
foo.cc:28:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:29:1: error: expected unqualified-id before 'for'
 for i:=1 to s mod 27 do
 ^~~
foo.cc:32:1: error: expected unqualified-id before 'for'
 for j:=1 to l do
 ^~~
foo.cc:36:1: error: 'a' does not name a type
 a[j]:=a[j] mod 10;
 ^
foo.cc:37:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:38:1: error: 'k' does not name a type
 k:=l+2;
 ^
foo.cc:39:1: error: expected unqualified-id before 'while'
 while a[k]=0 do dec(k);
 ^~~~~
foo.cc:40:1: error: expected unqualified-id before 'while'
 while(a[l]>0)or(l<=k)do
 ^~~~~
foo.cc:43:1: error: 'a' does not name a type
 a[l]:=a[l] mod 10;
 ^
foo.cc:44:1: error: 'l' does not name a type
 l:=l+1;
 ^
foo.cc:45:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:46:4: error: expected constructor, destructor, or type conversion before '(' token
 dec(l);
    ^
foo.cc:47:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:48:1: error: expected unqualified-id before 'for'
 for i:=l downto 1 do multiply:=multiply+chr(a[i]+48);
 ^~~
foo.cc:49:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:50:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:52:1: error: 's' does not name a type
 s:=multiply(n+1);
 ^
foo.cc:53:1: error: expected unqualified-id before 'for'
 for i:=1 to length(s)-1 do write(s[i]);
 ^~~
foo.cc:54:8: error: expected constructor, destructor, or type conversion before '(' token
 writeln(chr(ord(s[length(s)])-2));
        ^
foo.cc:55:1: error: 'end' does not name a type; did you mean 'enum'?
 end.
 ^~~
 enum
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1454 Hanoi双塔问题
语言
C++
递交时间
2021-08-29 20:09:26
评测时间
2021-08-29 20:09:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes