Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,25 @@
import tables, math, strutils, complex
randomize()
proc random[T](a: openarray[T]): T =
result = a[random(low(a)..len(a))]
type Point = tuple[x, y: int]
var world = initCountTable[Point]()
var possiblePoints = newSeq[Point]()
for x in -15..15:
for y in -15..15:
if abs((x.float, y.float)) in 10.0..15.0:
possiblePoints.add((x,y))
for i in 0..100: world.inc possiblePoints.random
for x in -15..15:
for y in -15..15:
if world[(x,y)] > 0:
stdout.write min(9, world[(x,y)])
else:
stdout.write ' '
echo ""