CodeGolf is fun!

0

0 votes
Easy
Problem

You are given a sentence:

CodeGolf is fun!

Depending upon the input print the sentence in the desired pattern:

  1. When the input is 0

CodeGolf is fun!
CodeGolf is fun
CodeGolf is fu

...

Cod
Co
C

       2. When the input is 1

C
Co
Cod

...

CodeGolf is fu
CodeGolf is fun
CodeGolf is fun!

Scoring

Scores will be calculated as follows:

Score = (1 - c / 500) * 50, where c is the number of characters in your code. In case the characters exceed 500, your score will be zero.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?