about summary refs log tree commit diff
path: root/others/volume1/026.pas
diff options
context:
space:
mode:
authorRaphael McSinyx <vn.mcsinyx@gmail.com>2017-02-12 16:18:20 +0700
committerRaphael McSinyx <vn.mcsinyx@gmail.com>2017-02-12 16:18:20 +0700
commit1a8e1e68759611a66ae116771da5f376c95a3b9f (patch)
treee663fa6adb9264046a876e552ff2a455215c3a8b /others/volume1/026.pas
parentdf9a0d140a7b7edef66f95aa13b5bb4488147f68 (diff)
downloadcp-1a8e1e68759611a66ae116771da5f376c95a3b9f.tar.gz
Update others/volume1
Diffstat (limited to 'others/volume1/026.pas')
-rw-r--r--others/volume1/026.pas20
1 files changed, 20 insertions, 0 deletions
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.