From 1a8e1e68759611a66ae116771da5f376c95a3b9f Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Sun, 12 Feb 2017 16:18:20 +0700 Subject: Update others/volume1 --- others/volume1/026.pas | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 others/volume1/026.pas (limited to 'others/volume1/026.pas') diff --git a/others/volume1/026.pas b/others/volume1/026.pas new file mode 100644 index 0000000..7b76472 --- /dev/null +++ b/others/volume1/026.pas @@ -0,0 +1,20 @@ +const + enum: array[0..2] of string = ('none', 'one', 'both'); + +var + (* 1 ngày = 1440 phút *) + a, b: array[0..1] of int16; + m: array[0..2] of int16; + i, j, dogs: int8; + +begin + read(a[0], b[0], a[1], b[1], m[0], m[1], m[2]); + for i := 0 to 2 do + begin + dogs := 0; + for j := 0 to 1 do + if (m[i] - 1) mod (a[j] + b[j]) < a[j] then + inc(dogs); + writeln(enum[dogs]) + end +end. -- cgit 1.4.1