Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/100-doors/DWScript/100-doors.dw
Normal file
11
Task/100-doors/DWScript/100-doors.dw
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
var doors : array [1..100] of Boolean;
|
||||
var i, j : Integer;
|
||||
|
||||
for i := 1 to 100 do
|
||||
for j := i to 100 do
|
||||
if (j mod i) = 0 then
|
||||
doors[j] := not doors[j];F
|
||||
|
||||
for i := 1 to 100 do
|
||||
if doors[i] then
|
||||
PrintLn('Door '+IntToStr(i)+' is open');
|
||||
Loading…
Add table
Add a link
Reference in a new issue