People Innovation Excellence

[contoh soal] 5870 – Smooth Visualization

One possible method to visualize a number with many digits whose values are from
1 to 7, inclusive, is to visualize each digit by a vertical column of '+' on a
background canvas of '*'.    The digit seven (7) would be visualized by a vertical
column of  seven '+', the digit six (6) would be visualized by a vertical column of
six '+' and so on.   For example, the number “1425” will be visualized as
***+
*+*+
*+*+
*+++
++++
Such representation is seen as jagged, as the difference between one column of '+'
and the next is greater than 1, and may be considered not aesthetically pleasing by
some.  You are asked to add the minimum number of columns to eliminate its jagged
nature and construct the following smoother visualization
********+
***+***++
**+++*+++
*++++++++
+++++++++
where the height of two adjacent columns of '+' differ by no more than one

Published at :

A World-Class community of proud and outstanding achievers.

Online Inquiry

Admission
BINUS SCHOOL Simprug
Telp : +62217243663 ext : 4120-4122
Email : admissions@binus.edu
Serpong Playground

Periksa Browser Anda

Check Your Browser

Situs ini tidak lagi mendukung penggunaan browser dengan teknologi tertinggal.

Apabila Anda melihat pesan ini, berarti Anda masih menggunakan browser Internet Explorer seri 8 / 7 / 6 / ...

Sebagai informasi, browser yang anda gunakan ini tidaklah aman dan tidak dapat menampilkan teknologi CSS terakhir yang dapat membuat sebuah situs tampil lebih baik. Bahkan Microsoft sebagai pembuatnya, telah merekomendasikan agar menggunakan browser yang lebih modern.

Untuk tampilan yang lebih baik, gunakan salah satu browser berikut. Download dan Install, seluruhnya gratis untuk digunakan.

We're Moving Forward.

This Site Is No Longer Supporting Out-of Date Browser.

If you are viewing this message, it means that you are currently using Internet Explorer 8 / 7 / 6 / below to access this site. FYI, it is unsafe and unable to render the latest CSS improvements. Even Microsoft, its creator, wants you to install more modern browser.

Best viewed with one of these browser instead. It is totally free.

  1. Google Chrome
  2. Mozilla Firefox
  3. Opera
  4. Internet Explorer 9
Close