about summary refs log tree commit diff
path: root/12/TP-HN-2008/R1/BL1.PAS
diff options
context:
space:
mode:
authorRaphael McSinyx <vn.mcsinyx@gmail.com>2016-11-06 11:13:14 +0700
committerRaphael McSinyx <vn.mcsinyx@gmail.com>2016-11-06 11:13:14 +0700
commit7de121c4b4ef888a0d1990c27144a7f9dd8c5f94 (patch)
tree2a298c9a957ad490cf8251ab264413f4effa9dce /12/TP-HN-2008/R1/BL1.PAS
parente4767bb46d1d759f9c863704e3f347d2a0c8c49a (diff)
downloadcp-7de121c4b4ef888a0d1990c27144a7f9dd8c5f94.tar.gz
Thêm đề HSG 12 huyện Vĩnh Tường, Vĩnh Phúc
Diffstat (limited to '12/TP-HN-2008/R1/BL1.PAS')
-rwxr-xr-x12/TP-HN-2008/R1/BL1.PAS26
1 files changed, 26 insertions, 0 deletions
diff --git a/12/TP-HN-2008/R1/BL1.PAS b/12/TP-HN-2008/R1/BL1.PAS
new file mode 100755
index 0000000..6931b1b
--- /dev/null
+++ b/12/TP-HN-2008/R1/BL1.PAS
@@ -0,0 +1,26 @@
+uses math;
+
+var
+  f : text;
+  m, n, i : byte;
+  a, b : double;
+j
+begin
+  assign(f, 'LT.IN');
+  reset(f);
+  read(f, n, m);
+  close(f);
+  a := 1;
+  for i := 1 to n do
+    a := a * 2;
+  b := 1;
+  for i := 1 to m do
+    b := b * 3;
+  a := a + b;
+  for i := 1 to trunc(log10(a)) do
+    a := a / 10;
+  assign(f, 'LT.OU');
+  rewrite(f);
+  writeln(f, trunc(a));
+  close(f)
+end.