DWITE Online Computer Programming Contest

I heart you

February 2008
Problem 1

Just in time for Valentine’s Day 2008, we require an ASCII heart generator. It is based on Tony’s horrible “artwork” below:

 ~.~ 
`   `
 \./ 

The input file DATA1.txt will contain 5 lines, integers 0 ≤ N ≤ 5.

The output file OUT1.txt will contain 5 sets of 3 lines, 15 in total. Each set will have a specified number of hearts generated. Refer to the sample output for examples.

Note: Each heart is made up of 3 lines, 5 characters each. Don’t forget to have all the spaces at the end.

Sample Input (only three shown):
1
0
3
Sample Output (only three sets shown):
 ~.~ 
`   `
 \./ 



 ~.~  ~.~  ~.~ 
`   ``   ``   `
 \./  \./  \./