You're challenge is to write 5 different full programs for the 5 following tasks:
Print
Hello, World!
Given an input with STDIN, output the factorial, you can assume that the input is an integer >= 0
Given an integer N, calculate the sum of the primes <= N
Given an input with STDIN, output the letters used in the input. For example: the input is
Hello world
, you need to outputhelowrd
. Note that the output is in lowercase. You can assume that the input is always alphabetic with whitespaces, the whitespaces are ignored.Output the following diamond exactly like this:
* *** ***** ******* ***** *** *
All these challenges are probably very easy, but there is a catch. Every letter you use cannot be used again in the other programs. This is not prohibited, but will give you a penalty of +8 bytes. For example, if this is your program for the first task:
print("Hello, World!");
Then you cannot use the following letters (in uppercase or lowercase form): p
, r
, i
, n
, t
, h
, e
, l
, o
, w
, d
in the other programs. If you do have to use them, you can 'buy' each letter for 8 bytes. So if you want to use the letter l
again in another program, you get a penalty of 8 bytes. After you have paid the penalty, you can use each letter as much as you want in this program. Other characters don't matter. Also, all 5 programs should be in the same language.
This is code-golf, so least amount of bytes wins!