Hide

Problem A
Alphabet Modeling

You are an artist that has just earned a bachelor’s degree. To be a part of your dream company, you must apply and pass their three tests. You’re only worried about tackling the first test for now, which requires you to submit art pieces that incorporate both math and the alphabet. Fortunately, you’ve learnt a lot during your undergrad years and remember taking one or two beginner-leveled computer science course as electives. Thus, you are able to design and plan how your work will look before actually finalizing it. By doing this, you can make changes on your plans as you share them with your peers for feedback before submitting.

Input

There are three inputs received - two strings and one integer.

  • string: A string consisting of only capital letters and no spaces, of length L such that $0 < L \leq 100$. Calculate the rotation of each value by summing up the values of each character (A = $0$,…,Z = $25$). Then, rotate A that many positions forward. This new value must be converted back to its corresponding capital letter in the alphabet. For example, if the input was ACF, this would mean that we are adding $0+2+5=7$. When this number is added to $A$ and converted back to its corresponding capital letter in the alphabet, it would be $H$.

  • sym: A string consisting of any of these symbols $+, -, \times , /$. The one letter output must be outputted in the shape of the variable sym. For example, if the sym input was $-$ make sure that there are spaces above and below the output.

  • dim: $0 < dim \leq 26$. An integer that specifies the area in which the output should be contained in. If dim is an even number, the area of the outputted letter must be doubled. For example, if dim = $5$, then the output should be contained in a $5\times 5$ square.

Output

The output displays the string letter in the form of the sym variable with the dimensions of $dim$.

Sample Input 1 Sample Output 1
ABC
+
5
  D  
  D  
DDDDD
  D  
  D
Sample Input 2 Sample Output 2
ZZZ
x
6
XX    XX
 XX  XX 
  XXXX  
  XXXX  
 XX  XX 
XX    XX

Please log in to submit a solution to this problem

Log in