Global definitions; regression tests fixed

This commit is contained in:
Dmitry Boulytchev 2019-09-19 18:37:08 +03:00
parent a3b12425fd
commit f5b802ebed
56 changed files with 121 additions and 10 deletions

View file

@ -1,10 +1,11 @@
global s, n, p;
s := 0;
n := read ();
p := 2;
while n > 0 do
c := 2;
f := 1;
while n > 0 do {
local c = 2, f = 1;
while c*c <= p && f do
f := (p % c) != 0;
@ -17,4 +18,5 @@ while n > 0 do
else skip fi;
p := p + 1
}
od