mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-07 23:38:47 +00:00
Global definitions; regression tests fixed
This commit is contained in:
parent
a3b12425fd
commit
f5b802ebed
56 changed files with 121 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue