/in/foo.cc:1:1: error: 'program' does not name a type
program p1056;
^~~~~~~
/in/foo.cc:3:1: error: 'var' does not name a type
var m:int64;
^~~
/in/foo.cc:5:1: error: 'function' does not name a type
function solve(m:int64):int64;
^~~~~~~~
/in/foo.cc:7:1: error: 'var' does not name a type
var i,t,d: longint;
^~~
/in/foo.cc:9:5: error: found ':' in nested-name-specifier, expected '::'
flag: Boolean;
^
/in/foo.cc:9:1: error: 'flag' does not name a type
flag: Boolean;
^~~~
/in/foo.cc:11:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:19:13: error: 't' does not name a type
d := 2*m+1; t := 2;
^
/in/foo.cc:21:1: error: 'i' does not name a type
i := 1; flag := False;
^
/in/foo.cc:21:9: error: 'flag' does not name a type
i := 1; flag := False;
^~~~
/in/foo.cc:23:1: error: 'repeat' does not name a type
repeat
^~~~~~
/in/foo.cc:29:14: error: 'flag' does not name a type
solve :=i*m; flag := True;
^~~~
/in/foo.cc:31:1: error: 'end' does not name a type
end
^~~
/in/foo.cc:37:17: error: 'flag' does not name a type
solve := i*m-1; flag := True;
^~~~
/in/foo.cc:39:1: error: 'end' does not name a type
end
^~~
/in/foo.cc:45:1: error: 'i' does not name a type
i:=i+1;
^
/in/foo.cc:47:1: error: 'until' does not name a type
until flag;
^~~~~
/in/foo.cc:49:1: error: 'end' does not name a type
end
^~~
/in/foo.cc:53:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:57:8: error: expected constructor, destructor, or type conversion before '(' token
writeln(solve(m));
^
/in/foo.cc:59:1: error: 'end' does not name a type
end.
^~~