foo.c:1:1: error: unknown type name 'var'
1 | var
| ^~~
foo.c:2:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
2 | n,ans:longint;
| ^
foo.c:3:1: error: unknown type name 'procedure'
3 | procedure doit(t:longint);
| ^~~~~~~~~
foo.c:3:17: error: expected ')' before ':' token
3 | procedure doit(t:longint);
| ^
| )
foo.c:4:1: error: unknown type name 'var'
4 | var
| ^~~
foo.c:5:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
5 | i:longint;
| ^
foo.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
7 | if t>0 then
| ^~
foo.c:10:1: error: expected identifier or '(' before 'for'
10 | for i:=1 to t do
| ^~~
foo.c:12:1: warning: data definition has no type or storage class
12 | end;
| ^~~
foo.c:12:1: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
foo.c:13:1: error: unknown type name 'begin'
13 | begin
| ^~~~~
foo.c:14:1: warning: parameter names (without types) in function declaration
14 | readln(n);
| ^~~~~~
foo.c:15:6: error: expected declaration specifiers or '...' before 'n'
15 | doit(n div 2);
| ^
foo.c:16:12: error: expected ')' before '+' token
16 | writeln(ans+1);
| ^
| )
foo.c:17:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
17 | end.
| ^
[Hydro](https://hydro.ac)提供评测服务