foo.cc:1:1: error: 'var' does not name a type; did you mean 'char'?
var
^~~
char
foo.cc:3:5: error: 'k' does not name a type
k,tot:int64;
^
foo.cc:4:1: error: 'begin' does not name a type
begin
^~~~~
foo.cc:6:5: error: 'tot' does not name a type
tot:=k*(k+1) div 2;
^~~
foo.cc:7:5: error: expected unqualified-id before 'for'
for i:=1 to k do begin
^~~
foo.cc:9:12: error: expected constructor, destructor, or type conversion before '(' token
dec(tot,n);
^
foo.cc:10:5: error: 'end' does not name a type; did you mean 'enum'?
end;
^~~
enum
foo.cc:11:12: error: expected constructor, destructor, or type conversion before '(' token
writeln(tot);
^
foo.cc:12:1: error: 'end' does not name a type; did you mean 'enum'?
end.
^~~
enum
正在同步测试数据,请稍后
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。