foo.cc:1:1: error: 'var' does not name a type
1 | var a:ansistring;
| ^~~
foo.cc:3:1: error: 'n' does not name a type
3 | n,m:int64;
| ^
foo.cc:5:1: error: 'begin' does not name a type
5 | begin
| ^~~~~
foo.cc:9:7: error: expected constructor, destructor, or type conversion before '(' token
9 | readln(m);
| ^
foo.cc:11:4: error: expected constructor, destructor, or type conversion before '(' token
11 | val(copy(a,(length(a)-m+1),m),n);
| ^
foo.cc:13:8: error: expected constructor, destructor, or type conversion before '(' token
13 | writeln((3*n+1) mod (1 shl m));
| ^
foo.cc:15:1: error: 'end' does not name a type
15 | end.
| ^~~
[Hydro](https://hydro.ac)提供评测服务