]> git.somenet.org - pub/jan/funcprog.git/blob - Aufgabe3.lhs_2.out
GITOLITE.txt
[pub/jan/funcprog.git] / Aufgabe3.lhs_2.out
1 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25 
2
3 Testfall: {-1,1-}(dreiNplusEins :: Integer -> [Integer]) 1 == [1]; Testfall OK 
4 Testfall: {-1,2-}[(n,l)|n<-[1,3,33,75,1234,32432],l<-[(length.dreiNplusEins)(2^(toInteger n))],l/=n+1] == []; Testfall OK 
5 Testfall: {-1,3-}[(length.dreiNplusEins)n|n<-[1..7]] == [1,2,8,3,6,9,17]; Testfall OK 
6 Testfall: {-1,4-}[(length.dreiNplusEins)n|n<-[8..27]] == [4,20,7,15,10,10,18,18,5,13,21,21,8,8,16,16,11,24,11,112]; Testfall OK 
7 Testfall: {-1,5-}[(length.dreiNplusEins)n|n<-[9663]] == [185]; Testfall OK 
8
9 Testfaelle OK: 5; Testfaelle FALSCH: 0
10 Punkte : 25
11
12 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25 
13
14 Testfall: {-2,1-}(maxZyklus :: UntereGrenze -> ObereGrenze -> (UntereGrenze,ObereGrenze,MaxZykLaenge)) 1 27 == (1,27,112); Testfall OK 
15 Testfall: {-2,2-}[(maxZyklus 1 n)|n<-[26..28]] == [(1,26,24),(1,27,112),(1,28,112)]; Testfall OK 
16 Testfall: {-2,3-}[(m,n,rz)|m<-[1..200],n<-[1..m-1],(rm,rn,rz)<-[maxZyklus m n],rz/=0||rm/=m||rn/=n] == []; Testfall OK 
17 Testfall: {-2,4-}[(m,n,rz)|m<-[1..500],n<-[1..m-1],(rm,rn,rz)<-[maxZyklus m n],rz/=0||rm/=m||rn/=n] == []; Testfall OK 
18 Testfall: {-2,5-}maxZyklus 999999 999999 == (999999,999999,259); Testfall OK 
19
20 Testfaelle OK: 5; Testfaelle FALSCH: 0
21 Punkte : 25
22
23 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25 
24
25 Testfall: {-3,1-}(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)[[True]](0,0) == 0; Testfall OK 
26 Testfall: {-3,2-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])p|p<-[(0,1),(5,-2)]] == [2,-1]; Testfall OK 
27 Testfall: {-3,3-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])(i,j)|i<-[0..2],j<-[0..2]]  ; Testfall FALSCH 
28 Erwartet: {-3,3-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])(i,j)|i<-[0..2],j<-[0..2]] == [1,2,2,2,3,1,0,1,1] 
29 Ausgabe:  {-3,3-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])(i,j)|i<-[0..2],j<-[0..2]] ==[1,2,0,2,3,1,2,1,1]   
30 Testfall: {-3,3'-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]])(j,i)|i<-[0..2],j<-[0..2]] == [1,2,2,2,3,1,0,1,1]; Testfall OK 
31 Testfall: {-3,4-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]]  ; Testfall FALSCH 
32 Erwartet: {-3,4-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] == [2,2,2,3,3,3,2,3,1,0,2,1] 
33 Ausgabe:  {-3,4-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] ==[2,3,2,2,3,3,2,3,1,-1,-1,-1]   
34 Testfall: {-3,4'-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(j,i)|i<-[0..3],j<-[0..2]] == [2,2,2,3,3,3,2,3,1,0,2,1]; Testfall OK 
35 Testfall: {-3,5-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]]  ; Testfall FALSCH 
36 Erwartet: {-3,5-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] == [1,3,1,2,5,2,3,5,4,3,3,2] 
37 Ausgabe:  {-3,5-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(i,j)|i<-[0..3],j<-[0..2]] ==[1,2,3,3,5,5,1,2,4,-1,-1,-1]   
38 Testfall: {-3,5'-}[(anzNachbarn :: [[Bool]] -> (Integer,Integer) -> Integer)(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]])(j,i)|i<-[0..3],j<-[0..2]] == [1,3,1,2,5,2,3,5,4,3,3,2]; Testfall OK 
39
40 Testfaelle OK: 5; Testfaelle FALSCH: 3
41 Punkte : 25
42
43 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25 
44
45 Testfall: {-4,1-}(transform :: [[Bool]] -> [[Integer]]) [[True]] == [[0]]; Testfall OK 
46 Testfall: {-4,2-}(transform :: [[Bool]] -> [[Integer]]) (let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]]) == [[1,2,0],[2,3,1],[2,1,1]]; Testfall OK 
47 Testfall: {-4,3-}transform(let t=True;f=False in [[t,f,f],[t,f,f],[f,t,f]]) == [[1,2,0],[2,3,1],[2,1,1]]; Testfall OK 
48 Testfall: {-4,4-}transform(let t=True;f=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]]) == [[2,3,2,0],[2,3,3,2],[2,3,1,1]]; Testfall OK 
49 Testfall: {-4,5-}transform(let f=True;t=False in [[t,f,f,t],[t,t,f,f],[f,f,t,f]]) == [[1,2,3,3],[3,5,5,3],[1,2,4,2]]; Testfall OK 
50
51 Testfaelle OK: 5; Testfaelle FALSCH: 0
52 Punkte : 25
53
54 Punkte gesamt: 100
55