diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2020-06-06 21:33:13 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2020-06-06 21:33:13 +0700 |
commit | 2f674dc80f0382f1c3178f435714960734dc9d3c (patch) | |
tree | 2abba7e4ec72bd16f58f7375126144d3fd9f4bca /2ndary/12/TP-ThanhHoá-2009/BAI4.PAS | |
parent | b2d80610db6beda38573890ed169815e495bc663 (diff) | |
download | cp-2f674dc80f0382f1c3178f435714960734dc9d3c.tar.gz |
Reorganize stuff from secondary school
Diffstat (limited to '2ndary/12/TP-ThanhHoá-2009/BAI4.PAS')
-rw-r--r-- | 2ndary/12/TP-ThanhHoá-2009/BAI4.PAS | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/2ndary/12/TP-ThanhHoá-2009/BAI4.PAS b/2ndary/12/TP-ThanhHoá-2009/BAI4.PAS new file mode 100644 index 0000000..8706032 --- /dev/null +++ b/2ndary/12/TP-ThanhHoá-2009/BAI4.PAS @@ -0,0 +1,29 @@ +const + m: array[1..9] of byte = (0, 0, 1, 1, 0, 0, 4, 7, 0); + equa: array[1..9] of ansistring = ( + #10, + #10, + #10'1+2-3=0'#10, + #10'1-2-3+4=0'#10, + #10, + #10, + #10'1+2-3+4-5-6+7=0'#10'1+2-3-4+5+6-7=0'#10'1-2+3+4-5+6-7=0'#10'1-2-3-4-5+6+7=0'#10, + #10'1+2+3+4-5-6-7+8=0'#10'1+2+3-4+5-6+7-8=0'#10'1+2-3+4+5+6-7-8=0'#10'1+2-3-4-5-6+7+8=0'#10'1-2+3-4-5+6-7+8=0'#10'1-2-3+4+5-6-7+8=0'#10'1-2-3+4-5+6+7-8=0'#10, + #10 + ); + +var + n: byte; + f: text; + +begin + assign(f, 'BAI4.INP'); + reset(f); + read(f, n); + close(f); + + assign(f, 'BAI4.OUT'); + rewrite(f); + write(f, m[n], equa[n]); + close(f) +end. |