repo.or.cz
/
furry-nemesis.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
cloned from srcbox.
[furry-nemesis.git]
/
sector.pas
blob
6b135b30c7a47f49b32726727252e8d52fa07c1d
1
var
2
x
,
y
,
z
,
p
:
longint
;
3
4
begin
5
assign
(
input
,
'sector.dat'
);
reset
(
input
);
6
assign
(
output
,
'sector.out'
);
rewrite
(
output
);
7
readln
(
x
,
y
,
z
,
p
);
8
//p:=p+1;
9
if
p
>=
x
*
y
*
z
then
writeln
(
'0 0 0'
)
10
else begin
11
writeln
(
p
div
z
mod
x
,
' '
,
p
div
z
div
x
,
' '
,
p
mod
z
+
1
)
12
end
;
13
close
(
input
);
close
(
output
);
14
end
.